[Libav-user] Troubles with transcoding

hatred adrozdoff at gmail.com
Wed Nov 21 07:42:31 CET 2012

Hi List!

I have FFMPEG 1.0 installed in my ArchLinux box, I try to write simple
audio+video transcoder example using existings doc/examples/muxing.c and
doc/examples/demuxing.c ones and I have trouble: I can't listen sound in
resulting file.

Source example with command line to compile: http://pastebin.com/F9R5qpPz
g++ -Wall -O2 -g -D__STDC_CONSTANT_MACROS -o video-sound-transcoding-test
video-sound-transcoding-test.cpp -lm -lavdevice -lavformat -lavfilter
-lavcodec -lswresample -lswscale -lavutil

./video-sound-transcoding-test input_file.avi out.ts

I test only for MPEGTS output as more needed for me.

Other info:
1. If input file contain only sound stream transcoding finished successfuly
and I can listen sound in resulting file well.
2. If I comment code and skip video stream in input file transcoding
finished successfuly also and I can listen sound in resulting file well.
3. Video transcoded very well
4. transcoding with ffmpeg is valid: ffmpeg -i input_file.avi -f mpegts
out.ts but I don't fully understand its code.

So I don't understand how to correctly I must encode/muxing audio+video and
all suggestions is welcome!

Thank for every answer, List!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20121121/37461375/attachment.html>

More information about the Libav-user mailing list