[Libav-user] cannot remux some files using the sample code

dant dantmnf2 at gmail.com
Sat Aug 23 16:13:32 CEST 2014


Hello,

I am learning how to use libavformat to remux a file and I found this:
doc/samples/remuxing.c

However, I run into some troubles:
<pre>% ./remuxing a.mkv b.mp4
Input #0, matroska,webm, from 'a.mkv':
  Metadata:
    ENCODER         : Lavf55.19.104
  Duration: 00:01:33.18, start: 0.083000, bitrate: 1723 kb/s
    Stream #0:0(jpn): Video: h264 (High), yuv420p, 1280x720 [SAR 1:1
DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0:1(jpn): Audio: aac, 48000 Hz, stereo, fltp (default)
    Metadata:
      title           : Japanese Audio
      LANGUAGE        : jpn
Output #0, mp4, to 'b.mp4':
    Stream #0:0: Video: h264, yuv420p, 1280x720 [SAR 1:1 DAR 16:9],
q=2-31, 47.95 tbc
    Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp
[mp4 @ 0xb7ede0] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
[mp4 @ 0xb7ede0] Using AVStream.codec.time_base as a timebase hint to
the muxer is deprecated. Set AVStream.time_base instead.
in: pts:83 pts_time:0.083 dts:NOPTS dts_time:NOPTS duration:0
duration_time:0 stream_index:0
out: pts:3984 pts_time:0.083 dts:NOPTS dts_time:NOPTS duration:0
duration_time:0 stream_index:0
in: pts:542 pts_time:0.542 dts:NOPTS dts_time:NOPTS duration:41
duration_time:0.041 stream_index:0
out: pts:26016 pts_time:0.542 dts:NOPTS dts_time:NOPTS duration:1968
duration_time:0.041 stream_index:0
[mp4 @ 0xb7ede0] Application provided invalid, non monotonically
increasing dts to muxer in stream 0: 3984 >= 3984
Error muxing packet
Error occurred: Invalid argument</pre>

PS. Everything is OK when I use "ffmpeg -i a.mkv -c copy b.mp4" to do it.


More information about the Libav-user mailing list