Using vfr Causes Video To Be Weirdly Jumpy

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
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
Blairboy
Posts: 17
Joined: Thu Feb 28, 2008 5:08 pm

Using vfr Causes Video To Be Weirdly Jumpy

Post by Blairboy »

I've tried this with the latest svn build and 0.92. Using the --vfr flag causes some weird results. If I play the resultant video (I tried special features from Shaun Of The Dead and an episode of Friends) in totem-xine or mplayer, the sound is in sync, but the video is all jumpy and whatnot. If I play it in vlc, the video is fine, but the audio is jumpy at parts. I wanted to use the vfr to get rid the interlacing on these videos, but its being all kinds of strange. Anybody know something I don't?

Also, here's what a partial encode gave me using vfr in the svn compile

Code: Select all

$ ./HandBrakeCLI -i /dev/hdc -E ac3 -a1 -t6 -e x264 -T -b 2000 -x bframes=6:me=umh:subme=7:b-rdo:cabac:analyse=all:8x8dct:b-pyramid -V -o /home/munkduckpup/Desktop/Friends\ s01e01.mkv -P -v
[14:07:58] hb_init: checking cpu count
[14:07:58] hb_init: starting libhb thread
[14:07:58] thread 40800950 started ("libhb")
HandBrake 0.9.3svn1368 (2008040201) - http://handbrake.m0k.org/
1 CPU detected
Opening /dev/hdc...
[14:07:58] hb_scan: path=/dev/hdc, title_index=6
[14:07:58] thread 41001950 started ("scan")
[14:07:58] scan: trying to open with libdvdread
[14:07:58] scan: DVD has 16 title(s)
[14:07:58] scan: scanning title 6
[14:07:58] scan: opening IFO for VTS 2
[14:07:58] pgc_id: 1, pgn: 1: pgc: 0xe244f0
[14:07:58] scan: vts=2, ttn=1, cells=0->0, blocks=0->552568, 552569 blocks
[14:07:58] scan: duration is 00:29:37 (1777233 ms)
[14:07:58] scan: checking audio 1
[14:07:58] scan: id=80bd, lang=English (AC3), 3cc=eng
[14:07:58] scan: checking audio 2
[14:07:58] scan: id=81bd, lang=English (AC3), 3cc=eng
[14:07:58] scan: checking subtitle 1
[14:07:58] scan: id=20bd, lang=English, 3cc=eng
[14:07:58] scan: checking subtitle 2
[14:07:58] scan: id=21bd, lang=Francais, 3cc=fra
[14:07:58] scan: checking subtitle 3
[14:07:58] scan: id=22bd, lang=Espanol, 3cc=spa
[14:07:58] scan: checking subtitle 4
[14:07:58] scan: id=23bd, lang=Korean, 3cc=kor
[14:07:58] scan: checking subtitle 5
[14:07:58] scan: id=24bd, lang=Korean, 3cc=kor
[14:07:58] scan: title 6 has 1 chapters
[14:07:58] scan: chap 1 c=0->0, b=0->552568 (552569), 1777233 ms
[14:07:58] scan: aspect = 12
[14:07:58] scan: decoding previews for title 6
[14:07:58] scan: preview 1
[14:07:58] scan: AC3, rate=48000Hz, bitrate=384000
[14:07:58] scan: AC3, rate=48000Hz, bitrate=192000
[14:07:58] scan: preview 2
[14:07:58] Interlacing detected in preview frame 1
Scanning title 6...
[14:07:58] scan: preview 3
[14:07:58] scan: preview 4
[14:07:58] Interlacing detected in preview frame 3
[14:07:58] scan: preview 5
[14:07:58] Interlacing detected in preview frame 4
[14:07:58] scan: preview 6
[14:07:59] Interlacing detected in preview frame 5
[14:07:59] scan: preview 7
Scanning title 6...
[14:07:59] Interlacing detected in preview frame 6
[14:07:59] scan: preview 8
[14:07:59] Interlacing detected in preview frame 7
[14:07:59] scan: preview 9
[14:07:59] scan: preview 10
[14:07:59] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/6/6, aspect 4:3
[14:07:59] Title is likely interlaced or telecined (6 out of 10 previews). You should do something about that.
[14:07:59] scan: title (0) job->width:624, job->height:480
[14:07:59] thread 41001950 exited ("scan")
[14:07:59] thread 41001950 joined ("scan")
[14:07:59] libhb: scan thread found 1 valid title(s)
+ title 6:
  + vts 2, ttn 1, cells 0->0 (552569 blocks)
  + duration: 00:29:37
  + size: 720x480, aspect: 1.33, 29.970 fps
  + autocrop: 0/0/6/6
  + chapters:
    + 1: cells 0->0, 552569 blocks, duration 00:29:37
  + audio tracks:
    + 1, English (AC3) (5.0 ch), 48000Hz, 384000bps
    + 2, English (AC3) (2.0 ch), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng)
    + 2, Francais (iso639-2: fra)
    + 3, Espanol (iso639-2: spa)
    + 4, Korean (iso639-2: kor)
    + 5, Korean (iso639-2: kor)
  + combing detected, may be interlaced or telecined
[14:07:59] thread 41001950 started ("work")
[14:07:59] 1 job(s) to process
[14:07:59] starting job
[14:07:59]  + device /dev/hdc
[14:07:59]  + title 6, chapter(s) 1 to 1
[14:07:59]  + 720x480 -> 704x480, crop 0/0/6/6
[14:07:59]  + filters
[14:07:59]    + Detelecine (pullup) (default settings)
[14:07:59]  + video frame rate: variable (detected 29.970 fps)
[14:07:59]  + video bitrate 2000 kbps, pass 0
[14:07:59]  + PixelRatio: 2, width:704, height: 480
[14:07:59]  + encoder x264
[14:07:59]    + x264 options: bframes=6:me=umh:subme=7:b-rdo:cabac:analyse=all:8x8dct:b-pyramid
[14:07:59]  + audio track 0
[14:07:59]    + input track 0
[14:07:59]    + AC3 passthrough
[14:07:59]      + 80bd, English (AC3) (5.0 ch)
[14:07:59]        + Requested mixdown: Dolby Pro Logic II (HB_AMIXDOWN_DOLBYPLII)
[14:07:59]        + Actual mixdown: Dolby Pro Logic II (HB_AMIXDOWN_DOLBYPLII)
[14:07:59] thread 41802950 started ("reader")
[14:07:59]  + output: /home/munkduckpup/Desktop/Friends s01e01.mkv
[14:07:59] thread 42003950 started ("muxer")
[14:07:59] thread 42804950 started ("MPEG-2 decoder (libmpeg2)")
[14:07:59] thread 43005950 started ("Renderer")
[14:07:59] dvd: Beginning of Cell (0) at block 0
[14:07:59] reader: first SCR 146 scr_offset 31263
[14:07:59] encx264: keyint-min: 30, keyint-max: 300
[14:07:59] encx264: encoding with stored aspect 629/704
[14:07:59] encx264: opening libx264 (pass 0)
x264 [info]: using SAR=629/704
x264 [info]: using cpu capabilities: MMX MMXEXT SSE SSE2 3DNow! 
[14:07:59] thread 43806950 started ("H.264/AVC encoder (libx264)")
No accelerated IMDCT transform found
[14:07:59] thread 44007950 started ("AC3 decoder")
[14:07:59] sync: expecting 53293 video frames
Encoding: task 1 of 1, 0.01 %[14:07:59] sync: audio 0 time went backwards 66 ms, dropped 3 frames (next -6006, current 0)
Encoding: task 1 of 1, 5.80 % (7.90 fps, avg 7.11 fps, ETA 01h57m40s)Signal 2 received, terminating - do it again in case it gets stuck
Encoding: task 1 of 1, 5.81 % (7.90 fps, avg 7.11 fps, ETA 01h57m40s)[14:15:14] thread 43005950 exited ("Renderer")
[14:15:14] thread 42804950 exited ("MPEG-2 decoder (libmpeg2)")
[14:15:14] thread 44007950 exited ("AC3 decoder")
[14:15:14] thread 42804950 joined ("MPEG-2 decoder (libmpeg2)")
[14:15:14] thread 43005950 joined ("Renderer")
[14:15:14] render: lost time: 1717716 (572 frames)
[14:15:14] render: gained time: 1717716 (2241 frames) (0 not accounted for)
[14:15:14] render: average dropped frame duration: 3003
[14:15:14] fifo_close: trashing 0 buffer(s)
[14:15:14] fifo_close: trashing 2 buffer(s)
[14:15:14] reader: done. 0 scr changes
[14:15:14] thread 41802950 exited ("reader")
[14:15:14] mux: file size, 24241802 bytes
[14:15:14] mux: track 0, 19263681 bytes, 1506.29 kbps
[14:15:14] mux: video bitrate error, -6313960 bytes
[14:15:14] mux: track 1, 4909056 bytes, 383.86 kbps
[14:15:14] mux: overhead, 12.13 bytes per frame
[14:15:14] thread 42003950 exited ("muxer")
[14:15:14] thread 43806950 exited ("H.264/AVC encoder (libx264)")
[14:15:14] thread 43806950 joined ("H.264/AVC encoder (libx264)")
x264 [info]: slice I:49    Avg QP:23.90  size: 29370  PSNR Mean Y:41.00 U:43.66 V:44.44 Avg:41.71 Global:40.70
x264 [info]: slice P:1391  Avg QP:25.92  size: 10530  PSNR Mean Y:38.80 U:42.22 V:42.98 Avg:39.71 Global:38.81
x264 [info]: slice B:1059  Avg QP:25.97  size:  3010  PSNR Mean Y:39.51 U:43.22 V:44.02 Avg:40.41 Global:39.04
x264 [info]: mb I  I16..4: 15.7% 77.6%  6.6%
x264 [info]: mb P  I16..4:  6.1% 18.8%  1.5%  P16..4: 34.2% 18.7%  3.4%  0.2%  0.1%    skip:16.9%
x264 [info]: mb B  I16..4:  0.3%  1.3%  0.2%  B16..8: 38.4%  2.3%  5.1%  direct: 1.9%  skip:50.5%
x264 [info]: final ratefactor: 24.37
x264 [info]: 8x8 transform  intra:72.0%  inter:69.0%
x264 [info]: SSIM Mean Y:0.9541324
x264 [info]: PSNR Mean Y:39.145 U:42.673 V:43.446 Avg:40.044 Global:38.938 kb/s:1849.18
[14:15:14] thread 44007950 joined ("AC3 decoder")
[14:15:14] thread 41802950 joined ("reader")
[14:15:14] thread 42003950 joined ("muxer")
[14:15:14] fifo_close: trashing 2049 buffer(s)
[14:15:14] fifo_close: trashing 8 buffer(s)
[14:15:14] fifo_close: trashing 8 buffer(s)
[14:15:14] fifo_close: trashing 8 buffer(s)
[14:15:14] fifo_close: trashing 1 buffer(s)
[14:15:14] fifo_close: trashing 220 buffer(s)
[14:15:14] fifo_close: trashing 8 buffer(s)
[14:15:14] fifo_close: trashing 0 buffer(s)
[14:15:14] fifo_close: trashing 8 buffer(s)
[14:15:14] Freed 5 buffers of size 512
[14:15:14] Freed 7 buffers of size 1024
[14:15:14] Freed 2048 buffers of size 2048
[14:15:14] Freed 0 buffers of size 4096
[14:15:14] Freed 0 buffers of size 8192
[14:15:14] Freed 0 buffers of size 16384
[14:15:14] Freed 0 buffers of size 32768
[14:15:14] Freed 31 buffers of size 518400
[14:15:14] Allocated 20274432 bytes of buffers on this pass and Freed 20274432 bytes, 0 bytes leaked
[14:15:14] thread 41001950 exited ("work")
[14:15:14] thread 41001950 joined ("work")
[14:15:14] thread 40800950 exited ("libhb")
[14:15:15] thread 40800950 joined ("libhb")
HandBrake has exited.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: Using vfr Causes Video To Be Weirdly Jumpy

Post by jbrjake »

To isolate the problem, see if anything changes if you get rid of b-pyramid, and then if that doesn't work try getting rid of b-frames. If that doesn't work, try using MP4 instead of MKV. I do most of my testing with MP4. But if I turn off b-frames, I get good playback with VFR in MKV, too, using MPlayer and VLC.

So I'm not so sure it's VFR causing your video to be jumpy.
Blairboy
Posts: 17
Joined: Thu Feb 28, 2008 5:08 pm

Re: Using vfr Causes Video To Be Weirdly Jumpy

Post by Blairboy »

You're a lifesaver. It was the pyramidal b frames option that was mucking it up. As a side note, I detest telecined crap. Barg.
Post Reply