[FFmpeg-trac] #3339(undetermined:open): Remuxing m2ts to mkv, Can't write packet with unknown timestamp

FFmpeg trac at avcodec.org
Thu Oct 23 19:24:07 CEST 2014


#3339: Remuxing m2ts to mkv,  Can't write packet with unknown timestamp
-------------------------------------+-------------------------------------
             Reporter:  Selur        |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  important    |                Component:
              Version:  git-master   |  undetermined
             Keywords:               |               Resolution:
  av_interleaved_write_frame h264    |               Blocked By:
  regression                         |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by peter_b):

 @cehoyos:
 I've reverted back to N-57590-ge166b82 (=one before 4eb49fdd), and there
 it works as expected.
 The resulting MKV file plays fine and audio/video is in-sync. Even after
 seeking.


 Complete, uncut commandline and console output:

 '''Old version:'''
 {{{
 =======================
 $ ffmpeg -fflags +genpts -i 00534.MTS -c copy output.mkv
 -----------------------
 ffmpeg version N-57590-ge166b82 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Oct 23 2014 19:04:22 with gcc 4.6 (Ubuntu/Linaro
 4.6.3-1ubuntu5)
   configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
 --enable-version3 --enable-postproc --enable-swscale --enable-avfilter
 --enable-pthreads --enable-bzlib --enable-zlib --enable-decoder=png
 --enable-encoder=png --enable-libfreetype --enable-libschroedinger
 --enable-libopenjpeg --disable-decoder=jpeg2000 --enable-libvpx --enable-
 libvorbis --enable-libx264 --enable-libfaac
   libavutil      52. 48.100 / 52. 48.100
   libavcodec     55. 39.100 / 55. 39.100
   libavformat    55. 19.104 / 55. 19.104
   libavdevice    55.  5.100 / 55.  5.100
   libavfilter     3. 90.100 /  3. 90.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 [mpegts @ 0x1a099e0] PES packet size mismatch
 Input #0, mpegts, from '00534.MTS':
   Duration: 00:32:41.34, start: 1961.264000, bitrate: 17052 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p,
 1440x1080 [SAR 4:3 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
     Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
 fltp, 256 kb/s
 File 'output.mkv' already exists. Overwrite ? [y/N] y
 Output #0, matroska, to 'output.mkv':
   Metadata:
     encoder         : Lavf55.19.104
     Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1440x1080 [SAR
 4:3 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc
     Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 256
 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [mpegts @ 0x1a099e0] PES packet size mismatchime=00:32:19.25
 bitrate=16254.2kbits/s
 frame=98040 fps=2522 q=-1.0 Lsize= 3892513kB time=00:32:41.31
 bitrate=16258.2kbits/s
 video:3829927kB audio:61274kB subtitle:0 global headers:0kB muxing
 overhead 0.033730%
 }}}


 '''Current git HEAD:'''
 {{{
 =======================
 $ ffmpeg_git -fflags +genpts -i 00534.MTS -c copy output.mkv
 -----------------------
 ffmpeg version N-67111-g5ea0753 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Oct 23 2014 19:22:40 with gcc 4.6 (Ubuntu/Linaro
 4.6.3-1ubuntu5)
   configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
 --enable-version3 --enable-postproc --enable-swscale --enable-avfilter
 --enable-pthreads --enable-bzlib --enable-zlib --enable-decoder=png
 --enable-encoder=png --enable-libfreetype --enable-libschroedinger
 --enable-libopenjpeg --disable-decoder=jpeg2000 --enable-libx264 --enable-
 libfaac
   libavutil      54. 10.100 / 54. 10.100
   libavcodec     56.  9.100 / 56.  9.100
   libavformat    56. 10.100 / 56. 10.100
   libavdevice    56.  1.100 / 56.  1.100
   libavfilter     5.  2.100 /  5.  2.100
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  3.100 / 53.  3.100
 [mpegts @ 0x2960de0] PES packet size mismatch
 Input #0, mpegts, from '00534.MTS':
   Duration: 00:32:41.38, start: 1961.264000, bitrate: 17051 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p,
 1440x1080 [SAR 4:3 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
     Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo,
 fltp, 256 kb/s
 File 'output.mkv' already exists. Overwrite ? [y/N] y
 Output #0, matroska, to 'output.mkv':
   Metadata:
     encoder         : Lavf56.10.100
     Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1440x1080 [SAR
 4:3 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc
     Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 256
 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [matroska @ 0x2966520] Can't write packet with unknown timestamp
 av_interleaved_write_frame(): Invalid argument
 [matroska @ 0x2966520] Can't write packet with unknown timestamp
 frame=   29 fps=0.0 q=-1.0 Lsize=     159kB time=00:00:01.09
 bitrate=1189.3kbits/s
 video:1174kB audio:19kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 Conversion failed!
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3339#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list