LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-09-2005, 06:58 PM   #1
Phorem
Member
 
Registered: Nov 2003
Location: Toronto, Canada
Distribution: Gentoo AMD64
Posts: 374

Rep: Reputation: 30
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
 
Old 01-11-2005, 08:43 PM   #2
Phorem
Member
 
Registered: Nov 2003
Location: Toronto, Canada
Distribution: Gentoo AMD64
Posts: 374

Original Poster
Rep: Reputation: 30
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Polanski Linux - Software 0 07-25-2005 10:05 PM
ffmpeg RySk8er30 Linux - Software 3 06-25-2005 11:10 AM
make[1]: *** [ffmpeg2theora] Error 1 jeffman Linux - Software 8 01-27-2005 04:00 PM
ffmpeg vs mplayer Lobais Linux - Software 1 01-12-2005 12:47 PM
ffmpeg loop bendeco13 Linux - General 1 11-07-2004 10:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration