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

FFmpeg trac at avcodec.org
Wed Jan 22 07:53:02 CET 2014


#3339: Remuxing m2ts to mkv,  Can't write packet with unknown timestamp
-------------------------------------+-------------------------------------
             Reporter:  Selur        |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 When trying to remux an m2ts file to mkv I using:

 {{{
 ffmpeg -fflags +genpts -i "sample.m2ts"  -c:v copy  -an "output.mkv"
 }}}

 I get:
 {{{
 ffmpeg version N-60023-g13e0109 Copyright (c) 2000-2014 the FFmpeg
 developers
   built on Jan 21 2014 08:22:57 with gcc 4.8.2 (x86_64-win32-sjlj, Built
 by MinGW-W64 project)
   configuration: --arch=x86_64 --prefix=/local64 --extra-
 cflags='-DPTW32_STATIC_LIB -DLIBTWOLAME_STATIC' --extra-libs='-lxml2 -lz
 -liconv -lws2_32 -lstdc++ -lpng -lm -lpthread -lwsock32' --disable-debug
 --enable-gpl --enable-version3 --enable-postproc --enable-w32threads
 --enable-runtime-cpudetect --enable-memalign-hack --disable-shared
 --enable-static --enable-avfilter --enable-bzlib --enable-zlib --enable-
 librtmp --enable-gnutls --enable-avisynth --enable-frei0r --enable-
 filter=frei0r --enable-libbluray --enable-libcaca --enable-libopenjpeg
 --enable-fontconfig --enable-libfreetype --enable-libass --enable-libgsm
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-
 libschroedinger --enable-libsoxr --enable-libtwolame --enable-libutvideo
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvo-
 aacenc --enable-libopus --enable-libvidstab --enable-libvpx --enable-
 libxavs --enable-libx264 --enable-libxvid --enable-libzvbi
   libavutil      52. 63.100 / 52. 63.100
   libavcodec     55. 48.102 / 55. 48.102
   libavformat    55. 25.100 / 55. 25.100
   libavdevice    55.  5.102 / 55.  5.102
   libavfilter     4.  1.100 /  4.  1.100
   libswscale      2.  5.101 /  2.  5.101
   libswresample   0. 17.104 /  0. 17.104
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mpegts, from 'C:\Users\Selur\Desktop\sample.m2ts':
   Duration: 00:00:09.02, start: 600.000000, bitrate: 11585 kb/s
   Program 1
     Stream #0:0[0x1011]: Video: h264 (High) ([27][0][0][0] / 0x001B),
 yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn,
 47.95 tbc
     Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
 5.1(side), fltp, 640 kb/s
         Output #0, matroska, to 'C:\Users\Selur\Desktop\output.mkv':
   Metadata:
     encoder         : Lavf55.25.100
     Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR
 1:1 DAR 16:9], q=2-31, 23.98 fps, 1k
         tbn, 90k tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 [matroska @ 00000000058ac980] Can't write packet with unknown timestamp
 av_interleaved_write_frame(): Invalid argument
 frame=   25 fps=0.0 q=-1.0 Lsize=       4kB time=00:00:00.91 bitrate=
 35.8kbits/s
 video:234kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 -98.282415%
 }}}

 file used to produce the problem: http://anonymousdelivers.us/134423

 Cu Selur

 Ps.: I frist used the same call without '-fflags +genpts', but added
 '-fflags +genpts' after reading: https://trac.ffmpeg.org/ticket/1552 and
 https://trac.ffmpeg.org/ticket/1553. Created a new debug entry since 1552
 uses avi as input and 1553 uses mpeg2 video and not H264.
 Stumpled over this after reading https://github.com/jb-alvarado/media-
 autobuild_suite/issues/8, seems like this problem does not exist in the
 stable build.

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


More information about the FFmpeg-trac mailing list