New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose Preset before source file is first opened. #1773

Open
pixelstuff opened this Issue Dec 31, 2018 · 9 comments

Comments

3 participants
@pixelstuff
Copy link

pixelstuff commented Dec 31, 2018

Describe the change or feature you'd like to see added to HandBrake:

I would like the ability to choose a preset before opening the first file. Currently it applies the default preset automatically to the first file opened. The reason it would help to choose the preset first is I have noticed that some parts of the preset (file scan related) don't automatically apply when you choose the preset after the file is opened. You have to reopen the file to get the preset applied properly to that file. It would save some time if we could just go ahead and pick a preset immediately after opening the application, before opening the file.

What version of HandBrake are you currently using? (e.g., 1.0.0)

Handbrake v1.2.0 for Windows

What operating system and version are you running? (e.g., Ubuntu 16.04 LTS, macOS 10.3 High Sierra, Windows 10 Creators Update)

Windows 10 1809

HandBrake Activity Log (see https://handbrake.fr/docs/en/latest/help/activity-log.html)

If the request is off the back of failure or unsupported file format, please post a log as it can help us track down what is missing. 
Either post it in full here, or drag/drop the file onto GitHub to upload it.
@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Dec 31, 2018

Can you let us know what part of the preset isn’t applying correctly. You should not be seeing any difference in behaviour.

@pixelstuff

This comment has been minimized.

Copy link

pixelstuff commented Dec 31, 2018

On the dimensions tab it seems to be the width that gets stuck. But if you redrop or reopen the file it sets the width properly.

@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Dec 31, 2018

Can you provide a log of the scan of that source, and let us know what preset you used. (Export and upload it if it's custom).

We can take a look

@passat1

This comment has been minimized.

Copy link

passat1 commented Jan 1, 2019

I had similar problem and maybe could explain little further.
If preset is selected before opening (scaning) file and in preset is size limit greater than size of source video, for example preset has "Dimensions: Custom" set to size 1920x1080 and source video is 1280x720, and in main window "Dimensions" tab "Anamorphic: Custom" is selected, than width and height of output can't be set greater than those of input file (1280x720).
But, if after loading (opening) file another preset is selected, and again previous preset, then size limit is set back as defined by preset, and size could be set up to preset limit (1920x1080).
This problem could be replicated with any file that has size smaller than preset size limit.
I did not notice same problem with "Anamorphic: None"

There is not much that could be seen from log:

Cannot load nvEncodeAPI64.dll
[13:38:48] hb_init: starting libhb thread

 # Starting Scan ...

[13:38:48] CPU: Intel(R) Core(TM)2 Quad  CPU   Q9550  @ 2.83GHz
[13:38:48]  - logical processor count: 4
[13:38:48] Intel Quick Sync Video support: no
[13:38:48] hb_scan: path=D:\Videos\DOCU\_NOVO\PBS (2018) NOVA - Wonders - What's the Universe Made Of.mkv, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image D:\Videos\DOCU\_NOVO\PBS (2018) NOVA - Wonders - What's the Universe Made Of.mkv
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
[13:38:48] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[13:38:48] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'D:\Videos\DOCU\_NOVO\PBS (2018) NOVA - Wonders - What's the Universe Made Of.mkv':
  Metadata:
    encoder         : libebml v1.3.6 + libmatroska v1.4.9
    creation_time   : 2018-11-13T21:02:37.000000Z
  Duration: 00:53:11.02, start: 0.000000, bitrate: 3103 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
    Metadata:
      BPS-eng         : 2995606
      DURATION-eng    : 00:53:10.987000000
      NUMBER_OF_FRAMES-eng: 95634
      NUMBER_OF_BYTES-eng: 1194867765
      _STATISTICS_WRITING_APP-eng: mkvmerge v28.2.0 ('The Awakening') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-13 21:02:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
    Metadata:
      BPS-eng         : 105305
      DURATION-eng    : 00:53:11.018000000
      NUMBER_OF_FRAMES-eng: 149579
      NUMBER_OF_BYTES-eng: 42004104
      _STATISTICS_WRITING_APP-eng: mkvmerge v28.2.0 ('The Awakening') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-11-13 21:02:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[13:38:48] scan: decoding previews for title 1
[13:38:48] scan: audio 0x1: aac, rate=48000Hz, bitrate=1 English (AAC LC) (2.0 ch)
[13:38:51] scan: 60 previews, 1280x720, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[13:38:51] scan: supported video decoders: avcodec qsv
[13:38:51] libhb: scan thread found 1 valid title(s)

 # Processing Scan Information ...


 # Scan Finished ...

Here is my "Custom" preset:

        {
          "AlignAVStart": false,
          "AudioCopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac",
            "copy:eac3"
          ],
          "AudioEncoderFallback": "av_aac",
          "AudioLanguageList": [
            "und"
          ],
          "AudioList": [
            {
              "AudioBitrate": 192,
              "AudioCompressionLevel": 0.0,
              "AudioDitherMethod": null,
              "AudioEncoder": "av_aac",
              "AudioMixdown": "dpl2",
              "AudioNormalizeMixLevel": false,
              "AudioSamplerate": "auto",
              "AudioTrackQualityEnable": false,
              "AudioTrackQuality": -1.0,
              "AudioTrackGainSlider": 0.0,
              "AudioTrackDRCSlider": 0.0
            },
            {
              "AudioBitrate": 192,
              "AudioCompressionLevel": 0.0,
              "AudioDitherMethod": null,
              "AudioEncoder": "copy",
              "AudioMixdown": "dpl2",
              "AudioNormalizeMixLevel": false,
              "AudioSamplerate": "auto",
              "AudioTrackQualityEnable": false,
              "AudioTrackQuality": -1.0,
              "AudioTrackGainSlider": 0.0,
              "AudioTrackDRCSlider": 0.0
            }
          ],
          "AudioSecondaryEncoderMode": true,
          "AudioTrackSelectionBehavior": "first",
          "ChapterMarkers": true,
          "ChildrenArray": [],
          "Default": true,
          "FileFormat": "mp4",
          "Folder": false,
          "FolderOpen": false,
          "Mp4HttpOptimize": false,
          "Mp4iPodCompatible": false,
          "PictureAutoCrop": true,
          "PictureBottomCrop": 0,
          "PictureLeftCrop": 0,
          "PictureRightCrop": 0,
          "PictureTopCrop": 0,
          "PictureDARWidth": 1920,
          "PictureDeblock": 4,
          "PictureDeinterlaceFilter": "off",
          "PictureCombDetectPreset": "off",
          "PictureCombDetectCustom": "",
          "PictureDeinterlacePreset": null,
          "PictureDeinterlaceCustom": null,
          "PictureDenoiseCustom": "",
          "PictureDenoiseFilter": "off",
          "PictureDenoisePreset": "medium",
          "PictureDenoiseTune": "none",
          "PictureSharpenCustom": "",
          "PictureSharpenFilter": "off",
          "PictureSharpenPreset": "medium",
          "PictureSharpenTune": "none",
          "PictureDetelecine": "off",
          "PictureDetelecineCustom": "",
          "PictureItuPAR": false,
          "PictureKeepRatio": true,
          "PictureLooseCrop": false,
          "PictureModulus": 2,
          "PicturePAR": "none",
          "PicturePARWidth": 1,
          "PicturePARHeight": 1,
          "PictureRotate": "0:0",
          "PictureWidth": 1920,
          "PictureHeight": 1080,
          "PictureForceHeight": 0,
          "PictureForceWidth": 0,
          "PresetDescription": "High Profile AMD VCE x264 Hardware",
          "PresetName": "High Profile AMD VCE",
          "Type": 1,
          "UsesPictureFilters": false,
          "UsesPictureSettings": 1,
          "SubtitleAddCC": false,
          "SubtitleAddForeignAudioSearch": false,
          "SubtitleAddForeignAudioSubtitle": false,
          "SubtitleBurnBehavior": "none",
          "SubtitleBurnBDSub": false,
          "SubtitleBurnDVDSub": false,
          "SubtitleLanguageList": [
            "und"
          ],
          "SubtitleTrackSelectionBehavior": "all",
          "VideoAvgBitrate": 0,
          "VideoColorMatrixCode": 0,
          "VideoEncoder": "vce_h264",
          "VideoFramerate": null,
          "VideoFramerateMode": "cfr",
          "VideoGrayScale": false,
          "VideoScaler": "swscale",
          "VideoPreset": "quality",
          "VideoTune": "",
          "VideoProfile": "high",
          "VideoLevel": "4.1",
          "VideoOptionExtra": "",
          "VideoQualityType": 2,
          "VideoQualitySlider": 19.0,
          "VideoQSVDecode": false,
          "VideoQSVAsyncDepth": 4,
          "VideoTwoPass": false,
          "VideoTurboTwoPass": false,
          "x264Option": "",
          "x264UseAdvancedOptions": false
        },

EDIT:
Tested again with "Anamorphic: None" and situation is same, so it does not depend on "Anamorphic" selection.

@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Jan 1, 2019

The size limit is supposed to be Source then Preset, whichever is smallest. So loading 720P onto a 1080p preset should be 720p restricted. The UI shouldn't be allowing upscaling expect in one-axis which was never blocked.

Upscaling is something we may allow when re do the redesign of the picture settings pane but currently it's restricted to CLI only.

I'll leave this open until pixelstuff confirms this is the behaviour he is also seeing but I've corrected the bug that allowed the upscale to happen.

sr55 added a commit that referenced this issue Jan 1, 2019

WinGui: Fix restriction on the picture settings tab after setting a p…
…reset. It will use whatever is smaller. Source, or Preset #1773

sr55 added a commit that referenced this issue Jan 1, 2019

WinGui: Fix restriction on the picture settings tab after setting a p…
…reset. It will use whatever is smaller. Source, or Preset #1773
@passat1

This comment has been minimized.

Copy link

passat1 commented Jan 2, 2019

It seems that pixelstuff is not planing to reply.
He might be talking also about another problem.
That is "Presets" menu and presets are grayed out and all actions related to presets are not functional unless file is loaded in program.
This way all actions related to presets as selecting, setting default preset, changing, adding, updating, resetting default presets, ... , are impossible.
This program functions are not depending on video file loaded in any way, so I can see no reason for them being disabled if file is not loaded.
For me, natural working sequence is to select preset first, and then load file for encoding, according to that preset.
Maybe I'm wrong, but this is very inconvenient, specially if I want only to set up program and have no video file available at moment.
I think this limitation should be removed, unless there is some other good reason for that.

@pixelstuff

This comment has been minimized.

Copy link

pixelstuff commented Jan 2, 2019

Preset and Log.zip

The CBS/NBC preset is my default preset. It is for 16:9 content and doesn't crop anything.

When I drop a file like the 720x480 Quantum Leap episode which has side letter boxing, it needs to be cropped on the sides, so I choose my custom Quantum Leap preset which has a crop of 94 pixels on each side. However the file width doesn't get resized to 532 after the crop. I have to re-drop the file again for it to apply the crop and width properly.

I'm not sure if the log effectively shows anything because it didn't update when I chose a new preset. It wasn't until I re-dropped the file that the log updated.

@sr55

This comment has been minimized.

Copy link
Member

sr55 commented Jan 2, 2019

@pixelstuff I'll look into your case and try re-produce / fix. You shouldn't be seeing a behavioural difference.

@passat1 - The restriction is very deliberate and the result of usability studies done on HandBrake. Removing that restriction leads to a confusion situation and poor flow. The only sensible way I can think to do it would be to create a new panel that allows an entire preset to be defined, away from the main UI. Lot of work for someone most folks won't need/want.

@passat1

This comment has been minimized.

Copy link

passat1 commented Jan 3, 2019

Thanks for reply sr55
That's not a big problem. There is no need to change complete program behavior only for me.
I can deal with that and I'll always found way around to get from HB what I want :)
You can dismiss all my requests in this issue.
Now I'm more occupied with AMD VCE encoding where is much to do, but that's another story,
and interested if there is any progress with #1762.

@sr55 sr55 removed the Awaiting Feedback label Jan 3, 2019

@sr55 sr55 self-assigned this Jan 3, 2019

@sr55 sr55 added the Bug label Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment