Page 1 of 1

Processing recent cuts with ffmpeg

Posted: Tue Mar 05, 2013 9:11 pm
by berndb
Currently, my cut TV-Recordings don't work well when processing them further with ffmpeg. The result has video and audio not in sync while the cut source file produced with smart cuttter plays fine in mplayer, xine & Co.
Is it worth to try to create sample and upload it? Would you need the source file (which means I try to make a small TV-recording where the error is reproduceable) or would you need a result made with smart cutter?

Here are an example of the messages ffmpeg shows when processing a file cut with smart cutter:

Code: Select all

h264 @ 0x25f8080] Missing reference picture, default is 0
[h264 @ 0x25f8080] decode_slice_header error
[h264 @ 0x25fcb20] reference picture missing during reorder
[h264 @ 0x25fcb20] Missing reference picture, default is 0
[h264 @ 0x25fcb20] decode_slice_header error
[h264 @ 0x25fcf80] Missing reference picture, default is 0
[h264 @ 0x25fcf80] decode_slice_header error
[h264 @ 0x25f8080] reference count overflow
[h264 @ 0x25f8080] decode_slice_header error
[h264 @ 0x25fcb20] reference picture missing during reorder
[h264 @ 0x25fcb20] Missing reference picture, default is 65537
    Last message repeated 2 times
[h264 @ 0x25fcb20] Reference 5 >= 4
[h264 @ 0x25fcb20] error while decoding MB 7 0, bytestream (2597)
[h264 @ 0x25fcb20] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x25fcf80] Missing reference picture, default is 65537
[h264 @ 0x25fcf80] Reference 4 >= 3
[h264 @ 0x25fcf80] error while decoding MB 2 0, bytestream (18466)
[h264 @ 0x25fcf80] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x25f8080] concealing 3555 DC, 3555 AC, 3555 MV errors in B frame
[h264 @ 0x25fcb20] reference picture missing during reorder
[h264 @ 0x25fcb20] Missing reference picture, default is 65537
    Last message repeated 2 times
[h264 @ 0x25fcb20] Reference 4 >= 4
[h264 @ 0x25fcb20] error while decoding MB 33 0, bytestream (2212)
[h264 @ 0x25fcb20] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x25fcf80] Missing reference picture, default is 65537
[h264 @ 0x25fcf80] concealing 3587 DC, 3587 AC, 3587 MV errors in B frame
[h264 @ 0x25f8080] top block unavailable for requested intra mode at 75 0
[h264 @ 0x25f8080] error while decoding MB 75 0, bytestream (18759)
[h264 @ 0x25f8080] concealing 3574 DC, 3574 AC, 3574 MV errors in B frame
[h264 @ 0x25fcb20] Missing reference picture, default is 65537
    Last message repeated 1 times
[h264 @ 0x25fcb20] concealing 3599 DC, 3599 AC, 3599 MV errors in P frame
[h264 @ 0x25fcf80] illegal short term buffer state detected
[h264 @ 0x25fcf80] reference count overflow
[h264 @ 0x25fcf80] decode_slice_header error
[h264 @ 0x25f8080] Missing reference picture, default is 65538
[h264 @ 0x25f8080] concealing 3591 DC, 3591 AC, 3591 MV errors in B frame
[h264 @ 0x25fcf80] concealing 3335 DC, 3335 AC, 3335 MV errors in B frame
[h264 @ 0x25fcb20] Reference 3 >= 3
[h264 @ 0x25fcb20] error while decoding MB 1 0, bytestream (20026)
[h264 @ 0x25fcb20] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x25f8080] Missing reference picture, default is 65538
[h264 @ 0x25f8080] top block unavailable for requested intra mode at 22 0
[h264 @ 0x25f8080] error while decoding MB 22 0, bytestream (2246)
[h264 @ 0x25f8080] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x25fcf80] concealing 3268 DC, 3268 AC, 3268 MV errors in B frame
[h264 @ 0x25fcb20] Reference 3 >= 3
[h264 @ 0x25fcb20] error while decoding MB 24 1, bytestream (18480)
[h264 @ 0x25fcb20] concealing 3545 DC, 3545 AC, 3545 MV errors in B frame
[h264 @ 0x25f8080] Missing reference picture, default is 65538
[h264 @ 0x25fcb20] illegal short term buffer state detected
[h264 @ 0x25fcb20] reference count overflow
[h264 @ 0x25fcb20] decode_slice_header error
[h264 @ 0x25f8080] Reference 4 >= 4
[h264 @ 0x25f8080] error while decoding MB 16 0, bytestream (95685)
[h264 @ 0x25fcf80] Reference 5 >= 4
[h264 @ 0x25fcf80] error while decoding MB 10 2, bytestream (1971)
[h264 @ 0x25fcf80] concealing 3479 DC, 3479 AC, 3479 MV errors in B frame
[h264 @ 0x25f8080] concealing 3600 DC, 3600 AC, 3600 MV errors in P frame
[h264 @ 0x25f8080] Reference 4 >= 3
[h264 @ 0x25f8080] error while decoding MB 0 1, bytestream (19969)
[h264 @ 0x25fcb20] concealing 3584 DC, 3584 AC, 3584 MV errors in B frame
[h264 @ 0x25f8080] concealing 3569 DC, 3569 AC, 3569 MV errors in B frame
[h264 @ 0x25fcf80] top block unavailable for requested intra mode at 20 0
[h264 @ 0x25fcf80] error while decoding MB 20 0, bytestream (2322)
[h264 @ 0x25fcf80] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x25f8080] Reference 3 >= 3
[h264 @ 0x25f8080] error while decoding MB 4 0, bytestream (18827)
[h264 @ 0x25f8080] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x25fcb20] top block unavailable for requested intra mode at 33 0
[h264 @ 0x25fcb20] error while decoding MB 33 0, bytestream (18417)
[h264 @ 0x25fcb20] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame

Re: Processing recent cuts with ffmpeg

Posted: Fri Mar 08, 2013 12:48 am
by admin
Dear berndb:
Thanks for your message.

Could you please tell us the command line you used so we can try it on our end?

Looking forward to your further message.
Thank you very much.

Best Regards,
FameRing Support Team

Re: Processing recent cuts with ffmpeg

Posted: Sat Mar 09, 2013 7:47 pm
by berndb
Thanks for your reply and sorry for the late response.

Some further tries give me the impression that smart cutter suffers from corrupt input and is not the source of the error messages I reported. Processing another TV-record directly with ffmpeg gave me a lot of strange "PES packet size mismatch" errors. This and other things leads me to the conclusion that my current TV-Recording-Setting (vdr-1.7.38) is not working properly. I have to reinstall and check further.

Anyway, here is an example processed on an output of smart cutter. I use "--ss 00:36:00" to begin at one of the timestamps where the error occurs.

Code: Select all

/extern07/ffmpeg_neu/ffmpeg/ffmpeg -ss 00:36:00 -i Tatort_Ch_Donnerstag.ts -vcodec libx264 -preset veryfast -x264opts crf=12:videoformat=undef:force-cfr -acodec ac3 -ab 448k -map 0:0 -map 0:3 Tatort_Ch_Donnerstag_test.mkv
ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  9 2013 14:52:24 with gcc 4.6.3 (Gentoo Hardened 4.6.3 p1.3, pie-0.5.2)
  configuration: --enable-avresample --enable-gpl --enable-libx264 --enable-nonfree --enable-libmp3lame --enable-libfaac --enable-frei0r --enable-libsoxr --cpu=amd64 --arch=x86_64
  libavutil      52. 17.101 / 52. 17.101
  libavcodec     54. 91.102 / 54. 91.102
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 35.101 /  3. 35.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mpegts @ 0x20de2e0] Stream #4: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x20e49c0] start time is not set in estimate_timings_from_pts                                                                                                                                                                       
Input #0, mpegts, from 'Tatort_Ch_Donnerstag.ts':
  Duration: 01:27:41.81, start: 95028.609467, bitrate: 12812 kb/s
  Program 132 
    Stream #0:0[0x13ed]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
    Stream #0:1[0x13ee](deu): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:2[0x13ef](mis): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:3[0x13f2](deu): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 448 kb/s
    Stream #0:4[0x13f1](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
[libx264 @ 0x2101940] using SAR=1/1
[libx264 @ 0x2101940] using cpu capabilities: MMX2 SSE2Slow SlowCTZ
[libx264 @ 0x2101940] profile High, level 3.2
[libx264 @ 0x2101940] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1 crf=12.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, matroska, to 'Tatort_Ch_Donnerstag_test.mkv':
  Metadata:
    encoder         : Lavf54.61.104
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 1k tbn, 50 tbc
    Stream #0:1(deu): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 448 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:3 -> #0:1 (ac3 -> ac3)
Press [q] to stop, [?] for help
[h264 @ 0x2ae1220] Missing reference picture, default is 0
[h264 @ 0x2ae1220] decode_slice_header error
[h264 @ 0x2b26080] illegal reordering_of_pic_nums_idc
[h264 @ 0x2b26080] decode_slice_header error
[h264 @ 0x2b8c080] top block unavailable for requested intra4x4 mode -1 at 2 0
[h264 @ 0x2b8c080] error while decoding MB 2 0, bytestream (8694)
[h264 @ 0x2b8c080] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x2ae1220] reference count overflow
[h264 @ 0x2ae1220] decode_slice_header error
[h264 @ 0x2b26080] reference picture missing during reorder
[h264 @ 0x2b26080] Missing reference picture, default is 65540
    Last message repeated 2 times
[h264 @ 0x2b26080] Reference 6 >= 4
[h264 @ 0x2b26080] error while decoding MB 24 0, bytestream (12317)
[h264 @ 0x2b26080] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x2b8c080] top block unavailable for requested intra4x4 mode -1 at 23 0
[h264 @ 0x2b8c080] error while decoding MB 23 0, bytestream (11553)
[h264 @ 0x2b8c080] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x2ae1220] reference count overflow
[h264 @ 0x2ae1220] decode_slice_header error
Input stream #0:3 frame changed from rate:48000 fmt:fltp ch:2 chl:stereo to rate:48000 fmt:fltp ch:6 chl:5.1(side)
[h264 @ 0x2b26080] reference picture missing during reorder
[h264 @ 0x2b26080] Missing reference picture, default is 65540
    Last message repeated 2 times
[h264 @ 0x2b26080] concealing 3559 DC, 3559 AC, 3559 MV errors in B frame
[h264 @ 0x2b8c080] cabac_init_idc overflow
[h264 @ 0x2b8c080] decode_slice_header error
[h264 @ 0x2ae1220] illegal short term buffer state detected
[h264 @ 0x2ae1220] illegal reordering_of_pic_nums_idc
[h264 @ 0x2ae1220] decode_slice_header error
[h264 @ 0x2b26080] concealing 3568 DC, 3568 AC, 3568 MV errors in B frame
[h264 @ 0x2b8c080] reference count overflow
[h264 @ 0x2b8c080] decode_slice_header error
[h264 @ 0x2ae1220] Missing reference picture, default is 65541
[h264 @ 0x2ae1220] Reference 4 >= 4
[h264 @ 0x2ae1220] error while decoding MB 3 0, bytestream (12989)
[h264 @ 0x2ae1220] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x2b8c080] reference count overflow
[h264 @ 0x2b8c080] decode_slice_header error
[h264 @ 0x2ae1220] Missing reference picture, default is 65541
[h264 @ 0x2ae1220] concealing 3519 DC, 3519 AC, 3519 MV errors in B frame
[h264 @ 0x2b26080] top block unavailable for requested intra4x4 mode -1 at 38 0
[h264 @ 0x2b26080] error while decoding MB 38 0, bytestream (8907)
[h264 @ 0x2b26080] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x2b26080] cabac_init_idc overflow
[h264 @ 0x2b26080] decode_slice_header error
[h264 @ 0x2b8c080] illegal short term buffer state detected
[h264 @ 0x2b8c080] illegal reordering_of_pic_nums_idc
[h264 @ 0x2b8c080] decode_slice_header error
[h264 @ 0x2ae1220] concealing 3540 DC, 3540 AC, 3540 MV errors in B frame
[h264 @ 0x2b26080] reference count overflow
[h264 @ 0x2b26080] decode_slice_header error
[h264 @ 0x2b8c080] concealing 3452 DC, 3452 AC, 3452 MV errors in B frame
[h264 @ 0x2b26080] reference count overflow
[h264 @ 0x2b26080] decode_slice_header error
[h264 @ 0x2b8c080] Reference 5 >= 4
[h264 @ 0x2b8c080] error while decoding MB 15 0, bytestream (11317)
[h264 @ 0x2b8c080] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
[h264 @ 0x2ae1220] top block unavailable for requested intra mode at 22 0
[h264 @ 0x2ae1220] error while decoding MB 22 0, bytestream (10369)
[h264 @ 0x2ae1220] concealing 3600 DC, 3600 AC, 3600 MV errors in B frame
PES packet size mismatch.0 size=   44693kB time=00:00:26.58 bitrate=13774.5kbits/s    
[ac3 @ 0x20e3f60] frame CRC mismatch
[ac3 @ 0x20e3f60] frame sync error
Error while decoding stream #0:3: Operation not permitted
[h264 @ 0x2ae1220] concealing 897 DC, 897 AC, 897 MV errors in B frame
frame= 3364 fps= 22 q=-1.0 Lsize=  107207kB time=00:01:08.56 bitrate=12809.8kbits/s    
video:103402kB audio:3764kB subtitle:0 global headers:0kB muxing overhead 0.037835%
[libx264 @ 0x2101940] frame I:17    Avg QP:11.55  size:190434
[libx264 @ 0x2101940] frame P:1175  Avg QP:15.01  size: 73415
[libx264 @ 0x2101940] frame B:2172  Avg QP:17.79  size:  7543
[libx264 @ 0x2101940] consecutive B-frames: 10.7%  5.2% 13.2% 70.9%
[libx264 @ 0x2101940] mb I  I16..4: 11.0% 24.2% 64.7%
[libx264 @ 0x2101940] mb P  I16..4:  2.0%  4.8%  1.2%  P16..4: 49.9% 13.9% 15.7%  0.0%  0.0%    skip:12.5%
[libx264 @ 0x2101940] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 16.7%  3.7%  1.0%  direct:17.8%  skip:60.4%  L0:39.6% L1:41.2% BI:19.2%
[libx264 @ 0x2101940] 8x8 transform intra:55.3% inter:65.8%
[libx264 @ 0x2101940] coded y,uvDC,uvAC intra: 90.3% 50.6% 25.6% inter: 30.5% 25.9% 2.3%
[libx264 @ 0x2101940] i16 v,h,dc,p: 22% 14% 50% 14%
[libx264 @ 0x2101940] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8% 21% 54%  2%  3%  2%  2%  2%  5%
[libx264 @ 0x2101940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 21% 27%  4%  9%  5%  6%  6%  8%
[libx264 @ 0x2101940] i8c dc,h,v,p: 59% 22% 14%  4%
[libx264 @ 0x2101940] Weighted P-Frames: Y:0.2% UV:0.1%
[libx264 @ 0x2101940] kb/s:12590.12