Video resize

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
frodawgg
Posts: 13
Joined: Sun Dec 21, 2014 8:48 pm

Video resize

Post by frodawgg »

Please detail your question or problem in as much detail as possible:
I'm trying to resize the picture to 1920x1152 (1.66:1 aspect ratio) (a movie I have is abnormally stretched and I think it would be fine at this AR), but it keeps resetting to 1080. I've tried every option. (The file in the log is just a test video, not the actual movie.)

Tell us about your environment. What version of HandBrake? What version of Windows are you running. etc.
0.10.0.6534
If there was any exception or error displayed, please copy it and paste it here:

Please include the scan or encode log:

Code: Select all

 CLI Query:  -i "C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4" -t 1 --angle 1 -c 1 -o "C:\Users\Jason\Videos\x.mp4"  -f mp4  -w 1920 -l 1080 --crop 0:0:0:0 --modulus 2 -e x264 -q 0 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\Jason\AppData\Local\Temp\x-1-chapters.csv" --encoder-preset=veryfast  --encoder-level="4.0"  --encoder-profile=main  --verbose=1

[23:01:41] hb_init: starting libhb thread
HandBrake 0.10.0 (2014112200) - MinGW x86_64 - https://handbrake.fr
4 CPUs detected
Opening C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4...
[23:01:41] CPU: Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz
[23:01:41]  - logical processor count: 4
[23:01:41] OpenCL: library not available
[23:01:41] Intel Quick Sync Video support: no
[23:01:41] hb_scan: path=C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4, title_index=1
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4/BDMV/index.bdmv
libbluray/bdnav/index_parse.c:162: indx_parse(): error opening C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4/BDMV/BACKUP/index.bdmv
libbluray/bluray.c:2182: nav_get_title_list(C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4) failed
[23:01:41] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
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
[23:01:41] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : X-Men: Days of Future Past
    encoder         : HandBrake 0.10.0 2014112200
  Duration: 00:02:29.18, start: 0.083000, bitrate: 19357 kb/s
    Stream #0.0(und): Video: h264 (Main), yuv420p, 1920x1080, 18915 kb/s, 23.98 fps, 90k tbn, 180k tbc (default)
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, fltp, 448 kb/s (default)
[23:01:41] scan: decoding previews for title 1
[23:01:41] scan: audio 0x1: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
Scanning title 1 of 1, preview 1, 10.00 %
Scanning title 1 of 1, preview 4, 40.00 %
Scanning title 1 of 1, preview 6, 60.00 %
Scanning title 1 of 1, preview 8, 80.00 %[23:01:42] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 132/132/0/0, aspect 16:9, PAR 1:1
Scanning title 1 of 1, preview 10, 100.00 %[23:01:42] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4
  + duration: 00:02:29
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 132/132/0/0
  + support opencl: no
  + support hwd: yes
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:02:29
  + audio tracks:
    + 1, English (AC3) (5.1 ch) (iso639-2: eng), 48000Hz, 448000bps
  + subtitle tracks:
Reading chapter markers from file C:\Users\Jason\AppData\Local\Temp\x-1-chapters.csv
[23:01:42] 1 job(s) to process
[23:01:42] starting job
[23:01:42] sync: expecting 3576 video frames
[23:01:42] work: only 1 chapter, disabling chapter markers
[23:01:42] job configuration:
[23:01:42]  * source
[23:01:42]    + C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4
[23:01:42]    + title 1, chapter(s) 1 to 1
[23:01:42]    + container: mov,mp4,m4a,3gp,3g2,mj2
[23:01:42]    + data rate: 19357 kbps
[23:01:42]  * destination
[23:01:42]    + C:\Users\Jason\Videos\x.mp4
[23:01:42]    + container: MPEG-4 (libavformat)
[23:01:42]  * video track
[23:01:42]    + decoder: h264
[23:01:42]      + bitrate 18915 kbps
[23:01:42]    + filters
[23:01:42]      + Framerate Shaper (0:27000000:1126125)
[23:01:42]        + frame rate: same as source (around 23.976 fps)
[23:01:42]      + Crop and Scale (1920:1080:0:0:0:0)
[23:01:42]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 1920 * 1080
[23:01:42]    + dimensions: 1920 * 1080, mod 2
[23:01:42]    + encoder: H.264 (libx264)
[23:01:42]      + preset:  veryfast
[23:01:42]      + profile: main
[23:01:42]      + level:   4.0
[23:01:42]      + quality: 0.00 (RF)
[23:01:42]  * audio track 1
[23:01:42]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x1)
[23:01:42]      + bitrate: 448 kbps, samplerate: 48000 Hz
[23:01:42]    + mixdown: Dolby Pro Logic II
[23:01:42]    + encoder: AAC (libavcodec)
[23:01:42]      + bitrate: 160 kbps, samplerate: 48000 Hz
[23:01:42] reader: first SCR 14940 id 0x0 DTS 7470
[23:01:42] encx264: min-keyint: 24, keyint: 240
[23:01:42] encx264: encoding at constant RF 0.000000
[23:01:42] hb_apply_h264_profile [warning]: lossless requires high444 profile, disabling
[23:01:42] encx264: unparsed options: level=4.0:ref=1:8x8dct=0:weightp=1:subme=2:mixed-refs=0:trellis=0:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=10
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x264 [info]: profile Main, level 4.0
[23:01:43] sync: first pts is 7470

Woodstock
Veteran User
Posts: 3680
Joined: Tue Aug 27, 2013 6:39 am

Re: Video resize

Post by Woodstock »

You cannot do this with the graphic interface - it does not allow upscaling. But you still have the command line information available in the log:
CLI Query: -i "C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4" -t 1 --angle 1 -c 1 -o "C:\Users\Jason\Videos\x.mp4" -f mp4 -w 1920 -l 1080 --crop 0:0:0:0 --modulus 2 -e x264 -q 0 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\Jason\AppData\Local\Temp\x-1-chapters.csv" --encoder-preset=veryfast --encoder-level="4.0" --encoder-profile=main --verbose=1
You have to plug in the path to your handbrakeCLI.exe program at the beginning, and change the "-l 1080" to "-l 1152".

Remember, though, that not all players will accept the video after this - several I've worked with reject even 1088 line video on playback.

mduell
Veteran User
Posts: 7151
Joined: Sat Apr 21, 2007 8:54 pm

Re: Video resize

Post by mduell »

No sense in increasing the storage resolution, that quality ship has sailed. You can use custom anamorphic to have the player correct the AR.

frodawgg
Posts: 13
Joined: Sun Dec 21, 2014 8:48 pm

Re: Video resize

Post by frodawgg »

Woodstock, if you don't mind, how do I plug that into the exe program?

mduell, I tried the custom anamorphic (even the PAR). If I can't upscale (which I didn't realize I was doing, but it makes sense looking at the number increase), is there another way to "squish" an image so that it doesn't appear stretched?

Screenshot examples of the movie in question are here:

http://www.dvdtalk.com/reviews/69959/eight-men-out/

(Sorry, I wanted to insert the pics here but wasn't sure how.)


I should have mentioned that I am in no way knowledgeable in this field (above the basics), but I'll try to make it as least frustrating as possible to get things across to me. :roll:

Thanks for the responses!

mduell
Veteran User
Posts: 7151
Joined: Sat Apr 21, 2007 8:54 pm

Re: Video resize

Post by mduell »

Use the CLI and custom anamorphic to achieve your desired result.

I was disagreeing with Woodstock's post where he proposes increasing the storage resolution. But he was correct you should be using the CLI, the only proper interface for HB.

rollin_eng
Veteran User
Posts: 3473
Joined: Wed May 04, 2011 11:06 pm

Re: Video resize

Post by rollin_eng »

You should also update to the latest version and probably change your rf value.

Woodstock
Veteran User
Posts: 3680
Joined: Tue Aug 27, 2013 6:39 am

Re: Video resize

Post by Woodstock »

Using the CLI involves opening a CMD window. Click on Start, and type "cmd" followed by the enter key, and you're there.

Welcome to the dark side.... where you can specify things that can't be done in the GUI, but you have to do them all yourself.

frodawgg
Posts: 13
Joined: Sun Dec 21, 2014 8:48 pm

Re: Video resize

Post by frodawgg »

Haha...I'll see what I can figure out, but I'll probably be back soon.

frodawgg
Posts: 13
Joined: Sun Dec 21, 2014 8:48 pm

Re: Video resize

Post by frodawgg »

Woodstock wrote:You cannot do this with the graphic interface - it does not allow upscaling. But you still have the command line information available in the log:
CLI Query: -i "C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4" -t 1 --angle 1 -c 1 -o "C:\Users\Jason\Videos\x.mp4" -f mp4 -w 1920 -l 1080 --crop 0:0:0:0 --modulus 2 -e x264 -q 0 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\Jason\AppData\Local\Temp\x-1-chapters.csv" --encoder-preset=veryfast --encoder-level="4.0" --encoder-profile=main --verbose=1
You have to plug in the path to your handbrakeCLI.exe program at the beginning, and change the "-l 1080" to "-l 1152".

Remember, though, that not all players will accept the video after this - several I've worked with reject even 1088 line video on playback.
OK. So I did that, but it seems to just be playing the original video file, and I don't think it's saving it anywhere ("C:\Users\Jason\Videos\x.mp4" doesn't exist).

Woodstock
Veteran User
Posts: 3680
Joined: Tue Aug 27, 2013 6:39 am

Re: Video resize

Post by Woodstock »

Did you get a lot of log information on the screen?

Try this, assuming you have standard installation of handbrake with the CLI in the directory "C:\Program Files\Handbrake": Copy the following into your clipboard, then paste it into the command line as one line (it has your resized height in it):

Code: Select all

"C:\Program Files\Handbrake\HandBrakeCLI.exe"  -i "C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4" -t 1 --angle 1 -c 1 -o "C:\Users\Jason\Videos\x.mp4" -f mp4 -w 1920 -l 1152 --crop 0:0:0:0 --modulus 2 -e x264 -q 0 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\Jason\AppData\Local\Temp\x-1-chapters.csv" --encoder-preset=veryfast --encoder-level="4.0" --encoder-profile=main --verbose=1
You should see a lot of information on the screen as it scrolls by; it can be captured to a file named "handbrakelog.txt" with a few characters added to the end:

Code: Select all

"C:\Program Files\Handbrake\HandBrakeCLI.exe"  -i "C:\Users\Jason\Videos\X-Men DoFP - Trailer 3.mp4" -t 1 --angle 1 -c 1 -o "C:\Users\Jason\Videos\x.mp4" -f mp4 -w 1920 -l 1152 --crop 0:0:0:0 --modulus 2 -e x264 -q 0 --vfr -a 1 -E av_aac -6 dpl2 -R Auto -B 160 -D 0 --gain 0 --audio-fallback ac3 --markers="C:\Users\Jason\AppData\Local\Temp\x-1-chapters.csv" --encoder-preset=veryfast --encoder-level="4.0" --encoder-profile=main --verbose=1 2>handbrakelog.txt
That file would be what we would look at to see how handbrake handled the encode.

frodawgg
Posts: 13
Joined: Sun Dec 21, 2014 8:48 pm

Re: Video resize

Post by frodawgg »

Voila!

It seems to have done it!

The only issue I foresee now--which you may or may not be able to help me with--is that Eight Men Out is presented in 1.85:1, which has the very thin black bars on the top and bottom (as opposed to 1.66, which fills vertically). I don't know if I'd be able to compromise this with a slightly different width, or even if those lines are so insignificant that the picture will still look correct after resizing. I'll run some trials and see what works.

Either way, my friend, you have succeeded in the task at hand. Thank you so much!

Woodstock
Veteran User
Posts: 3680
Joined: Tue Aug 27, 2013 6:39 am

Re: Video resize

Post by Woodstock »

Handbrake, with its default "auto crop" setting, will remove the bars, and encode only the actual picture. The player then adds the bars back in, as needed, to match the display. This normally is no need to preserve the bars.

Except when you do need to.

I have several anime series where the subtitles provided are intended to mostly be in the black bars encoded on the disk. For those, I turn off cropping, so the subtitle images aren't resized weirdly by the player.

frodawgg
Posts: 13
Joined: Sun Dec 21, 2014 8:48 pm

Re: Video resize

Post by frodawgg »

Aah, gotcha. Thanks!

Post Reply