[Libav-user] Problem with remuxing.c example

Mario Kicherer dev at kicherer.org
Sun Sep 20 17:58:39 CEST 2015


I am writing an application that remuxes videos. The code for this
is based on the official remuxing.c [1] example. Unfortunately,
if I remux the example video [2] that has the following streams
according to ffprobe 2.7.2:

Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709), 
1280x720 [SAR 1:1 DAR 16:9], 3285 kb/s, 50 fps, 50 tbr, 50 tbn, 100 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 
192 kb/s

with my or the official example, the audio in the resulting video
stutters with VLC. mplayer and MPV play the video correctly but
mplayer shows "Cannot seek in raw AVI streams" when I try to seek.

If I remux the resulting video with:

ffmpeg -i out1.avi -acodec copy -vcodec copy out2.avi

it also plays fine with VLC.

Can somebody tell me what I have to change to fix this problem?

The PTS/DTS look similar to the original file. After reading the
"Cannot seek in raw AVI streams" message, I thought I may have to
create the index somehow myself but I did not find any information
how to do this.

Thank you very much!

[1] https://www.ffmpeg.org/doxygen/2.6/remuxing_8c_source.html
[2] https://my.owndrive.com/index.php/s/2GRYHsBpnM4xEVB

More information about the Libav-user mailing list