LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ffmpeg pipe to ffmpeg2theora (https://www.linuxquestions.org/questions/linux-software-2/ffmpeg-pipe-to-ffmpeg2theora-275854/)

Phorem 01-09-2005 06:58 PM

ffmpeg pipe to ffmpeg2theora
 
I'm having troubles taking the output from ffmpeg and piping it to ffmpeg2theora. What i'm trying to do, is stream the video from my Tv card to the Icecast server. I should also note that i can do anything else with the server, in terms of video and music but this eludes me. The problem is that Icecast does get the stream from oggfwd and ffmpeg2theora - so the command does work - but it's very choppy and it only lasts for about min until my memory and swap top out and it crashes. So, i'm assuming that my " - " at the end of the the ffmpeg string that, it's just piping it to memory or that, ffmpeg2theora can't keep pace. Either way, any help on a way to pipe the stream from ffmpeg to ffmpeg2theora would be very helpful. Thanks.


ffmpeg -vd /dev/video0 -r 29.97 -s 720x480 -ad /dev/dsp -f mpeg - | /usr/bin/ffmpeg2theora -a 1 -v 1 -x 160 -y 128 -f dv -o /dev/stdout - | oggfwd 192.168.0.20 8000 password /media.ogg

Phorem 01-11-2005 08:43 PM

Ok, i fixed my own problem. Actually, i fixed it a while ago but i thought i better post how i did it so the next person who googles for the this, will at least have a starting point. The only problem that remains is how the video and sound sync up. To say the least, not very well at all. It's off by 30 seconds at times. Apparently, this is a known issue with ffmpeg.

Here is the new command that will stream video and sound from V4L to the icecast server in the ogg format (theora video and vorbis sound).

ffmpeg -vd /dev/video0 -f mpeg -pix_fmt yuv420p -ad /dev/dsp -ac 1 - | ffmpeg2theora -a 1 -v 5 -x 320 -y 240 -o /dev/stdout - | oggfwd 192.168.0.20 8000 password /tv.ogg

This is what the ffmpeg FAQ said....
http://ffmpeg.sourceforge.net/faq.html#SEC4

"1.3 I get audio/video synchronization problems when grabbing.

Currently, the grabbing stuff does not handle synchronisation correctly. You are free to correct it. A fix is planned."




I guess it's just good for video right now. Oh well.:cool:


All times are GMT -5. The time now is 09:01 PM.