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

FFmpeg trac at avcodec.org
Sat Jun 18 17:27:43 CEST 2016

#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 hunnypuppy):

 ts -> mp4 -> mkv does not always work due to the following issue, ffmpeg
 can't write LATM audio packets into a MP4 but CAN write then directly into
 a MKV. I saw a ticket on this somewhere and it appears to a MP4 format
 limitation. So in these cases TS -> MKV is the only option. But with this
 ticket open, then that won't work either.

      Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p(tv,
 bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 50 tbr, 90k tbn, 90k
      Stream #0:1(eng): Audio: aac_latm (LC) ([17][0][0][0] / 0x0011),
 48000 Hz, stereo
  Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Stream #0:1 -> #0:1 (copy)
 Could not write header for output file #0 (incorrect codec parameters ?):
 Invalid argument

 Replying to [comment:23 moparisthebest]:
 > Replying to [comment:22 cehoyos]:
 > > Then you see a different issue than the one described in this ticket.
 > Maybe or maybe not, both fail with:
 > {{{
 > [matroska @ 0x259aec0] Can't write packet with unknown timestamp
 > av_interleaved_write_frame(): Invalid argument
 > }}}
 > and both can be worked around by going ts -> mp4 -> mkv, that seemed
 similar enough to the folks on IRC and me to put here.  Feel free to split
 it off to another ticket if you think so.

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

More information about the FFmpeg-trac mailing list