Encoding while capturing fails
Hello, I'm using ffmpeg on ubuntu for two weeks now and I'm amazed of how good it works. Especially with pipes and named pipes it's really nice to play. My question: I'm capturing uncompressed audio and video (both raw and seperate) on a server. After 2,4 or 6 seconds of starting the capture I want ffmpeg to start encoding the capturing(audio and video) on another workstation. ( I want many workstations encoding the same file to different formats while it's beeing captured :)) The problem now is, that ffmpeg is too fast for this situation. The end of file is reached before capturing ends. ffmpeg aborts encoding. Is there a way to tell ffmpeg not to abort encoding until someone manually stops ffmpeg? Or is there another way? Perhaps there it's possible to force ffmpeg to encode in realtime even if it could do much faster!? I don't want to use pipes or named pipes. There are some reasons for me not to use pipes . For me it's important to encode a file which is getting larger and larger and with a delay of max. 10 seconds. Any help? Thanks for reading my post ;) __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com
On 2010-03-20 20:48, Murat Yildiz wrote:
Hello, I'm using ffmpeg on ubuntu for two weeks now and I'm amazed of how good it works. Especially with pipes and named pipes it's really nice to play. My question: I'm capturing uncompressed audio and video (both raw and seperate) on a server. After 2,4 or 6 seconds of starting the capture I want ffmpeg to start encoding the capturing(audio and video) on another workstation. ( I want many workstations encoding the same file to different formats while it's beeing captured :)) The problem now is, that ffmpeg is too fast for this situation. The end of file is reached before capturing ends. ffmpeg aborts encoding. Is there a way to tell ffmpeg not to abort encoding until someone manually stops ffmpeg? Or is there another way? Perhaps there it's possible to force ffmpeg to encode in realtime even if it could do much faster!? I don't want to use pipes or named pipes. There are some reasons for me not to use pipes . For me it's important to encode a file which is getting larger and larger and with a delay of max. 10 seconds. Any help? Thanks for reading my post ;)
Well, I'm having some trouble seeing why you can't use (named) pipes. After all, that's what they are made for. If you're really looking for a workaround, how about tail? Then ffmpeg wont reach "end-of-file", because tail keeps waiting for the file to be appended. Should work. Maybe something like tail -c1G file-that-keeps-growing | ffmpeg ... The argument "-c1G" should make tail read up to 1024MB of the existing file, if you happen to tail it a bit late. This is just to make sure that any initial data gets sent to ffmpeg. Otherwise, the output would surely be corrupted, or at least partially missing. Hope this helps. -- Med venlig hilsen Christian Iversen
Thank you Christian but there is one further problem. Capturing looks like this: capture -f videofile.raw -a audiofile.raw After the capturing I have to do something like this: ffmpeg -f rawvideo -pix_fmt uyvy422 -s 720x576 -i videofile.raw -f s16le -acodec pcm_s16le -ar 48000 -ac 2 -i audiofile.raw -b 7000k -vcodec mpeg2video -acodec mp2 -ab 192k /tmp/test.mpg So..how can I tail two files to ffmpeg? Why I don't want to use named pipes? It doesn't work with two files(Audio and Video). It works with one file Audio or Video. The capture doesn't starts.But this has something to do with my capturing software. So I gave up handling with named pipes. And the other problem is that I can't access succesfully to the named pipes with differnt applications at the sametime.Many Datapackets loss. This is because of the huge data amount(uncompressed 20-40mb/s). ________________________________ Von: Christian Iversen <chrivers at iversen-net.dk> An: FFmpeg user questions and RTFMs <ffmpeg-user at mplayerhq.hu> Gesendet: Samstag, den 20. M?rz 2010, 22:00:30 Uhr Betreff: Re: [FFmpeg-user] Encoding while capturing fails On 2010-03-20 20:48, Murat Yildiz wrote:
Hello, I'm using ffmpeg on ubuntu for two weeks now and I'm amazed of how good it works. Especially with pipes and named pipes it's really nice to play. My question: I'm capturing uncompressed audio and video (both raw and seperate) on a server. After 2,4 or 6 seconds of starting the capture I want ffmpeg to start encoding the capturing(audio and video) on another workstation. ( I want many workstations encoding the same file to different formats while it's beeing captured :)) The problem now is, that ffmpeg is too fast for this situation. The end of file is reached before capturing ends. ffmpeg aborts encoding. Is there a way to tell ffmpeg not to abort encoding until someone manually stops ffmpeg? Or is there another way? Perhaps there it's possible to force ffmpeg to encode in realtime even if it could do much faster!? I don't want to use pipes or named pipes. There are some reasons for me not to use pipes . For me it's important to encode a file which is getting larger and larger and with a delay of max. 10 seconds. Any help? Thanks for reading my post ;)
Well, I'm having some trouble seeing why you can't use (named) pipes. After all, that's what they are made for. If you're really looking for a workaround, how about tail? Then ffmpeg wont reach "end-of-file", because tail keeps waiting for the file to be appended. Should work. Maybe something like tail -c1G file-that-keeps-growing | ffmpeg ... The argument "-c1G" should make tail read up to 1024MB of the existing file, if you happen to tail it a bit late. This is just to make sure that any initial data gets sent to ffmpeg. Otherwise, the output would surely be corrupted, or at least partially missing. Hope this helps. -- Med venlig hilsen Christian Iversen _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user __________________________________________________ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verf?gt ?ber einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com
participants (2)
-
chrivers@iversen-net.dk -
mymurat@yahoo.com