I'm new to ffmpeg and I'm having a bit of a mare TBH.  I would like to
ask for some help concerning mpg2 format video conversions.  I am trying
to read a file containing an mpeg2video stream and an audio stream, and
as a first project I'm simply trying to copy the packets back out.  I
use the 'guess_format' for get me the output format for mpeg2 then
simply read the packets and use av_interleaved_write to put them back
out.  Dump_format tells me that there are the two streams expected in
the output.  The problem is that the resultant file contains ONLY a
video stream it seems in this case.  The video plays with no sound.  If
I use the same code to just copy audio packets then the resultant file
contains audio as expected - video only contains video, but the two
together only contain video.

Thing is, if I guess 'mpg' (mpeg1video) then the same code works
correctly (except I get buffer underruns due I'm guessing to the mpeg2
resolution being higher), and the result plays with video and sound.

I'm using av_write_header but it seems to me not to be outputting the
stream information correctly for mpeg2 when there is a video and audio
stream.  Does anybody have any useful pointers to things I could look
at/consider/test to work out the problem

thanks
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to