how to specify which section of video to transcode?

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
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

how to specify which section of video to transcode?

Post by tokyotech »

I'm having trouble with videos coming from one website. The output file is always double in length of the input. The output file will play as expected for the first half in VLC media player. Then the second half will have no video, but has the audio track repeated.

Is there anyway to tell Handbrake that I only want 0:00 to 8:51 rather than it wrongfully assuming it's 8:51 x 2 = 17:42 in length? Many other transcoding software programs that I have used allowed you to specify which part of the video you want to transcode to avoid this doubling problem. It's also very useful to do a short 1 minute test run from, say, 5:01 to 5:02, instead of spend 6 hours waiting and hoping that you've set the parameters correctly.

Code: Select all

### Windows GUI 0.9.4 2009112300 
### Running: Microsoft Windows NT 6.0.6002 Service Pack 2 
###
### CPU: Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz 
### Ram: 4093 MB 
### Screen: 1680x1050 
### Temp Dir: C:\Users\Name\AppData\Local\Temp\ 
### Install Dir: C:\Program Files (x86)\Handbrake 
### Data Dir: C:\Users\Name\AppData\Roaming\HandBrake\HandBrake\0.9.4.0 
#########################################

### CLI Query:  -i "C:\Users\Name\Downloads\video.avi" -t 1 -c 1 -o "C:\output\video-1.mp4" -f mp4 -w 896 -l 496 -e x264 -b 700 -2  -a 1 -E faac -6 stereo -R Auto -B 96 -D 0.0 -x b-adapt=2:rc-lookahead=50:direct=auto:me=umh:vbv-maxrate=1900:weightb=0:trellis=2:8x8dct=0:no-fast-pskip=1 -v 1
### Custom Query: False

#########################################

[22:04:37] hb_init: checking cpu count
[22:04:37] hb_init: starting libhb thread
HandBrake 0.9.4 (2009112300) - MinGW i386 - http://handbrake.fr
2 CPUs detected
Opening C:\Users\Name\Downloads\video.avi...
[22:04:37] hb_scan: path=C:\Users\Name\Downloads\video.avi, title_index=1
[22:04:37] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[22:04:37] dvd: not a dvd - trying as a stream/file instead
Input #0, avi, from 'C:\Users\Name\Downloads\video.avi':
  Duration: 00:08:51.14, start: 0.000000, bitrate: 3232 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1440x1080 [PAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 29.97 tbc
    Stream #0.1: Audio: mp3, 16000 Hz, stereo, s16, 56 kb/s
[22:04:37] scan: decoding previews for title 1
[mpeg4 @ 0x1a59d80]frame skip 8
Scanning title 1...
[22:04:37] scan: could not get a decoded picture
[22:04:37] scan: could not get a decoded picture
[22:04:37] scan: 8 previews, 1440x1080, 29.970 fps, autocrop = 136/136/0/0, aspect 4:3, PAR 1:1
[22:04:37] scan: title (0) job->width:1456, job->height:816
[22:04:37] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 0, ttn 0, cells 0->0 (0 blocks)
  + angle(s) 0
  + duration: 00:08:51
  + size: 1440x1080, pixel aspect: 1/1, display aspect: 1.33, 29.970 fps
  + autocrop: 136/136/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:08:51
  + audio tracks:
    + 1, Unknown (MP3) (iso639-2: und)
  + subtitle tracks:
Invalid sample rate 0, using input rate 16000
[22:04:37] 2 job(s) to process
[22:04:37] starting job
[22:04:37] job configuration:
[22:04:37]  * source
[22:04:37]    + C:\Users\Name\Downloads\video.avi
[22:04:37]    + title 1, chapter(s) 1 to 1
[22:04:37]    + container: avi
[22:04:37]    + data rate: 3232 kbps
[22:04:37]  * destination
[22:04:37]    + C:\output\video-1.mp4
[22:04:37]    + container: MPEG-4 (.mp4 and .m4v)
[22:04:37]  * video track
[22:04:37]    + decoder: mpeg4
[22:04:37]    + frame rate: same as source (around 29.970 fps)
[22:04:37]    + dimensions: 1440 * 1080 -> 896 * 496, crop 136/136/0/0
[22:04:37]    + encoder: x264
[22:04:37]      + options: b-adapt=2:rc-lookahead=50:direct=auto:me=umh:vbv-maxrate=1900:weightb=0:trellis=2:8x8dct=0:no-fast-pskip=1
[22:04:37]      + bitrate: 700 kbps, pass: 1
[22:04:37]  * audio track 0
[22:04:37]    + decoder: Unknown (MP3) (track 1, id 1)
[22:04:37]    + mixdown: Stereo
[22:04:37]    + encoder: faac
[22:04:37]      + bitrate: 96 kbps, samplerate: 16000 Hz
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[22:04:37] dvd: not a dvd - trying as a stream/file instead
[22:04:37] encx264: keyint-min: 30, keyint-max: 300
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[22:04:37] reader: first SCR 0 id 0 DTS 0
[mpeg4 @ 0x2a208e0]frame skip 8
x264 [warning]: VBV maxrate specified, but no bufsize.
x264 [info]: profile Main, level 3.1
[22:04:37] encfaac changing output samplerate from 16000 to 22050
[22:04:37] sync: expecting 15948 video frames
[22:24:47] reader: done. 1 scr changes
[22:24:48] sync: got 15912 frames, 15948 expected
[22:24:48] work: average encoding speed for job is 13.118247 fps
[22:24:52] mpeg4-decoder done: 15913 frames, 0 decoder errors, 0 drops
[22:24:52] render: lost time: 0 (0 frames)
[22:24:52] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:76    Avg QP:18.02  size: 36412  PSNR Mean Y:47.24 U:50.77 V:51.72 Avg:48.19 Global:47.65
x264 [info]: frame P:5503  Avg QP:21.28  size:  5964  PSNR Mean Y:43.73 U:47.57 V:48.81 Avg:44.75 Global:44.47
x264 [info]: frame B:10333 Avg QP:26.69  size:  1118  PSNR Mean Y:44.10 U:47.78 V:48.99 Avg:45.09 Global:44.79
x264 [info]: consecutive B-frames:  0.5%  8.1% 87.9%  3.5%
x264 [info]: mb I  I16..4: 26.6%  0.0% 73.4%
x264 [info]: mb P  I16..4:  1.8%  0.0%  1.4%  P16..4: 51.1% 13.5% 10.9%  0.0%  0.0%    skip:21.4%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.1%  B16..8: 33.1%  0.3%  0.4%  direct: 1.1%  skip:64.8%  L0:28.9% L1:67.6% BI: 3.5%
x264 [info]: final ratefactor: 22.25
x264 [info]: direct mvs  spatial:85.5% temporal:14.5%
x264 [info]: coded y,uvDC,uvAC intra: 50.7% 62.5% 29.7% inter: 7.2% 11.8% 0.6%
x264 [info]: i16 v,h,dc,p: 44% 14%  8% 33%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 13% 18%  6%  7%  8%  5%  7%  3%
x264 [info]: Weighted P-Frames: Y:3.5%
x264 [info]: ref P L0: 70.7%  8.6% 17.3%  2.4%  1.0%
x264 [info]: ref B L0: 92.9%  7.1%
x264 [info]: SSIM Mean Y:0.9803278
x264 [info]: PSNR Mean Y:43.986 U:47.720 V:48.943 Avg:44.988 Global:44.690 kb/s:710.20
[22:24:52] mp3-decoder done: 0 frames, 0 decoder errors, 0 drops
[22:24:52] starting job
[22:24:52] job configuration:
[22:24:52]  * source
[22:24:52]    + C:\Users\Name\Downloads\video.avi
[22:24:52]    + title 1, chapter(s) 1 to 1
[22:24:52]    + container: avi
[22:24:52]    + data rate: 3232 kbps
[22:24:52]  * destination
[22:24:52]    + C:\output\video-1.mp4
[22:24:52]    + container: MPEG-4 (.mp4 and .m4v)
[22:24:52]  * video track
[22:24:52]    + decoder: mpeg4
[22:24:52]    + frame rate: same as source (around 29.970 fps)
[22:24:52]    + dimensions: 1440 * 1080 -> 896 * 496, crop 136/136/0/0
[22:24:52]    + encoder: x264
[22:24:52]      + options: b-adapt=2:rc-lookahead=50:direct=auto:me=umh:vbv-maxrate=1900:weightb=0:trellis=2:8x8dct=0:no-fast-pskip=1
[22:24:52]      + bitrate: 700 kbps, pass: 2
[22:24:52]  * audio track 0
[22:24:52]    + decoder: Unknown (MP3) (track 1, id 1)
[22:24:52]    + mixdown: Stereo
[22:24:52]    + encoder: faac
[22:24:52]      + bitrate: 96 kbps, samplerate: 16000 Hz
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[22:24:52] dvd: not a dvd - trying as a stream/file instead
[22:24:52] encx264: keyint-min: 30, keyint-max: 300
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
[22:24:52] reader: first SCR 0 id 0 DTS 0
[mpeg4 @ 0x1ae5960]frame skip 8
x264 [warning]: VBV maxrate specified, but no bufsize.
x264 [info]: profile Main, level 3.1
[22:24:53] encfaac changing output samplerate from 16000 to 22050
[22:24:53] sync: expecting 15912 video frames
[22:40:51] reader: done. 1 scr changes
[22:41:06] sync: got 15912 frames, 15912 expected
[22:41:06] work: average encoding speed for job is 16.356176 fps
x264 [info]: profile Main, level 3.1
[22:24:53] encfaac changing output samplerate from 16000 to 22050
[22:24:53] sync: expecting 15912 video frames
[22:40:51] reader: done. 1 scr changes
[22:41:06] sync: got 15912 frames, 15912 expected
[22:41:06] work: average encoding speed for job is 16.356176 fps
[22:41:08] mux: track 0, 15912 frames, 46469682 bytes, 350.01 kbps, fifo 16
[22:41:08] mux: track 1, 22875 frames, 10089431 bytes, 75.99 kbps, fifo 16384
[22:41:08] mpeg4-decoder done: 15913 frames, 0 decoder errors, 0 drops
[22:41:08] render: lost time: 0 (0 frames)
[22:41:08] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:76    Avg QP:18.17  size: 35124  PSNR Mean Y:47.06 U:50.64 V:51.58 Avg:48.02 Global:47.45
x264 [info]: frame P:5503  Avg QP:21.37  size:  5851  PSNR Mean Y:43.68 U:47.53 V:48.78 Avg:44.70 Global:44.47
x264 [info]: frame B:10333 Avg QP:26.82  size:  1123  PSNR Mean Y:44.05 U:47.75 V:48.96 Avg:45.05 Global:44.79
x264 [info]: consecutive B-frames:  0.5%  8.1% 87.9%  3.5%
x264 [info]: mb I  I16..4: 27.1%  0.0% 72.9%
x264 [info]: mb P  I16..4:  1.8%  0.0%  1.4%  P16..4: 50.8% 13.3% 10.9%  0.0%  0.0%    skip:21.7%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.1%  B16..8: 33.2%  0.3%  0.5%  direct: 1.1%  skip:64.6%  L0:28.6% L1:68.0% BI: 3.4%
x264 [info]: direct mvs  spatial:74.0% temporal:26.0%
x264 [info]: coded y,uvDC,uvAC intra: 51.0% 63.0% 29.4% inter: 7.1% 11.9% 0.5%
x264 [info]: i16 v,h,dc,p: 44% 14%  8% 34%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 13% 18%  6%  7%  9%  5%  7%  3%
x264 [info]: Weighted P-Frames: Y:3.5%
x264 [info]: ref P L0: 69.8%  8.9% 18.3%  2.3%  0.6%
x264 [info]: ref B L0: 92.7%  7.3%
x264 [info]: SSIM Mean Y:0.9803465
x264 [info]: PSNR Mean Y:43.939 U:47.685 V:48.912 Avg:44.944 Global:44.689 kb/s:700.16
[22:41:08] mp3-decoder done: 0 frames, 0 decoder errors, 0 drops
[22:41:08] libhb: work result = 0

Rip done!
HandBrake has exited.


 ############ End of Log ############## 
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: how to specify which section of video to transcode?

Post by TedJ »

Have you tried the nightly build? HB 0.9.4 had occasional issues with audio tracks with sample rates below 22 KHz.
mduell
Veteran User
Posts: 8206
Joined: Sat Apr 21, 2007 8:54 pm

Re: how to specify which section of video to transcode?

Post by mduell »

The nightlies have support for encoding with arbitrary start and stop times.
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

Re: how to specify which section of video to transcode?

Post by tokyotech »

Where is this "nightly build"? I went through all sections of the main site and could not find it. Is there an installer for it because I don't know anything about compiling.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: how to specify which section of video to transcode?

Post by TedJ »

Sorry, should have mentioned it's in the forum announcements, at the top of each forum page.

http://forum.handbrake.fr/viewtopic.php?f=11&t=15901
mduell
Veteran User
Posts: 8206
Joined: Sat Apr 21, 2007 8:54 pm

Re: how to specify which section of video to transcode?

Post by mduell »

tokyotech wrote:Where is this "nightly build"? I went through all sections of the main site and could not find it. Is there an installer for it because I don't know anything about compiling.
It's linked to in the announcements at the top of every forum.
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

Re: how to specify which section of video to transcode?

Post by tokyotech »

I confirmed that the nightly build 0.9.4.3293 does not double the length of my weird files. It worked great.

I didn't see where to specify which section of the video I wanted to transcode. Where was this feature added to the nightly build?
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: how to specify which section of video to transcode?

Post by TedJ »

Arbitrary start and end times are only available in the CLI release for the moment.
Deleted User 11865

Re: how to specify which section of video to transcode?

Post by Deleted User 11865 »

TedJ wrote:Arbitrary start and end times are only available in the CLI release for the moment.
No, they're available in all UIs, AFAIK.

In the MacGUI, you select Seconds or Frames instead of Chapters and specify the start/end times or start/end frames.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: how to specify which section of video to transcode?

Post by TedJ »

You're quite correct, Rodeo. I'm normally do entire movies or episodes so never look at the start/end controls, otherwise I'd have noticed the extra combobox. :oops:
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

Re: how to specify which section of video to transcode?

Post by tokyotech »

I would gladly completely switch over to the nightly build to fix this doubling issue, but it fails to generate playable files for older media players. Is the nightly build using a different muxing or advanced x264 options that old media players can't understand? The videos it generates play fine in VLC 1.0+ but do not play in VLC 0.8.6. One video streaming website that I often visit bases their plugin on VLC 0.8.6, so I'm no longer able to stream videos generated by the nightly build. The video will be gray 90% of the frame with little bits of movement in the other 10%. Not surprisingly, videos transcoded by VLC 1.0+ also have the same symptom when played back on VLC 0.8.6.
Deleted User 11865

Re: how to specify which section of video to transcode?

Post by Deleted User 11865 »

Encode log please.
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

Re: how to specify which section of video to transcode?

Post by tokyotech »

Rodeo wrote:Encode log please.
Scroll up to the original post.
Deleted User 11865

Re: how to specify which section of video to transcode?

Post by Deleted User 11865 »

That's a log for 0.9.4. You're still using the same non-working vbv settings?
mduell
Veteran User
Posts: 8206
Joined: Sat Apr 21, 2007 8:54 pm

Re: how to specify which section of video to transcode?

Post by mduell »

tokyotech wrote:I would gladly completely switch over to the nightly build to fix this doubling issue, but it fails to generate playable files for older media players. Is the nightly build using a different muxing or advanced x264 options that old media players can't understand? The videos it generates play fine in VLC 1.0+ but do not play in VLC 0.8.6. One video streaming website that I often visit bases their plugin on VLC 0.8.6, so I'm no longer able to stream videos generated by the nightly build. The video will be gray 90% of the frame with little bits of movement in the other 10%. Not surprisingly, videos transcoded by VLC 1.0+ also have the same symptom when played back on VLC 0.8.6.
Where's your encode log, from the nightly, for this issue?
Deleted User 11865

Re: how to specify which section of video to transcode?

Post by Deleted User 11865 »

After a quick test I can reproduce the issue. It seems VLC 0.8.6 doesn't like the weightp change made in x264-r1555. You need to disable it (weightp=0 or use the widget).

Also, if you're targeting VLC only, there's no reason to disable either 8x8dct or weightb.
tokyotech
Posts: 19
Joined: Sat Apr 24, 2010 9:26 am

Re: how to specify which section of video to transcode?

Post by tokyotech »

Rodeo,

You are correct. I no longer have the nightly build, but I did a quick test on VLC 1.1.4 transcoding:

Code: Select all

#transcode{vb=750,height=480,venc=x264{weightp=0},vcodec=h264,acodec=mp3,ab=96,channels=2,threads=2}:duplicate{dst=standard{access=http,mux=asf,dst=localhost:1234}}
The video plays fine in VLC 0.8.6. There's no more grayness and crashing.
Post Reply