MPEG transport stream with h264 video and aac audio
Hello, I am trying to encapsulate h264 video and aac audio in MPEG transport stream container using ffmpeg via re-encoding of various input media files. The encoding process runs OK with progress in console and so on but at the end the output is damaged: no audio when playing, video starts to stutter after the first several seconds. At the same time when doing the above but producing h264 video and aac audio in mp4 container all is OK and the output sounds fine when played back. Example command lines I use: ffmpeg -i g:\testmedia\weddingdate.wmv -f mp4 -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4 This one works OK! ffmpeg -i g:\testmedia\weddingdate.wmv -f mpegts -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4 This one causes the playback to stutter. For the tests I use ffmpeg revision 21736 and latest x264 library. Is there something specific that should be added to command line or the problem is elsewhere? Regards, Nick
Are you preparing the file for iPhone HTTP streaming? In such a case there are few issues about ffmpeg encoded files (mpeg-ts) and segmenter tools. Nick Kichukov wrote:
Hello,
I am trying to encapsulate h264 video and aac audio in MPEG transport stream container using ffmpeg via re-encoding of various input media files. The encoding process runs OK with progress in console and so on but at the end the output is damaged: no audio when playing, video starts to stutter after the first several seconds.
At the same time when doing the above but producing h264 video and aac audio in mp4 container all is OK and the output sounds fine when played back.
Example command lines I use:
ffmpeg -i g:\testmedia\weddingdate.wmv -f mp4 -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one works OK!
ffmpeg -i g:\testmedia\weddingdate.wmv -f mpegts -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one causes the playback to stutter.
For the tests I use ffmpeg revision 21736 and latest x264 library. Is there something specific that should be added to command line or the problem is elsewhere?
Regards, Nick _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Hello,
I am trying to encapsulate h264 video and aac audio in MPEG transport stream container using ffmpeg via re-encoding of various input media files. The encoding process runs OK with progress in console and so on but at the end the output is damaged: no audio when playing, video starts to stutter after the first several seconds.
At the same time when doing the above but producing h264 video and aac audio in mp4 container all is OK and the output sounds fine when played back.
Example command lines I use:
ffmpeg -i g:\testmedia\weddingdate.wmv -f mp4 -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one works OK!
ffmpeg -i g:\testmedia\weddingdate.wmv -f mpegts -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one causes the playback to stutter.
For the tests I use ffmpeg revision 21736 and latest x264 library. Is there something specific that should be added to command line or the problem is elsewhere? Nothing to add AFAIK, the MPEG-TS container is seriously broken in ffmpeg, already for a long time, search the list for others also having
Nick Kichukov wrote: problems with this container. Try tsMuxeR/tsMuxerGUI, has linux/windows/osx versions available, free, but not open-source.
Regards, Nick _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
On Thu, Mar 11, 2010 at 1:09 PM, belcampo <belcampo at zonnet.nl> wrote:
Nick Kichukov wrote:
Hello,
I am trying to encapsulate h264 video and aac audio in MPEG transport stream container using ffmpeg via re-encoding of various input media files. The encoding process runs OK with progress in console and so on but at the end the output is damaged: no audio when playing, video starts to stutter after the first several seconds.
At the same time when doing the above but producing h264 video and aac audio in mp4 container all is OK and the output sounds fine when played back.
Example command lines I use:
ffmpeg -i g:\testmedia\weddingdate.wmv -f mp4 -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one works OK!
ffmpeg -i g:\testmedia\weddingdate.wmv -f mpegts -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one causes the playback to stutter.
For the tests I use ffmpeg revision 21736 and latest x264 library. Is there something specific that should be added to command line or the problem is elsewhere?
Nothing to add AFAIK, the MPEG-TS container is seriously broken in ffmpeg, already for a long time, search the list for others also having problems with this container. Try tsMuxeR/tsMuxerGUI, has linux/windows/osx versions available, free, but not open-source.
Regards, Nick _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
_______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
So there is nothing which can be done in the context of ffmpeg beeing used as encoding solution? As mentioned above my purpose is iPhone HTTP streaming.
So there is nothing which can be done in the context of ffmpeg beeing used as encoding solution? As mentioned above my purpose is iPhone HTTP streaming.
Have you tried http://lists.mplayerhq.hu/pipermail/libav-user/2009-May/003034.html ? Try also combine it with output-example.c (BTW. I do only video, no sound) I couldn't generate playable files for frame rates lover than 1/50 until I changed c->rc_max_rate to c->rc_max_rate = c->bit_rate; Also, don't assume that there is 1 to 1 relationship between vlc and iPhone. Sometimes VLC will play what iPhone won't and some files will be broken in VLC and will play ok on iPhone. Hope this helps, Tymek
On 03/11/2010 03:09 AM, belcampo wrote:
Hello,
I am trying to encapsulate h264 video and aac audio in MPEG transport stream container using ffmpeg via re-encoding of various input media files. The encoding process runs OK with progress in console and so on but at the end the output is damaged: no audio when playing, video starts to stutter after the first several seconds.
At the same time when doing the above but producing h264 video and aac audio in mp4 container all is OK and the output sounds fine when played back.
Example command lines I use:
ffmpeg -i g:\testmedia\weddingdate.wmv -f mp4 -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one works OK!
ffmpeg -i g:\testmedia\weddingdate.wmv -f mpegts -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one causes the playback to stutter.
For the tests I use ffmpeg revision 21736 and latest x264 library. Is there something specific that should be added to command line or the problem is elsewhere? Nothing to add AFAIK, the MPEG-TS container is seriously broken in ffmpeg, already for a long time, search the list for others also having
Nick Kichukov wrote: problems with this container. Try tsMuxeR/tsMuxerGUI, has linux/windows/osx versions available, free, but not open-source.
You should retry with the latest svn. FFmpeg creates perfectly working HTTP live streaming files. It seems the open source segmenter has a few flaw as well. Also, please avoid suggesting closed source software on this mailing list. Thanks for your understanding. -- Baptiste COUDURIER Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
On 03/11/2010 03:09 AM, belcampo wrote:
Hello,
I am trying to encapsulate h264 video and aac audio in MPEG transport stream container using ffmpeg via re-encoding of various input media files. The encoding process runs OK with progress in console and so on but at the end the output is damaged: no audio when playing, video starts to stutter after the first several seconds.
At the same time when doing the above but producing h264 video and aac audio in mp4 container all is OK and the output sounds fine when played back.
Example command lines I use:
ffmpeg -i g:\testmedia\weddingdate.wmv -f mp4 -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one works OK!
ffmpeg -i g:\testmedia\weddingdate.wmv -f mpegts -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one causes the playback to stutter.
For the tests I use ffmpeg revision 21736 and latest x264 library. Is there something specific that should be added to command line or the problem is elsewhere? Nothing to add AFAIK, the MPEG-TS container is seriously broken in ffmpeg, already for a long time, search the list for others also having
Nick Kichukov wrote: problems with this container. Try tsMuxeR/tsMuxerGUI, has linux/windows/osx versions available, free, but not open-source.
You should retry with the latest svn. FFmpeg creates perfectly working HTTP live streaming files.
It seems the open source segmenter has a few flaw as well.
Also, please avoid suggesting closed source software on this mailing list. Thanks for your understanding. Is there any open-source solution at the moment ? Not AFAIK, I also do
Baptiste Coudurier wrote: prefer open-source but if there is not alternative ?
On 03/11/2010 01:22 PM, belcampo wrote:
Baptiste Coudurier wrote:
On 03/11/2010 03:09 AM, belcampo wrote:
Hello,
I am trying to encapsulate h264 video and aac audio in MPEG transport stream container using ffmpeg via re-encoding of various input media files. The encoding process runs OK with progress in console and so on but at the end the output is damaged: no audio when playing, video starts to stutter after the first several seconds.
At the same time when doing the above but producing h264 video and aac audio in mp4 container all is OK and the output sounds fine when played back.
Example command lines I use:
ffmpeg -i g:\testmedia\weddingdate.wmv -f mp4 -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one works OK!
ffmpeg -i g:\testmedia\weddingdate.wmv -f mpegts -acodec aac -ar 48000 -ab 64k -s 320?240 -vcodec libx264 -b 96k -flags +loop -cmp +chroma -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 200k -maxrate 96k -bufsize 96k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 320:240 -g 30 -async 2 g:\testmedia\output.mp4
This one causes the playback to stutter.
For the tests I use ffmpeg revision 21736 and latest x264 library. Is there something specific that should be added to command line or the problem is elsewhere? Nothing to add AFAIK, the MPEG-TS container is seriously broken in ffmpeg, already for a long time, search the list for others also having
Nick Kichukov wrote: problems with this container. Try tsMuxeR/tsMuxerGUI, has linux/windows/osx versions available, free, but not open-source.
You should retry with the latest svn. FFmpeg creates perfectly working HTTP live streaming files.
It seems the open source segmenter has a few flaw as well.
Also, please avoid suggesting closed source software on this mailing list. Thanks for your understanding. Is there any open-source solution at the moment ? Not AFAIK,
Please try with latest svn, it produces perfectly playable files on quicktime X and iphone.
I also do prefer open-source but if there is not alternative ?
The point is not whether there is an alternative or not. You are free to send someone a personal recommendation in private mail, but please avoid suggesting closed software on this mailing list. This mailing list is ffmpeg-user, not a forum for video transcoding ;) Again, thanks for your understanding. -- Baptiste COUDURIER Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA FFmpeg maintainer http://www.ffmpeg.org
You should retry with the latest svn. FFmpeg creates perfectly working HTTP live streaming files.
Please try with latest svn, it produces perfectly playable files on quicktime X and iphone.
It seems clear that iPhone streaming is the next big thing and both of these statements are very general. I think a tutorial would help here a lot:) With it documented properly both on ffmpeg and lib level ffmpeg project could become a leader here easily. Cheers Tymek
participants (5)
-
baptiste.coudurier@gmail.com -
belcampo@zonnet.nl -
massimiliano.petrucci@ing.unitn.it -
tymek.majewski@cubitech.co.uk -
visuall@gmail.com