mlv_snd merged into mlv_rec and enabled by default

#578 Declined
Repository
Branch
mlv-snd-merge
Repository
Branch
unified
Author
  1. Alex
Reviewers
Description

Changes discussed here: http://www.magiclantern.fm/forum/index.php?topic=12793

I did not test anything - I'm simply afraid to open the mlv_rec submenu. Seriously.

@stevefal, do you have a good proposal for cleaning up the menu?

For the private definitions, I would place them in the C source file (not just here, but everywhere they are used). If you ask me, the headers should contain only the public API. Other opinions?

Comments (34)

  1. stevefal

    re: proposal for cleaning up the menu - I will make one.

    Are third-level menus still off limits?

    Or alternatively, is it possible for the module to add a top-level menu (tab)?

  2. stevefal

    Bandaids are generally easy, but solving structural issues well takes a little thinking and research.

    In this case the conundrum is how the "Movie" concept is so fundamentally affected by RAW video. I'd love to rationalize the Movie menu so that RAW video gets the placement it deserves (when enabled), and irrelevant features are disabled, or better, hidden. Questions:

    Currently a module can add menu items. Can a module hide or disable items? This somewhat relates to the module dependency semaphore discussion.

    In the current Movie menu, which items are inapplicable to RAW video? (please answer specifically) Conceivably the Movie menu would have a first item in which you choose between Normal, RAW, and HDR modes, and subsequent menuitems change (hidden/shown) depending on the selection. In the RAW case, think of it as "RAW Movie" mode in keeping with Canon parlance, as opposed to RAW video being a step-child of Movie mode.

    Perhaps giving thought into how original ML features could be factored as modules would inform this discussion. It's not ideal that code packaging should have an implicit bearing on the prominence of features and their UI. But in this case the baked-in-ness of older features, and the permanence of their UI's seems to handicap the clearest UI for modules.

    All that said I'll focus on the internal content of MLV+sound menu.

    1. Alex author

      Currently, each menu entry disables itself if other settings are not good for it (but the decision is taken by the feature that is disabled, not by something else).

      In movie menu, the following items do not affect RAW video:

      • bitrate
      • gradual expo (because it ramps ISO, which only affects the preview in RAW)
      • vignetting effects
      • Image fine-tuning -> ML digital ISO (but it's useful for preview)
      • Image fine-tuning -> everything except "Shutter fine-tuning" (these tweaks affect preview only)
      • creative effects (like cartoon look, or negative image) - not present on 5D3
      • movie tweaks -> time indicator (raw has its own indicator, but would be nice to listen to this setting)
      • movie logging (mlv has its own metadata)
      • movie restart (it might actually work, never tried)
      • some 50D-specific stuff

      HDR and RAW can be used both at the same time (HDR is just an exposure tool, after all).

      1. stevefal

        re: "Currently, each menu entry disables itself if other settings are not good for it (but the decision is taken by the feature that is disabled, not by something else)."

        This is where I think granular semaphores or some other interface could be handy. It doesn't seem practical that an already-implemented feature should need to update it's code to account for new modules that invalidate the old features. On the other hand, if old features could be disabled, and their UIs hidden by some standard mechanism, new modules could effectively override and appear to "replace" the old features after the fact.

        It's obviously a deep subject, but I think worth debating. The current model promotes blindly adding things, which quickly leads to confusion for all but the most savvy.

        Thanks for the list.

      2. stevefal

        If there was a system for modules hiding tab/menus/items, one could create a module to do nothing more than filter the menu system for certain scenarios. For example, you could create a module that hides all photo-only features in movie mode, and visa versa :) Or you could create a module that implements beginner/expert/developer modes. Or "exposure nerd" mode. Or whatever.

        [Edit] Not that all those modes are necessarily interesting, but an "outside-in" way to control visibility seems architecturally valuable, in that one could make sweeping UI simplifications without diving into every feature.

        1. Alex author

          I see these things more suited to config presets (already implemented). I thought of bundling a few configurations like the ones you suggested - so you could choose one of them at startup, for example.

  3. stevefal

    Current menu items:

    Movie -> RAW video (MLV):

    • Resolution
    • Aspect ratio
    • Create directory: Save video chunks in separate folders
    • Global Draw: Disable global draw while recording
    • Frame skipping: Enable if you don't mind skipping frames (for slow cards)
    • Preview
    • Status when recording: Display status when recording
    • Start delay: Useful to stabilize in Photo mode
    • Files > 4GiB (exFAT): Don't split files on 4GiB margins, not supported on all models
    • Digital dolly: Smooth panning of the recording windows (software dolly)
    • Card warm-up: Write a large file on the card at camera startup
    • Use SRM job memory: Allocate memory from SRM job buffers
    • Extra hacks: Slow down Canon GUI, Lock digital expo while recording
    • Fix black level: forces the black level to 2048 (5D3), 1024 (50D, 5D2)
    • Debug trace: Write and execution trace to memory cards. Causes performance drop
    • Show buffer graph: Displays a graph of buffer usage and expected frames
    • Buffer fill method: Method for filling buffers. Will affect write speed
    • CF-only buffers: How many of the largest buffers are for CF writing
    • Card spanning: Span video file over cards to use SD+CF write speed
    • Reserve card space: write a file before recording to prevent data loss on full card.
    • Tag: Text: Free text field
    • Tag: Take: Auto-counting take number

    Audio -> MLV sound: enable sound recording for MLV

    I'm not sure if MLV adds other items, but there are dependent items:

    Overlay

    • Histogram -> Use RAW histogram: (This feature requires you shooting RAW)
    • Zebras -> Use RAW zebras: (This feature requires you shooting RAW)

    These are cases where it's odd that RAW functionality is even mentioned, when it depends on a module that may not even be present. It seems it'd be better to refactor (work I know), and "replace" features with RAW versions when in a RAW mode.

    I don't suppose Waveform is RAW. That's a case where the user might naturally assume it is, and it ideally should be, when in a RAW mode.

    1. Alex author

      The same RAW overlays also work in photo mode (where the functionality does not require any modules).

      Waveform is not RAW, and the same is true for false colors or vectorscope.

      I would move Global Draw functionality in the main overlay menu (so, besides OFF, LiveView, QuickReview, and All modes, there would be another option, "Off while recording" or "Standby only" (not sure how to name it).

      SRM job memory probably can be removed (I see no reason to turn it off).

      "Fix black level" will be also be removed (there's already a pull request which will do that).

      1. stevefal

        Agree wrt GD. With all these option, cononical UI per ML model would be:

        Overlay -> Global Draw (ON/OFF) >

        • LiveView recording (ON/OFF)
        • LiveView standby (ON/OFF)
        • QuickReview (ON/OFF)

        What's with "Global draw" anyway? Suggest "Draw overlays" : Master switch for all overlays.

      2. stevefal

        "The same RAW overlays also work in photo mode (where the functionality does not require any modules)."

        To me this implies hiding/showing tabs/menus/items based on Canon mode. Filtering the UI on that alone would dramatically simplify the menu system for all users. Since menu customization already has the mechanics, this seems like low-hanging fruit.

        1. Alex author

          So, rather than graying out menu items, it would be better to hide them?

          (I'm kinda afraid people will ask where XYZ diappeared - now, at least there is some help telling you what to do in order to enable that function, for those who read it)

          1. stevefal

            Fyi this is related to the other idea about scenario-based modes. But this is programmatic and dynamic based on Canon/RAW modes, rather than a one-time config choice at startup.

            Yes, it is better to hide things with gross mode changes, because the unlikely cost of, say, a user being confused that Audio is not available in photo mode, is less than the burden of confusion of literally every item being displayed at once. It's untenable if you assume the feature set grows over time - which it has and likely will continue.

            This came up as a result of the discussion re: RAW versus Canon video modes. When I am shooting RAW video, there are things I don't need to ever see. With so many other dependencies between features, you can't tell at a glance why something is disabled. You have to probe. Why do that if the feature is wholly inapplicable in the current gross mode? Another example, when I'm shooting photos, I don't need to see anything related exclusively to Canon video, RAW video or otherwise. It's a waste of visual and mental bandwidth.

            To be clear, this isn't meant to imply hiding everything that isn't available. I think close dependencies should behave as now. You don't want the UI morphing under your fingers. But gross modes like Photo/Movie, RAW/Canon could really clean things up. Another example: I don't need to see Colorspace, Overexposure and Underexposure options if they are inapplicable to RAW video. It's not like I'm going to switch to H.264 in order to get those features.

            As a counterexample, I don't think the LV features should be hidden, or even disabled, when LiveView is off. I don't see LiveView as a gross mode from the user's perspective, but a mini-mode that you are expected to enter and exit fluidly. This is not a serious issue in my mind, just an example that there are many states in the system, and we get to decide which constitute gross modes. By doing so I think we can make dramatic reductions in UI complexity.

            Hedge? Add a preference:

            Unavailable features: Control whether inapplicable features are shown >

            • Hidden (default)
            • Disabled

            But I really don't think that is necessary, and it requires implementing the help text as to why something is disabled.

            1. Alex author

              Right now, movie items are tagged in the menu structure, so the help message is the same for all. I could make the menu backend to hide the entire menu if everything there is grayed out - that would be the simplest to implement, and once the menu structure is clearly separated between major modes, it will just work.

              A little quirk in the movie menu: FPS override is also used in photo mode (e.g. for very low light situations). What should I do with it? If the movie menu is going to be hidden, I could place a copy in the Shoot menu, and show that one in photo mode.

              1. stevefal

                Moving the FPS feature (by whatever name) to the Shoot menu seems 100% reasonable in the brave world where Movie menu is hidden in Photo mode, and Shoot menu hidden in Movie mode. From the user's perspective, nothing is moved at all - each menu simply contains what is needed. This is especially true if the FPS feature is renamed something that intuitively relates to stills, unlike "FPS".

                1. Alex author

                  Makes sense - I've tried to split the FPS override menu here: https://bitbucket.org/hudson/magic-lantern/commits/f8cf96944530

                  (so the movie mode has a full-blown FPS menu with full customizations, and the photo mode only has the low-light mode and a simpler menu, renamed to Low-light FPS; also the settings between the two menus are independent, so whatever you set in the movie menu should have no effect in photo mode, and viceversa)

                  Now that all the movie menus are grayed out in photo mode, it would be very easy to hide the entire Movie tab.

                  In the Shoot menu, the silent picture feature sometimes makes use of movie mode (higher resolutions or higher FPS for burst mode). Not sure what to do with it. All others can be disabled in movie mode completely.

            2. Alex author

              I was almost ready to try hiding the movie and audio menus in photo mode, but ran into some issues:

              • on 5D2 and 50D, movie mode is enabled or disabled from ML menu (there's no dedicated switch on the body), so it would make sense to have it in the top-level movie menu (Movie mode: OFF / Canon H.264 / RAW / MJPEG / whatever). On most cameras, the "OFF" option would not be displayed, because there's a hardware button for that. But if I hide the movie tab, I'll get stuck (how do I enable the movie mode on 5D2 then?)

              • audio remote shot (photo feature) requires audio settings (maybe let the audio menu appear if you enable audio remote shot?)

              • audio menu also contains some beep settings (ML also beeps in photo mode, and you can adjust the volume or turn off the beeps).

              • voice recording is another photo feature that requires audio (currently disabled due to a bug)

              • I even have a focus assist tool based on sounds (not yet published)

              1. stevefal

                Sorry for late reply - sleeping..

                How about:

                1. Hide a tab if all its items are hidden, including via customization (this already happens)
                2. Hide a menu items aggressively based on gross mode changes, with some camera-specific exceptions.This is safer anyway because a module may have put something into one of the tabs.
                3. Put 'Audio remote shot' in the audio menu (where I will hide it).

                This way, tabs go away automatically based on gross modes and user preference.

                so:

                • If I hide 'Audio remote shot' and Beeps myself, the Audio tab will hide in Photo mode
                • On 5D2/50D, since you won't hide the "Movie mode" item (exception), the tab is automatically left visible. (but movie items will hide in photo mode)
                • In Movie mode, the Shoot tab will hide assuming all of its items were hidden.
                1. Alex author

                  Proof of concept started to work (tested on 5D2)

                  • movie menu gets hidden in photo mode
                  • when you enable RAW video, H.264-only features get grayed out
                  • LiveView menu would also hide outside LV, but the Defishing item prevents it from doing so
                  1. stevefal

                    LV items are hiding outside LV mode? Do you think that's right? I don't think of LV as a gross mode, but a transient state. Notice Canon's choice of an LV button rather than a switch. I think the LV items should be available outside LV.

                    On the other hand, I think H.264 features should be gone completely when in RAW video mode. Otherwise there's no way to know why they're disabled except probing. It's noisy and RAW is another world, another kind of shooter. Especially when compared to Canon's H.264.

                    1. Alex author

                      I made the implementation generic (if any menu has all its items grayed out, it gets hidden).

                    2. Alex author

                      If I'll hide items based on RAW or JPEG/H264, there will be some trouble in the overlays. Right now, in RAW, you can choose fast YUV zebras in LiveView, but accurate RAW zebras in QuickReview. If I'll show only the RAW overlays in RAW mode, the settings for the fast YUV zebras will disappear.

                      RAW overlays will fallback to YUV if the raw backend fails for some reason. Hiding these settings is probably not the best idea right now.

                      BTW, years ago, ML menu was also hiding movie items in photo mode, and photo items in video mode. There was an advanced mode that revealed everything. People could not find things like intervalometer (because they were in movie mode), and all the tutorials and guides advised to enable the advanced mode, right after installing. So I'm still not convinced it's a good idea to hide things.

                      1. stevefal

                        I find the presence of 8-bit YUV exposure aides to be very confusing in a RAW context. One simply doesn't know what the thresholds mean, unless you are quite intimate with the math and interrelationships of... well everything - ISO, WB, profiles, ???. It's too hard to understand and too easy to err even if you do. Who would correctly interpret YUV zebras in a RAW context? Maybe 5-10 people in the world.

                        If the RAW backend fails, and it falls back, will there be some positive indication, or will the user just be shown YUV values? I'd rather see the failure flagged as a bug than swept under the rug. (I'm a poet and don't know it)

                        Regarding hiding menus, I'd encourage giving it a try. An occasional confused user is not an indication of a fatal flaw. As features multiply something's gotta give. Simplicity does have its benefits even if the beneficiaries are not as vocal as the occasionally confused.

                        Intervalometer is indeed a stronger counterargument, because people use it precisely to make videos. So I'm not sure that example speaks to the question as fairly as most other features.

                        But again, there could be a preference that says something like "Hide empty tabs: Hide main menus when all items are hidden or disabled". Would suggest default = ON to find out if the preference can be removed over time.

                        1. Alex author

                          When the overlays fall back to YUV, it also prints "Raw error, falling back to YUV overlays" (not yet in main, it's in the black-level-fix branch, not yet merged because of lack of feedback - it's in the forum header).

                          This is not exactly a bug, since the backend can fail in normal usage too (e.g. press shutter a little longer in LiveView when taking a picture => LiveView wll overwrite the photo raw data - happens on 5D2 and 500D).

                          But choosing between fast (realtime) but approximate YUV zebras and slow RAW zebras looks like a valid use case to me.

                          edit: looks like I've missed some recent activity on the black-level-fix branch; will check.

                          1. stevefal

                            I'd encourage an approach of excluding features unless there's strong evidence they are desired, as opposed to including anything that may be valid. Advantages:

                            • UI simplicity
                            • operational errors
                            • smaller test matrix
                            • simpler documentation
                            • smaller legacy

                            If a bunch of people say, "hey, I want YUV zebras because I care more about realtime than good exposure", it can be turned on, tested etc.

                            1. Alex author

                              Alright, seems to work. Zebras, spotmeter and histogram are always RAW when you shoot RAW (photo or video), and they only show the relevant options. All other exposure tools, which only work on YUV (that is, waveform, vectorscope and false colors), are hidden.

                              In movie mode, once you enable RAW, al H.264-only items will be also hidden.

                              If you switch to JPEG or H.264, the menus will hide the RAW options and will bring back the old ones (for YUV).

                              I kinda miss the fast zebra option though, but enabling it now is quite clumsy. Undo this changeset if you want to try it: https://bitbucket.org/hudson/magic-lantern/commits/391016fd97ad

                              I also hope this will not mean a flood of "I have a ScanDisk 7777x card, but I can't find the waveform, HELP!!!"

                              1. stevefal

                                Hmm, unable to build menu-rework:

                                src/fps-engio.c:426:25: error: 'fps_criteria' undeclared (first use in this function) float new_shutter = fps_criteria ? orig_shutter : orig_shutter * default_fps / current_fps;

                              2. stevefal

                                Got it building by adding "_movie" to fps_criteria in that line. Not sure if that's right.

                                Wow! I love the pruned menus. So much more comfortable seeing only things that pertain.

                                • Not sure if Shoot menu is supposed to hide yet, but it's not happening for me.
                                • Moving RAW video item to top will make the menu reshuffle clearer (before the new menu organization, assuming that's coming)
                                • How about moving 'LV Display Presets' to first item in LiveView menu as "Presets" >
                                • Interesting to see if missing waveform etc in RAW mode generates demand for the missing features. I color-correct with waveform but so far would not shoot with it. Zebras will be my thing - probably during standby only.
                                • What's with the D menu? Can Level go in Overlay?
                                1. Alex author

                                  Possible; the branch contains some FPS reworking (simplification) which is not yet fully functional, but I needed it in order to split the menu.

                                  Shoot is not hiding yet because the items were not tagged.

                                  Yeah, the presets proposal is a good one (along with global draw renaming), and the electronic level belongs there too.

  4. stevefal

    Menu organization:

    Movie ->

    • Movie mode > (added by RAW video module)
      • Canon
      • RAW

    When “RAW"

    • Resolution >
    • Aspect ratio >
    • Audio recording (ON/OFF)
    • Tags > (suggest some button-based method rather than menu. It needs to be very accessible to be useful)
      • Note
      • Take number
    • Storage >
      • Big files : exFAT only: allow greater than 4GB files; not supported on all models
      • Group small files: Save multi-file clips in separate folders
      • Span cards: Record video file using both SD and CF cards
      • Reserve space: Write a file before recording to prevent data loss on full card. (This feature seems mysterious)
    • Record status: Type of record status display >
      • None
      • Icon
      • Top bar
    • Preview mode >
      • Auto
      • Canon
      • Greyscale
      • HaCKeD (really?)
      • HaCKeD no prev (really?)
    • FPS override
    • HDR video
    • Movie tweaks
    • Digital dolly: Software panning of the recording area (suggest killing hokey feature)
    • Performance >
      • Frame skipping: Enable if you don't mind skipping frames (for slow cards)
      • Start delay: Useful to stabilize in Photo mode (suggest disabling MLV video in Photo mode)
      • Card warm-up: Write a large file on the card at camera startup
      • Extra hacks: Slow down Canon GUI, Lock digital expo while recording
      • Buffer fill method: Method for filling buffers. Will affect write speed
      • CF-only buffers: How many of the largest buffers are for CF writing
    • Debug >
      • Debug trace: Write and execution trace to memory cards. Causes performance drop
      • Show buffer graph: Displays a graph of buffer usage and expected frames

    Collapsed, these are the 14 items (12 if Tags and Dolly are removed):

    • Movie mode >
    • Resolution >
    • Aspect ratio >
    • Audio recording
    • Tags>
    • Storage >
    • Record status >
    • Preview mode >
    • FPS override
    • HDR video
    • Movie tweaks
    • Digital dolly
    • Performance >
    • Debug >

    It hides non-RAW features:

    • REC indicator (should be subsumed into Record status and redesigned)
    • Load H264.ini
    • Gradual Exposure
    • Vignetting
    • Image fine tuning
    • Creative effects

    The current Movie menu has 9 items (5D3) and the current MLV submenu has 22 items.

    1. Alex author

      Some comments on functionality:

      • Digital dolly hotkey: currently it's the only way the window can be moved.
      • Photo mode: I thought it's disabled for good... (but since I've never used MLV myself, I didn't notice it)
      • Hacked modes: disables Canon preview to squeeze even more speed (maybe moving into Performance?)

      There are so many features there that I can't tell if all of these things are actually working (and they are probably the reason for slower performance, compared to raw_rec). This is going to take a lot of work to cleanup...

      1. stevefal

        I can't comment on the perf features themselves, beyond what we already have said. I have not used them and don't intend to unless cornered into it. But the main takeaway from the proposed menu structure is organization:

        • Entire RAW structure elevated to primary in RAW mode
        • Top level items are features, not perf/troubleshooting
        • Conceptual groups are submenus
        • Order is by importance/frequency
        • Punt stuff not needed
        • Minimize test matrix

        Re: Digital dolly, I thought it was for animated moves, not fixed moves too. But are any moves really needed? If it's actually popular, great. I just don't get it.

        Re: Hacked preview modes - according to the help text, HaCKeD can be "None" and "HaCKeD no prev" is unnecessary because we already have no overlays while recording in new GD menuitem (i.e. Draw overlays > Liveview recording = OFF)

        Can't comment on performance relative to rawrec, other than I wonder if automated profiling is being done or if it can be.

  5. stevefal

    Canon mode Movie menu (5D3, collapsed) would be 8 items:

    • Movie mode > Canon
    • Load H.264.ini
    • Gradual exposure
    • FPS override
    • HDR video
    • Vignetting
    • Image fine-tuning >
    • Movie tweaks >