#259(undetermined:new): framerate detection does not work properly.
#259: framerate detection does not work properly. ---------------------------------------+-------------------------- Reporter: mbosner | Type: defect Status: new | Priority: normal Component: undetermined | Version: unspecified Keywords: false framerate detection | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | ---------------------------------------+-------------------------- Frameratedetection does not work well on some of my files: ffmpeg -i wrong_framerate.mkv: [matroska,webm @ 0x276e420] Estimating duration from bitrate, this may be inaccurate Input #0, matroska,webm, from 'wrong_framerate.mkv': Duration: 01:47:42.18, start: 0.000000, bitrate: 1984 kb/s Stream #0.0: Video: vc1 (Advanced), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 29.97 tbc (default) Stream #0.1: Audio: eac3, 48000 Hz, 5.1, s16, 1536 kb/s (default) Stream #0.2: Audio: eac3, 48000 Hz, 5.1, s16, 448 kb/s At least one output file must be specified ffmpeg version: git-N-30444-geb5a3ab correct framerate: 23.98/24 fps same false framerate detection with latest VLC xbmc does play it with the correct framerate and does play it without problems. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/259> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. --------------------------------------+--------------------------- Reporter: mbosner | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: false framerate detection | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------------------+--------------------------- Comment (by mbosner): First 10MB of problematic file: [http://x-ion.de/wrong_framerate.mkv] -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/259#comment:1> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. --------------------------------------+--------------------------- Reporter: mbosner | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: false framerate detection | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------------------+--------------------------- Comment (by cehoyos): The sample contains 196 frames, audio plays for ~6.7 seconds. Could you explain what your problem is? Is ffmpeg -i wrong_framerate.mkv -qscale 2 -acodec ac3 -ab 512k out.avi unable to keep A/V-sync (when you play out.avi)? Is ffplay unable to keep A/V-sync? Or mplayer -demuxer lavf? And please add complete, uncut output (including the command line) of the failing command - preferably ffmpeg, but if ffmpeg works, and ffplay does not work correctly, please add ffplay output. If you are seeing a problem with a playback software that is not reproducible with FFmpeg, consider reporting it there. -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/259#comment:2> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. --------------------------------------+--------------------------- Reporter: mbosner | Owner: Type: defect | Status: new Priority: normal | Component: undetermined Version: unspecified | Resolution: Keywords: false framerate detection | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | --------------------------------------+--------------------------- Comment (by mbosner): The sample file is ofc just the first 10 MB of 17 GB. If you need more please tell me. Maybe i should explain what i am doing: I try to batch convert video files using some script code that i wrote. Normaly everything works fine or i can workaround problems. But with this file ffmpeg guesses the wrong frame rate and i convert the file from 24fps to ~29.97fps which lead to stutter movie playback. Audio and Video is in sync. But since i detect the wrong fps with ffmpeg -i i convert it to the wrong framerate: I am getting informations about the file using ffmpeg: ffmpeg -i "temporary_filename000.mkv" 2>&1 FFMPEG OUT: ffmpeg version git-N-30444-geb5a3ab, Copyright (c) 2000-2011 the FFmpeg developers FFMPEG OUT: built on Jun 1 2011 16:42:49 with gcc 4.5.2 FFMPEG OUT: configuration: --enable-gpl --enable-version3 --enable- nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable- libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable- libvorbis --enable-libx264 --enable-libxvid FFMPEG OUT: libavutil 51. 3. 0 / 51. 3. 0 FFMPEG OUT: libavcodec 53. 6. 1 / 53. 6. 1 FFMPEG OUT: libavformat 53. 2. 0 / 53. 2. 0 FFMPEG OUT: libavdevice 53. 1. 0 / 53. 1. 0 FFMPEG OUT: libavfilter 2. 11. 0 / 2. 11. 0 FFMPEG OUT: libswscale 0. 14. 0 / 0. 14. 0 FFMPEG OUT: libpostproc 51. 2. 0 / 51. 2. 0 FFMPEG OUT: [matroska,webm @ 0x23c5420] Estimating duration from bitrate, this may be inaccurate FFMPEG OUT: Input #0, matroska,webm, from 'temporary_filename000.mkv': FFMPEG OUT: Duration: 01:47:42.18, start: 0.000000, bitrate: 1984 kb/s FFMPEG OUT: Stream #0.0: Video: vc1 (Advanced), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 29.97 tbc (default) FFMPEG OUT: Stream #0.1: Audio: eac3, 48000 Hz, 5.1, s16, 1536 kb/s (default) FFMPEG OUT: Stream #0.2: Audio: eac3, 48000 Hz, 5.1, s16, 448 kb/s FFMPEG OUT: At least one output file must be specified i extract the audio(...) and i convert the video: ffmpeg -i 'temporary_filename000.mkv' -flags ilme -an -pix_fmt yuv420p -f rawvideo -vcodec rawvideo -| x264 --preset veryslow --fps 29.970 --crf 18 -o track1.mp4 - --input-res 1920x1080 i can playback the original file without problems using xbmc. I am not sure if this is the only file with the problem but it is the first one where i noticed the problem. -- Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/259#comment:3> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. -------------------------------------+------------------------------------- Reporter: mbosner | Owner: Type: defect | Status: open Priority: normal | Component: Version: unspecified | undetermined Keywords: vc1 | Resolution: pulldown | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by cehoyos): * keywords: false framerate detection => vc1 pulldown * status: new => open Comment: Replying to [comment:3 mbosner]:
But with this file ffmpeg guesses the wrong frame rate and i convert the file from 24fps to ~29.97fps which lead to stutter movie playback.
Which software shows 24fps for the sample you provided? mkvinfo reports "29.970 fps" The heavy stutter that was originally visible on playback and reencoding with every telecined VC1 sample should not be reproducible anymore, but encoding into mp4 still duplicates frames if -r 24 is not used. This is also reproducible for evo samples that correctly show 23.98 fps {{{ $ ffmpeg -i JerkyVC1Pulldown.EVO -qscale 2 -strict experimental -t 5 out.mp4 ffmpeg version N-33758-gc4e02d3, Copyright (c) 2000-2011 the FFmpeg developers built on Oct 18 2011 03:46:14 with gcc 4.5.3 configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc libavutil 51. 21. 0 / 51. 21. 0 libavcodec 53. 21. 0 / 53. 21. 0 libavformat 53. 16. 1 / 53. 16. 1 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 43. 7 / 2. 43. 7 libswscale 2. 1. 0 / 2. 1. 0 Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (60000/2002) Input #0, mpeg, from 'JerkyVC1Pulldown.EVO': Duration: 00:00:05.90, start: 0.036744, bitrate: 13875 kb/s Stream #0:0[0xfd55]: Video: vc1 (Advanced), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:1[0xc4]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s Stream #0:2[0xc3]: Audio: eac3, 48000 Hz, 5.1(side), s16, 768 kb/s Stream #0:3[0xc2]: Audio: eac3, 48000 Hz, 5.1(side), s16, 768 kb/s Stream #0:4[0x89]: Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s Stream #0:5[0xc0]: Audio: eac3, 48000 Hz, 5.1(side), s16, 1536 kb/s [buffer @ 0x1309d60] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: [mpeg4 @ 0x1370ca0] removing common factors from framerate Output #0, mp4, to 'out.mp4': Metadata: encoder : Lavf53.16.1 Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30k tbn, 29.97 tbc Stream #0:1: Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, 5.1(side), s16, 128 kb/s Stream mapping: Stream #0.0 -> #0.0 (vc1 -> mpeg4) Stream #0.2 -> #0.1 (eac3 -> aac) Press [q] to stop, [?] for help frame= 150 fps= 45 q=2.0 Lsize= 1971kB time=00:00:05.00 bitrate=3226.0kbits/s dup=30 drop=0 video:1923kB audio:43kB global headers:0kB muxing overhead 0.215599% }}} {{{ $ ffmpeg -i JerkyVC1Pulldown.EVO -qscale 2 -strict experimental -t 5 -r 24 out.mp4 ffmpeg version N-33758-gc4e02d3, Copyright (c) 2000-2011 the FFmpeg developers built on Oct 18 2011 03:46:14 with gcc 4.5.3 configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc libavutil 51. 21. 0 / 51. 21. 0 libavcodec 53. 21. 0 / 53. 21. 0 libavformat 53. 16. 1 / 53. 16. 1 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 43. 7 / 2. 43. 7 libswscale 2. 1. 0 / 2. 1. 0 Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (60000/2002) Input #0, mpeg, from 'JerkyVC1Pulldown.EVO': Duration: 00:00:05.90, start: 0.036744, bitrate: 13875 kb/s Stream #0:0[0xfd55]: Video: vc1 (Advanced), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:1[0xc4]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s Stream #0:2[0xc3]: Audio: eac3, 48000 Hz, 5.1(side), s16, 768 kb/s Stream #0:3[0xc2]: Audio: eac3, 48000 Hz, 5.1(side), s16, 768 kb/s Stream #0:4[0x89]: Audio: dts (DTS), 48000 Hz, 5.1(side), s16, 1536 kb/s Stream #0:5[0xc0]: Audio: eac3, 48000 Hz, 5.1(side), s16, 1536 kb/s [buffer @ 0x1309360] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: Output #0, mp4, to 'out.mp4': Metadata: encoder : Lavf53.16.1 Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 24 tbn, 24 tbc Stream #0:1: Audio: aac (@[0][0][0] / 0x0040), 48000 Hz, 5.1(side), s16, 128 kb/s Stream mapping: Stream #0.0 -> #0.0 (vc1 -> mpeg4) Stream #0.2 -> #0.1 (eac3 -> aac) Press [q] to stop, [?] for help frame= 120 fps= 39 q=2.0 Lsize= 1817kB time=00:00:05.00 bitrate=2977.6kbits/s video:1770kB audio:43kB global headers:0kB muxing overhead 0.220256% }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/259#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. -------------------------------------+------------------------------------- Reporter: mbosner | Owner: Type: defect | Status: open Priority: normal | Component: Version: unspecified | undetermined Keywords: vc1 | Resolution: pulldown | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by michael): http://x-ion.de/wrong_framerate.mkv is ERROR 404: Not Found. -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/259#comment:5> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. -------------------------------------+------------------------------------- Reporter: mbosner | Owner: Type: defect | Status: open Priority: normal | Component: Version: unspecified | undetermined Keywords: vc1 | Resolution: pulldown | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by cehoyos): Samples uploaded to http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket259/ The following command lines do not lead to frame duplication (and smaller files are written) if "-r 24" is used: {{{ $ ffmpeg -i wrong_framerate.mkv -strict -2 -qscale 2 -vframes 196 out1.mov ffmpeg version N-48375-gc14f8a5 Copyright (c) 2000-2013 the FFmpeg developers built on Jan 1 2013 16:29:16 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --disable-indev=jack libavutil 52. 13.100 / 52. 13.100 libavcodec 54. 85.100 / 54. 85.100 libavformat 54. 58.102 / 54. 58.102 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 30.102 / 3. 30.102 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Input #0, matroska,webm, from 'wrong_framerate.mkv': Metadata: creation_time : 2009-05-12 23:34:50 Duration: 01:47:42.19, start: 0.000000, bitrate: 12 kb/s Stream #0:0: Video: vc1 (Advanced) (WVC1 / 0x31435657), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default) Stream #0:1: Audio: eac3, 48000 Hz, 5.1(side), fltp, 1536 kb/s (default) Stream #0:2: Audio: eac3, 48000 Hz, 5.1(side), fltp, 448 kb/s Please use -q:a or -q:v, -qscale is ambiguous Output #0, mov, to 'out1.mov': Metadata: encoder : Lavf54.58.102 Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30k tbn, 29.97 tbc (default) Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1(side), fltp, 128 kb/s (default) Stream mapping: Stream #0:0 -> #0:0 (vc1 -> mpeg4) Stream #0:1 -> #0:1 (eac3 -> aac) Press [q] to stop, [?] for help frame= 196 fps= 63 q=2.0 Lsize= 3522kB time=00:00:06.53 bitrate=4411.3kbits/s dup=42 drop=0 video:3467kB audio:47kB subtitle:0 global headers:0kB muxing overhead 0.223866% }}} {{{ $ ffmpeg -i JerkyVC1Pulldown.EVO -strict -2 -qscale 2 -vframes 178 out.mov ffmpeg version N-48375-gc14f8a5 Copyright (c) 2000-2013 the FFmpeg developers built on Jan 1 2013 16:29:16 with gcc 4.7 (SUSE Linux) configuration: --enable-gpl --disable-indev=jack libavutil 52. 13.100 / 52. 13.100 libavcodec 54. 85.100 / 54. 85.100 libavformat 54. 58.102 / 54. 58.102 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 30.102 / 3. 30.102 libswscale 2. 1.103 / 2. 1.103 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 Input #0, mpeg, from 'JerkyVC1Pulldown.EVO': Duration: 00:00:05.90, start: 0.036744, bitrate: 13875 kb/s Stream #0:0[0xfd55]: Video: vc1 (Advanced), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 28.58 fps, 29.97 tbr, 90k tbn, 59.94 tbc Stream #0:1[0xc4]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s Stream #0:2[0xc3]: Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s Stream #0:3[0xc2]: Audio: eac3, 48000 Hz, 5.1(side), fltp, 768 kb/s Stream #0:4[0x89]: Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s Stream #0:5[0xc0]: Audio: eac3, 48000 Hz, 5.1(side), fltp, 1536 kb/s Please use -q:a or -q:v, -qscale is ambiguous Output #0, mov, to 'out.mov': Metadata: encoder : Lavf54.58.102 Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30k tbn, 29.97 tbc Stream #0:1: Audio: aac (mp4a / 0x6134706D), 48000 Hz, 5.1(side), fltp, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (vc1 -> mpeg4) Stream #0:2 -> #0:1 (eac3 -> aac) Press [q] to stop, [?] for help frame= 178 fps= 61 q=2.0 Lsize= 2978kB time=00:00:05.93 bitrate=4107.8kbits/s dup=35 drop=0 video:2918kB audio:53kB subtitle:0 global headers:0kB muxing overhead 0.214350% }}} -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/259#comment:6> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. -------------------------------------+------------------------------------- Reporter: mbosner | Owner: Type: defect | Status: open Priority: normal | Component: Version: unspecified | undetermined Keywords: vc1 | Resolution: pulldown | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | -------------------------------------+------------------------------------- Changes (by michael): * analyzed: 0 => 1 Comment: This files header states 29.97 as framerate / default duration, libavformat currently blindly believes this value. The actual frame durations are 2 and 3 fields with a field rate of 2*29.97 -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/259#comment:7> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
#259: framerate detection does not work properly. (mkv with default duration != actual average duration) -------------------------------------+------------------------------------- Reporter: mbosner | Owner: Type: defect | Status: open Priority: normal | Component: Version: unspecified | undetermined Keywords: vc1 | Resolution: pulldown mkv fps | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 1 | -------------------------------------+------------------------------------- Changes (by michael): * keywords: vc1 pulldown => vc1 pulldown mkv fps -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/259#comment:8> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg