Opened 11 years ago
Last modified 10 years ago
#3578 new defect
h.264 from avi to mkv/mp4
Reported by: | Alex-Frst | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | h264 |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
% ffmpeg -fflags +genpts -i test.avi -c copy test.mkv
Many video players (MPC-HC/BE, VLC) can not play H.264 video files remuxed by ffmpeg from avi to mkv or mp4 without lots of droppe frames (B-frames?).
Is this ffmpeg's problem? Or MPC-HC/BE, VLC?
Change History (5)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Please provide the failing command line together with the complete, uncut console output to make this a valid ticket.
comment:3 by , 11 years ago
Command does not fail. But produced video file can not be played smoothly (without dropped frames) in VLC, MPC-HC, MPC-BE.
I:\>ffmpeg.exe -fflags +genpts -i test.avi -c copy test.mkv ffmpeg version N-62569-gf57ac37 Copyright (c) 2000-2014 the FFmpeg developers built on Apr 19 2014 22:13:55 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 77.100 / 52. 77.100 libavcodec 55. 58.105 / 55. 58.105 libavformat 55. 37.101 / 55. 37.101 libavdevice 55. 13.100 / 55. 13.100 libavfilter 4. 4.100 / 4. 4.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 18.100 / 0. 18.100 libpostproc 52. 3.100 / 52. 3.100 Input #0, avi, from 'test.avi': Metadata: encoder : Lavf55.37.100 Duration: 00:01:00.04, start: 0.000000, bitrate: 4773 kb/s Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 4764 kb/s, 47.95 fps, 23.98 tbr, 47.95 tbn, 47.95 tbc Output #0, matroska, to 'test.mkv': Metadata: encoder : Lavf55.37.101 Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 4764 kb/s, 47.95 fps, 1k tbn, 47.95 tbc Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help frame= 1441 fps=0.0 q=-1.0 Lsize= 34922kB time=00:01:00.03 bitrate=4765.0kbits/s video:34911kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.033431%
comment:4 by , 11 years ago
I compared mkv generated by ffmpeg with generated by mkvtoolnix (it plays fine with VLC,MPC-HC/BE). Looks like ffmpeg generates PST in different (wrong?) order. Maybe problem in genpts?
Look at frames 16-17-18-19-..:
mkvtoolnix:
1 pkt_pts=0 pkt_pos=5461 pkt_size=1588 pict_type=I coded_picture_number=0 2 pkt_pts=0 pkt_pos=7239 pkt_size=93 pict_type=B coded_picture_number=3 3 pkt_pts=0 pkt_pos=7116 pkt_size=117 pict_type=B coded_picture_number=2 4 pkt_pts=0 pkt_pos=7338 pkt_size=82 pict_type=B coded_picture_number=4 5 pkt_pts=42 pkt_pos=7057 pkt_size=47 pict_type=P coded_picture_number=1 6 pkt_pts=63 pkt_pos=7428 pkt_size=45 pict_type=P coded_picture_number=5 7 pkt_pts=83 pkt_pos=7485 pkt_size=45 pict_type=P coded_picture_number=6 8 pkt_pts=125 pkt_pos=7536 pkt_size=46 pict_type=P coded_picture_number=7 9 pkt_pts=167 pkt_pos=7588 pkt_size=46 pict_type=P coded_picture_number=8 10 pkt_pts=209 pkt_pos=7640 pkt_size=46 pict_type=P coded_picture_number=9 11 pkt_pts=250 pkt_pos=7692 pkt_size=47 pict_type=P coded_picture_number=10 12 pkt_pts=292 pkt_pos=7745 pkt_size=47 pict_type=P coded_picture_number=11 13 pkt_pts=334 pkt_pos=17733 pkt_size=640 pict_type=B coded_picture_number=13 14 pkt_pts=375 pkt_pos=7799 pkt_size=9927 pict_type=P coded_picture_number=12 15 pkt_pts=417 pkt_pos=18381 pkt_size=199942 pict_type=I coded_picture_number=14 16 pkt_pts=459 pkt_pos=218331 pkt_size=40888 pict_type=P coded_picture_number=15 17 pkt_pts=501 pkt_pos=460384 pkt_size=27369 pict_type=B coded_picture_number=18 18 pkt_pts=542 pkt_pos=398240 pkt_size=62136 pict_type=B coded_picture_number=17 19 pkt_pts=584 pkt_pos=487761 pkt_size=18984 pict_type=B coded_picture_number=19 20 pkt_pts=626 pkt_pos=259227 pkt_size=139005 pict_type=P coded_picture_number=16 21 pkt_pts=667 pkt_pos=728050 pkt_size=23606 pict_type=B coded_picture_number=22 22 pkt_pts=709 pkt_pos=674950 pkt_size=53092 pict_type=B coded_picture_number=21 23 pkt_pts=751 pkt_pos=751663 pkt_size=15958 pict_type=B coded_picture_number=23
ffmpeg:
1 pkt_pts=42 pkt_pos=588 pkt_size=1548 pict_type=I coded_picture_number=0 2 pkt_pts=125 pkt_pos=2318 pkt_size=93 pict_type=B coded_picture_number=3 3 pkt_pts=83 pkt_pos=2195 pkt_size=117 pict_type=B coded_picture_number=2 4 pkt_pts=167 pkt_pos=2417 pkt_size=82 pict_type=B coded_picture_number=4 5 pkt_pts=63 pkt_pos=2142 pkt_size=47 pict_type=P coded_picture_number=1 6 pkt_pts=209 pkt_pos=2505 pkt_size=45 pict_type=P coded_picture_number=5 7 pkt_pts=250 pkt_pos=2556 pkt_size=45 pict_type=P coded_picture_number=6 8 pkt_pts=292 pkt_pos=2607 pkt_size=46 pict_type=P coded_picture_number=7 9 pkt_pts=334 pkt_pos=2659 pkt_size=46 pict_type=P coded_picture_number=8 10 pkt_pts=375 pkt_pos=2711 pkt_size=46 pict_type=P coded_picture_number=9 11 pkt_pts=417 pkt_pos=2763 pkt_size=47 pict_type=P coded_picture_number=10 12 pkt_pts=459 pkt_pos=2816 pkt_size=47 pict_type=P coded_picture_number=11 13 pkt_pts=542 pkt_pos=12804 pkt_size=640 pict_type=B coded_picture_number=13 14 pkt_pts=501 pkt_pos=2870 pkt_size=9927 pict_type=P coded_picture_number=12 15 pkt_pts=584 pkt_pos=13452 pkt_size=199942 pict_type=I coded_picture_number=14 16 pkt_pts=626 pkt_pos=213402 pkt_size=40888 pict_type=P coded_picture_number=15 17 pkt_pts=751 pkt_pos=455455 pkt_size=27369 pict_type=B coded_picture_number=18 18 pkt_pts=709 pkt_pos=393311 pkt_size=62136 pict_type=B coded_picture_number=17 19 pkt_pts=792 pkt_pos=482832 pkt_size=18984 pict_type=B coded_picture_number=19 20 pkt_pts=667 pkt_pos=254298 pkt_size=139005 pict_type=P coded_picture_number=16 21 pkt_pts=918 pkt_pos=723121 pkt_size=23606 pict_type=B coded_picture_number=22 22 pkt_pts=876 pkt_pos=670021 pkt_size=53092 pict_type=B coded_picture_number=21 23 pkt_pts=959 pkt_pos=746734 pkt_size=15958 pict_type=B coded_picture_number=23
comment:5 by , 10 years ago
Keywords: | h264 added |
---|
Video example:
AVI: http://rghost.ru/54448082
MKV: http://rghost.ru/54429168