[Resolved] [SVN 1797] Dropped Frame

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

[Resolved] [SVN 1797] Dropped Frame

Post by vidjock »

Linux suse 10.3, using CLI

Source: Terminator Special Edition

x264 options = psy-rd=1,1:bframes=3:ref=1:subme=6:me=umh:no-fast-pskip=1:trellis=2:cabac=0:vbv-maxrate=4900:vbv-bufsize=3500
CRF = 64
loosepixelratio
ac3 pass thru

Chapter 9 when Connor gets on her scooter and looks both ways down the parking garage it drops a frame and the audio. I tried the same chapter in 0.9.2 and It didn't happen. I also took out "psy-rd=1,1" and lowered subme to 5 to turn off psy-rd and psy-trellis and it still happend.

Code: Select all

[19:55:47] hb_init: checking cpu count
[19:55:47] hb_init: starting libhb thread
[19:55:47] thread b7ce9b90 started ("libhb")
HandBrake svn1797 (2008093001) - http://handbrake.fr/
2 CPUs detected
Opening /movies/TERMINATOR_SE_SIDEA/...
[19:55:47] hb_scan: path=/movies/TERMINATOR_SE_SIDEA/, title_index=1
[19:55:47] thread b74e8b90 started ("scan")
[19:55:47] scan: trying to open with libdvdread
[19:55:47] scan: DVD has 10 title(s)
[19:55:47] scan: scanning title 1
[19:55:47] scan: opening IFO for VTS 6
[19:55:47] pgc_id: 1, pgn: 1: pgc: 0x8d8abd8
[19:55:47] scan: vts=6, ttn=1, cells=0->48, blocks=0->3600788, 3600789 blocks
[19:55:47] scan: duration is 01:47:06 (6426210 ms)
[19:55:47] scan: checking audio 1
[19:55:47] scan: id=80bd, lang=English (AC3), 3cc=eng
[19:55:47] scan: checking audio 2
[19:55:47] scan: id=81bd, lang=English (AC3), 3cc=eng
[19:55:47] scan: checking audio 3
[19:55:47] scan: id=82bd, lang=Francais (AC3), 3cc=fra
[19:55:47] scan: checking audio 4
[19:55:47] scan: id=83bd, lang=Espanol (AC3), 3cc=spa
[19:55:47] scan: checking subtitle 1
[19:55:47] scan: id=23bd, lang=English, 3cc=eng
[19:55:47] scan: checking subtitle 2
[19:55:47] scan: id=24bd, lang=Francais, 3cc=fra
[19:55:47] scan: checking subtitle 3
[19:55:47] scan: id=25bd, lang=Espanol, 3cc=spa
[19:55:47] scan: title 1 has 32 chapters
[19:55:47] scan: chap 1 c=0->3, b=0->109208 (109209), 204692 ms
[19:55:47] scan: chap 2 c=4->4, b=109209->166137 (56929), 105564 ms
[19:55:47] scan: chap 3 c=5->5, b=166138->206754 (40617), 72219 ms
[19:55:47] scan: chap 4 c=6->7, b=206755->374409 (167655), 307061 ms
[19:55:47] scan: chap 5 c=8->8, b=374410->444427 (70018), 126612 ms
[19:55:47] scan: chap 6 c=9->9, b=444428->492777 (48350), 86209 ms
[19:55:47] scan: chap 7 c=10->11, b=492778->675165 (182388), 332945 ms
[19:55:47] scan: chap 8 c=12->12, b=675166->745957 (70792), 124473 ms
[19:55:47] scan: chap 9 c=13->14, b=745958->983238 (237281), 420157 ms
[19:55:47] scan: chap 10 c=15->16, b=983239->1097631 (114393), 204683 ms
[19:55:47] scan: chap 11 c=17->17, b=1097632->1283974 (186343), 332935 ms
[19:55:47] scan: chap 12 c=18->18, b=1283975->1373091 (89117), 157684 ms
[19:55:47] scan: chap 13 c=19->20, b=1373092->1587700 (214609), 381099 ms
[19:55:47] scan: chap 14 c=21->21, b=1587701->1685155 (97455), 173410 ms
[19:55:47] scan: chap 15 c=22->23, b=1685156->1819121 (133966), 241601 ms
[19:55:47] scan: chap 16 c=24->24, b=1819122->1968481 (149360), 263609 ms
[19:55:47] scan: chap 17 c=25->26, b=1968482->2131279 (162798), 287705 ms
[19:55:47] scan: chap 18 c=27->28, b=2131280->2325912 (194633), 343136 ms
[19:55:47] scan: chap 19 c=29->29, b=2325913->2479829 (153917), 272796 ms
[19:55:47] scan: chap 20 c=30->30, b=2479830->2508713 (28884), 51118 ms
[19:55:47] scan: chap 21 c=31->32, b=2508714->2587527 (78814), 138663 ms
[19:55:47] scan: chap 22 c=33->33, b=2587528->2628178 (40651), 71340 ms
[19:55:47] scan: chap 23 c=34->34, b=2628179->2781151 (152973), 270791 ms
[19:55:47] scan: chap 24 c=35->36, b=2781152->2895793 (114642), 203490 ms
[19:55:47] scan: chap 25 c=37->37, b=2895794->3029615 (133822), 237569 ms
[19:55:47] scan: chap 26 c=38->39, b=3029616->3095402 (65787), 115640 ms
[19:55:47] scan: chap 27 c=40->40, b=3095403->3215432 (120030), 212667 ms
[19:55:47] scan: chap 28 c=41->42, b=3215433->3351700 (136268), 240762 ms
[19:55:47] scan: chap 29 c=43->43, b=3351701->3364966 (13266), 25067 ms
[19:55:47] scan: chap 30 c=44->44, b=3364967->3381976 (17010), 30102 ms
[19:55:47] scan: chap 31 c=45->45, b=3381977->3463334 (81358), 143474 ms
[19:55:47] scan: chap 32 c=46->48, b=3463335->3600788 (137454), 246922 ms
[19:55:47] scan: aspect = 0
[19:55:47] scan: decoding previews for title 1
[19:55:48] scan: preview 1
[19:55:48] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[19:55:48] scan: audio 0x82bd: AC-3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch)
[19:55:48] scan: audio 0x83bd: AC-3, rate=48000Hz, bitrate=448000 Espanol (AC3) (5.1 ch)
[19:55:48] scan: audio 0x81bd: AC-3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch)
[19:55:48] scan: preview 2
[19:55:48] scan: preview 3
[19:55:48] scan: preview 4
Scanning title 1...
[19:55:48] scan: preview 5
[19:55:48] scan: preview 6
[19:55:48] Title's mostly NTSC Film, setting fps to 23.976
[19:55:48] scan: preview 7
[19:55:48] scan: preview 8
[19:55:48] scan: preview 9
Scanning title 1...
[19:55:48] scan: preview 10
[19:55:48] scan: content PAR gives wrong aspect 1.78; using container aspect 1.78
[19:55:48] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/8/0/2, aspect 1.78:1, PAR 853:720
[19:55:48] scan: title (0) job->width:720, job->height:400
[19:55:48] thread b74e8b90 exited ("scan")
[19:55:48] thread b74e8b90 joined ("scan")
[19:55:48] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 6, ttn 1, cells 0->48 (3600789 blocks)
  + duration: 01:47:06
  + size: 720x480, aspect: 1.78, 23.976 fps
  + autocrop: 0/8/0/2
  + chapters:
    + 1: cells 0->3, 109209 blocks, duration 00:03:25
    + 2: cells 4->4, 56929 blocks, duration 00:01:46
    + 3: cells 5->5, 40617 blocks, duration 00:01:12
    + 4: cells 6->7, 167655 blocks, duration 00:05:07
    + 5: cells 8->8, 70018 blocks, duration 00:02:07
    + 6: cells 9->9, 48350 blocks, duration 00:01:26
    + 7: cells 10->11, 182388 blocks, duration 00:05:33
    + 8: cells 12->12, 70792 blocks, duration 00:02:04
    + 9: cells 13->14, 237281 blocks, duration 00:07:00
    + 10: cells 15->16, 114393 blocks, duration 00:03:25
    + 11: cells 17->17, 186343 blocks, duration 00:05:33
    + 12: cells 18->18, 89117 blocks, duration 00:02:38
    + 13: cells 19->20, 214609 blocks, duration 00:06:21
    + 14: cells 21->21, 97455 blocks, duration 00:02:53
    + 15: cells 22->23, 133966 blocks, duration 00:04:02
    + 16: cells 24->24, 149360 blocks, duration 00:04:24
    + 17: cells 25->26, 162798 blocks, duration 00:04:48
    + 18: cells 27->28, 194633 blocks, duration 00:05:43
    + 19: cells 29->29, 153917 blocks, duration 00:04:33
    + 20: cells 30->30, 28884 blocks, duration 00:00:51
    + 21: cells 31->32, 78814 blocks, duration 00:02:19
    + 22: cells 33->33, 40651 blocks, duration 00:01:11
    + 23: cells 34->34, 152973 blocks, duration 00:04:31
    + 24: cells 35->36, 114642 blocks, duration 00:03:23
    + 25: cells 37->37, 133822 blocks, duration 00:03:58
    + 26: cells 38->39, 65787 blocks, duration 00:01:56
    + 27: cells 40->40, 120030 blocks, duration 00:03:33
    + 28: cells 41->42, 136268 blocks, duration 00:04:01
    + 29: cells 43->43, 13266 blocks, duration 00:00:25
    + 30: cells 44->44, 17010 blocks, duration 00:00:30
    + 31: cells 45->45, 81358 blocks, duration 00:02:23
    + 32: cells 46->48, 137454 blocks, duration 00:04:07
  + audio tracks:
    + 1, English (AC3) (5.1 ch), 48000Hz, 448000bps
    + 2, English (AC3) (2.0 ch), 48000Hz, 192000bps
    + 3, Francais (AC3) (5.1 ch), 48000Hz, 448000bps
    + 4, Espanol (AC3) (5.1 ch), 48000Hz, 448000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng)
    + 2, Francais (iso639-2: fra)
    + 3, Espanol (iso639-2: spa)
[19:55:48] thread b74e8b90 started ("work")
[19:55:48] 1 job(s) to process
[19:55:48] starting job
[19:55:48] job configuration:
[19:55:48]  * source
[19:55:48]    + /movies/TERMINATOR_SE_SIDEA/
[19:55:48]    + title 1, chapter(s) 9 to 9
[19:55:48]  * destination
[19:55:48]    + /mnt/iTunes/Movies/TERMINATOR_SE_SIDEA8.m4v
[19:55:48]    + container: MPEG-4 (.mp4 and .m4v)
[19:55:48]      + chapter markers
[19:55:48]  * video track
[19:55:48]    + decoder: mpeg2
[19:55:48]      + bitrate 9800 kbps
[19:55:48]    + frame rate: same as source (around 23.976 fps)
[19:55:48]    + loose anamorphic
[19:55:48]      + storage dimensions: 720 * 480 -> 720 * 480, crop 0/8/0/2
[19:55:48]      + pixel aspect ratio: 6 / 5
[19:55:48]      + display dimensions: 864 * 480
[19:55:48]    + encoder: x264
[19:55:48]      + options: psy-rd=1,1:bframes=3:ref=1:subme=6:me=umh:no-fast-pskip=1:trellis=2:cabac=0:vbv-maxrate=4900:vbv-bufsize=3500
[19:55:48]      + quality: 0.64
[19:55:48]  * audio track 0
[19:55:48]    + decoder: English (AC3) (5.1 ch) (track 0, id 80bd)
[19:55:48]      + bitrate: 448 kbps, samplerate: 48000 Hz
[19:55:48]    + AC3 passthrough
[19:55:48] thread b69feb90 started ("reader")
[19:55:48] thread b61fdb90 started ("MPEG-2 decoder (libmpeg2)")
[19:55:48] thread b57ffb90 started ("Renderer")
[19:55:48] encx264: keyint-min: 24, keyint-max: 240
[19:55:48] encx264: encoding with stored aspect 6/5
[19:55:48] encx264: Encoding at constant RF 18.360001
[19:55:48] encx264: opening libx264 (pass 0)
x264 [info]: using SAR=6/5
x264 [info]: using cpu capabilities: MMX2 SSE2Slow
[19:55:48] thread b47b0b90 started ("H.264/AVC encoder (libx264)")
No accelerated IMDCT transform found
[19:55:48] thread b3fafb90 started ("AC3 decoder")
[19:55:48] thread b37aeb90 started ("muxer")
[19:55:48] sync: expecting 10097 video frames
[19:55:48] reader: first SCR 27494585
[19:55:48] a52_syncinfo failed
[19:55:48] a52_syncinfo ok
[19:55:48] mpeg2: "Chapter 9" (9) at frame 0 time 4505
[19:55:48] sync: first pts is 4505
Encoding: task 1 of 1, 26.61 % (17.36 fps, avg 17.50 fps, ETA 00h07m03s)[19:58:22] sync: adding 287 ms of silence to audio 0  start 10225929, next 10200073
Encoding: task 1 of 1, 99.44 % (17.15 fps, avg 17.56 fps, ETA 00h00m03s)[20:05:21] reader: end of chapter 9 (media 9) reached at media chapter 10
[20:05:21] reader: done. 2 scr changes
[20:05:21] thread b69feb90 exited ("reader")
Encoding: task 1 of 1, 99.73 % (12.84 fps, avg 17.53 fps, ETA 00h00m01s)[20:05:23] sync: got 10073 frames, 10097 expected
[20:05:23] work: average encoding speed for job is 17.530880 fps
Muxing: this may take awhile...[20:05:26] mux: file size, 177243035 bytes
[20:05:26] mux: track 0, 153508724 bytes, 2920.68 kbps
[20:05:26] mux: track 1, 23543296 bytes, 447.94 kbps
[20:05:26] mux: overhead, 8.23 bytes per frame
[20:05:26] thread b37aeb90 exited ("muxer")
[20:05:26] thread b37aeb90 joined ("muxer")
[20:05:26] thread b57ffb90 exited ("Renderer")
[20:05:26] thread b47b0b90 exited ("H.264/AVC encoder (libx264)")
[20:05:26] thread b61fdb90 exited ("MPEG-2 decoder (libmpeg2)")
[20:05:26] thread b3fafb90 exited ("AC3 decoder")
[20:05:26] thread b61fdb90 joined ("MPEG-2 decoder (libmpeg2)")
[20:05:26] mpeg2 done: 10074 frames
[20:05:26] thread b57ffb90 joined ("Renderer")
[20:05:26] render: lost time: 0 (0 frames)
[20:05:26] render: gained time: 0 (0 frames) (0 not accounted for)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] thread b47b0b90 joined ("H.264/AVC encoder (libx264)")
x264 [info]: slice I:90    Avg QP:15.66  size: 51447  PSNR Mean Y:46.91 U:50.07 V:50.87 Avg:47.79 Global:47.45
x264 [info]: slice P:5318  Avg QP:16.82  size: 21349  PSNR Mean Y:45.45 U:48.56 V:49.34 Avg:46.31 Global:45.85
x264 [info]: slice B:4672  Avg QP:19.50  size:  7566  PSNR Mean Y:43.83 U:47.90 V:48.73 Avg:44.86 Global:44.54
x264 [info]: consecutive B-frames: 20.8% 44.0% 19.2% 15.9%
x264 [info]: mb I  I16..4: 12.0%  0.0% 88.0%
x264 [info]: mb P  I16..4:  1.7%  0.0% 11.5%  P16..4: 39.3% 35.0% 11.4%  0.0%  0.0%    skip: 1.1%
x264 [info]: mb B  I16..4: 12.6%  0.0%  0.0%  B16..8: 36.5%  3.8%  3.0%  direct:22.3%  skip:21.7%  L0:25.9% L1:45.7% BI:28.4%
x264 [info]: SSIM Mean Y:0.9816405
x264 [info]: PSNR Mean Y:44.714 U:48.264 V:49.070 Avg:45.647 Global:45.205 kb/s:2921.04
[20:05:26] thread b3fafb90 joined ("AC3 decoder")
[20:05:26] thread b69feb90 joined ("reader")
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 1 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] fifo_close: trashing 0 buffer(s)
[20:05:26] Freed 3 buffers of size 1024
[20:05:26] Freed 32 buffers of size 2048
[20:05:26] Freed 32 buffers of size 524288
[20:05:26] Allocated 16845824 bytes of buffers on this pass and Freed 16845824 bytes, 0 bytes leaked
[20:05:26] thread b74e8b90 exited ("work")
[20:05:27] thread b74e8b90 joined ("work")
[20:05:27] libhb: work result = 0

Rip done!
[20:05:27] thread b7ce9b90 exited ("libhb")
[20:05:27] thread b7ce9b90 joined ("libhb")
HandBrake has exited.
Did the same thing in the first Chapter of Forrest Gump, while Forrest is waiting for the bus. Same settings and tests as stated above.
Last edited by jbrjake on Thu Nov 06, 2008 7:30 pm, edited 3 times in total.
Reason: Activity logs should be enclosed in [code] blocks.
cvk_b
Veteran User
Posts: 527
Joined: Sun Mar 18, 2007 2:11 am

Re: [SVN 1797] Dropped Frame

Post by cvk_b »

I might have this disc to dig up.

Did you try removing the maxrate/bufsize settings? Are you saying it always drops frames no matter what on that disc?
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

Re: [SVN 1797] Dropped Frame

Post by vidjock »

I noticed it in Terminator and Forrect Gump, in multiple places. I just narrowed it down to the chapter to help you trouble shoot. I will try again tonight without vbv. But, both of them didn't do it in 0.9.2 so I don't think it is vbv.
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

Re: [SVN 1797] Dropped Frame

Post by vidjock »

Well.. tried it without vbv and it still happens. I also tried a new source Batman Begins, and it did the same thing. So far any encode I have tried with the before mentioned settings has dropped out. But, 0.9.2 encodes them fine.
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

Re: [SVN 1797] Dropped Frame

Post by vidjock »

I would give a pound of flesh and a pint of blood for someone to encode either ch. 9 of terminator or ch. 1 of Forrest Gump, to see if they get the same drop out of the vid and audio issue. I would like to confirm that it is on my end or not.
nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: [SVN 1797] Dropped Frame

Post by nightstrm »

I have both of these movies and will try them if I get a chance (currently dealing with some NAS problems so it may take a day or two).
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

Re: [SVN 1797] Dropped Frame

Post by vidjock »

Thanks Nightstrm. I will have to start looking for my scalpal. :D
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: [SVN 1797] Dropped Frame

Post by van »

This problem might have been due to some code that handled dropped clock packets in over-the-air mpeg transport streams. It shouldn't have been running on DVDs or other kinds of mpeg streams but it was. I've committed a fix as r1802. I don't have anything that exhibits this problem so I'd be grateful if someone could test if the current head (r1802 or later) fixes it. Thanks.
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

Re: [SVN 1797] Dropped Frame

Post by vidjock »

I tested ch. 9 of terminator and ch. 1 of Forrest Gump with r1802, and unfortunately the same drop out happened in both. I even tried Pulp Fiction and it happened at the end of ch. 1 just before they stand up to rob the coffee shop. I have tried directly from the dvd and from my hard drive on all three, and the same drop out happens.
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: [SVN 1797] Dropped Frame

Post by van »

I went out & bought the Forest Gump DVD. I see the problem. The audio & video glitches are caused by SCR discontinuities at those points. HB doesn't handle the discontinuities seamlessly because most of the video frames use implicit timestamps (only 1 frame in 20 has a PTS). This means that HB can't graft the new timing sequence onto the old because it only knows approximately where it is in the old.

I need to figure out how to fix this. Transport Steams have a bit in the header that tells you the start of each frame (which makes it easy to convert the implicit timestamps to explicit) but DVD Program Streams don't. I'll dump some of the data & see if I can get that information without parsing the entire bitstream.
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: [SVN 1797] Dropped Frame

Post by van »

I've got something that seems to work for Forest Gump & doesn't mess up other test cases. Why don't you try r1812 or later & see if it fixes the drops. Thanks.
vidjock
Posts: 26
Joined: Tue Sep 30, 2008 9:50 pm

Re: [SVN 1797] Dropped Frame

Post by vidjock »

Van,

That fixed it. I tried Both Terminator and Forrest Gump with r1813 and the problem is gone, nice job. I have been reading a lot of the dev forum and other post, and your contributions to Handbrake have been absolutly superb. It is people like you and the other developers of Handbrake that make open source software in many ways far superior to closed source. I submitted this bug on Sept. 30 and now it is Oct. 5 and it is fixed. Good luck finding a proprietary software company with that good of a turn around time.
Post Reply