I have a program that I?ve called ?audio_pin? and another that is ?video_pin? they each take several arguments and each output a audio stream and a video stream respectively. I can easily hock my video_pin to ffmpeg like so: video_pin -i videoInputFileAudioLess.mpg - | ffmpeg -f mpeg -i - output.avi And I can easily hock my audio_pin to ffmpeg like so: audio_pin -i audio.wav - | ffmpeg -f wav -i - output.mp3 Now my question is, how can I merge ?audio_pin? ?s output and ?video_pin? ?s output to create a avi that contains audio and video? Thanks in advance Fredz./
Fr?d?ric v. Bochmann wrote:
I have a program that I?ve called ?audio_pin? and another that is ?video_pin? they each take several arguments and each output a audio stream and a video stream respectively.
I can easily hock my video_pin to ffmpeg like so:
video_pin -i videoInputFileAudioLess.mpg - | ffmpeg -f mpeg -i - output.avi
And I can easily hock my audio_pin to ffmpeg like so:
audio_pin -i audio.wav - | ffmpeg -f wav -i - output.mp3
Now my question is, how can I merge ?audio_pin? ?s output and ?video_pin? ?s output to create a avi that contains audio and video?
In a single command line, I don't think you can. However, ffmpeg -i video_file -i audio_file <options> output_file should be valid syntax; unless there's some reason you *need* to work with stdout and stdin, I don't see any reason you couldn't use that on the files created by video_pin and audio_pin. (Incidentally, the verb "hock" means "sell" as in "sell at a pawnshop". And, are those *smart quotes* I see in your post?) -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
On Fri, Sep 23, 2005 at 01:38:33AM -0400, The Wanderer wrote:
Fr?d?ric v. Bochmann wrote:
I have a program that I?ve called ?audio_pin? and another that is ?video_pin? they each take several arguments and each output a audio stream and a video stream respectively.
I can easily hock my video_pin to ffmpeg like so:
video_pin -i videoInputFileAudioLess.mpg - | ffmpeg -f mpeg -i - output.avi
And I can easily hock my audio_pin to ffmpeg like so:
audio_pin -i audio.wav - | ffmpeg -f wav -i - output.mp3
Now my question is, how can I merge ?audio_pin? ?s output and ?video_pin? ?s output to create a avi that contains audio and video?
In a single command line, I don't think you can. However,
ffmpeg -i video_file -i audio_file <options> output_file
should be valid syntax; unless there's some reason you *need* to work with stdout and stdin, I don't see any reason you couldn't use that on the files created by video_pin and audio_pin.
(Incidentally, the verb "hock" means "sell" as in "sell at a pawnshop". And, are those *smart quotes* I see in your post?)
Yes, they are. And the charset is falsely labelled as latin1. Rich
I've seen some examples using mkfifo, but i'm not sure how well this can work, and if there will be dropped data because of the delay inbetween the command that starts writting to the named pipe, and the command of ffmpeg taking that input. -----Original Message----- From: ffmpeg-user-bounces at mplayerhq.hu [mailto:ffmpeg-user-bounces at mplayerhq.hu] On Behalf Of Rich Felker Sent: September 23, 2005 2:00 AM To: FFMpeg user questions and RTFMs Subject: Re: [Ffmpeg-user] how to input 1 audio pipe + 1 video pipe ? On Fri, Sep 23, 2005 at 01:38:33AM -0400, The Wanderer wrote:
Fr?d?ric v. Bochmann wrote:
I have a program that I?ve called ?audio_pin? and another that is ?video_pin? they each take several arguments and each output a audio stream and a video stream respectively.
I can easily hock my video_pin to ffmpeg like so:
video_pin -i videoInputFileAudioLess.mpg - | ffmpeg -f mpeg -i - output.avi
And I can easily hock my audio_pin to ffmpeg like so:
audio_pin -i audio.wav - | ffmpeg -f wav -i - output.mp3
Now my question is, how can I merge ?audio_pin? ?s output and ?video_pin? ?s output to create a avi that contains audio and video?
In a single command line, I don't think you can. However,
ffmpeg -i video_file -i audio_file <options> output_file
should be valid syntax; unless there's some reason you *need* to work with stdout and stdin, I don't see any reason you couldn't use that on the files created by video_pin and audio_pin.
(Incidentally, the verb "hock" means "sell" as in "sell at a pawnshop". And, are those *smart quotes* I see in your post?)
Yes, they are. And the charset is falsely labelled as latin1. Rich _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
Thanks for the Hock definition, sorry english isn't my first language, and those double quote, are what my outlook spits out when I type: """"""... anyways :) I need to have ffmpeg take the content of video_pin and audio_pin as they're output content is being written. I do not want to wait for the file to be fully outputted from video_pin and/or audio_pin before having ffmpeg work on his input. -----Original Message----- From: ffmpeg-user-bounces at mplayerhq.hu [mailto:ffmpeg-user-bounces at mplayerhq.hu] On Behalf Of The Wanderer Sent: September 23, 2005 1:39 AM To: FFMpeg user questions and RTFMs Subject: Re: [Ffmpeg-user] how to input 1 audio pipe + 1 video pipe ? Fr?d?ric v. Bochmann wrote:
I have a program that I?ve called ?audio_pin? and another that is ?video_pin? they each take several arguments and each output a audio stream and a video stream respectively.
I can easily hock my video_pin to ffmpeg like so:
video_pin -i videoInputFileAudioLess.mpg - | ffmpeg -f mpeg -i - output.avi
And I can easily hock my audio_pin to ffmpeg like so:
audio_pin -i audio.wav - | ffmpeg -f wav -i - output.mp3
Now my question is, how can I merge ?audio_pin? ?s output and ?video_pin? ?s output to create a avi that contains audio and video?
In a single command line, I don't think you can. However, ffmpeg -i video_file -i audio_file <options> output_file should be valid syntax; unless there's some reason you *need* to work with stdout and stdin, I don't see any reason you couldn't use that on the files created by video_pin and audio_pin. (Incidentally, the verb "hock" means "sell" as in "sell at a pawnshop". And, are those *smart quotes* I see in your post?) -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
On Fri, 2005-09-23 at 10:01 -0400, Fr?d?ric v. Bochmann wrote:
Thanks for the Hock definition, sorry english isn't my first language,
I guess you mean "hook" as in "hook up".
and those double quote, are what my outlook spits out when I type: """"""... anyways :)
Ouch. One thing you _can_ control and make your posts more readable, is not to top-post.
Please don't top-post, and please quote correctly. I've fixed the quoting manually, in this case (and that is *always* a pain to do), but I have no interest in doing so in future. Fr?d?ric v. Bochmann wrote: that the Wanderer wrote:
Fr?d?ric v. Bochmann wrote:
I have a program that I?ve called ?audio_pin? and another that is ?video_pin? they each take several arguments and each output a audio stream and a video stream respectively.
I can easily hock my video_pin to ffmpeg like so:
video_pin -i videoInputFileAudioLess.mpg - | ffmpeg -f mpeg -i -output.avi
And I can easily hock my audio_pin to ffmpeg like so:
audio_pin -i audio.wav - | ffmpeg -f wav -i - output.mp3
Now my question is, how can I merge ?audio_pin? ?s output and ?video_pin? ?s output to create a avi that contains audio and video?
In a single command line, I don't think you can. However,
ffmpeg -i video_file -i audio_file <options> output_file
should be valid syntax; unless there's some reason you *need* to work with stdout and stdin, I don't see any reason you couldn't use that on the files created by video_pin and audio_pin.
(Incidentally, the verb "hock" means "sell" as in "sell at a pawnshop". And, are those *smart quotes* I see in your post?)
Thanks for the Hock definition, sorry english isn't my first language, and those double quote, are what my outlook spits out when I type: """"""... anyways :)
As Erik said, you almost certainly meant "hook". It is, or should be, possible to turn off smart quotes even in Outlook (and there are several rants about how and/or why you shouldn't use Outlook to begin with, but they don't really belong here). For the record, however, the quotation marks you just sent above are *not* the same as the ones you sent before - even though you typed the same keys to produce them; that's because Outlook was trying to be clever. You should be able to see the difference if you look at both types in the quoted part above.
I need to have ffmpeg take the content of video_pin and audio_pin as they're output content is being written. I do not want to wait for the file to be fully outputted from video_pin and/or audio_pin before having ffmpeg work on his input.
In a single command line, there is no FFmpeg-internal way to do that AFAIK. Your best bet is, in fact, going to be named pipes - i.e., FIFOs. And no, there will not be any lost data because of the delay between 'audio_pin -i audio_file > audio_fifo' 'video_pin -i video_file > video_fifo' and 'ffmpeg -i video_fifo -i audio_fifo <options> output-file' ; the first data sent to the FIFO will be the first data read out of it. That's why it's called a FIFO - First In, First Out. I'll warn you that no matter what you do, the quality of the resulting video will not be as high this way as it would be if you used two-pass mode - but since two-pass mode needs to use the exact same source files twice, there is no way to do it "on the fly" as you've said you need to. And why do you need to not wait anyway? Unless you're working on streamed source data, i.e. TV broadcast or the like (which you aren't, according to the example command lines you gave), there is no reason why the data have to be handled on-the-fly rather than in discrete steps. -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
I figured it out, mkfifo /tmp/audio audio_pin > /tmp/audio video_pin | ffmpeg -f mjpg -i - -i /tmp/audio output.mpg something like this sort of works, but I'm sure there are tweeking to be done.
I forgot: Change: audio_pin > /tmp/audio By: audio_pin > /tmp/audio & -----Original Message----- From: ffmpeg-user-bounces at mplayerhq.hu [mailto:ffmpeg-user-bounces at mplayerhq.hu] On Behalf Of Fr?d?ric v. Bochmann Sent: September 24, 2005 12:55 PM To: 'FFMpeg user questions and RTFMs' Subject: RE: [Ffmpeg-user] how to input 1 audio pipe + 1 video pipe ? I figured it out, mkfifo /tmp/audio audio_pin > /tmp/audio video_pin | ffmpeg -f mjpg -i - -i /tmp/audio output.mpg something like this sort of works, but I'm sure there are tweeking to be done. _______________________________________________ ffmpeg-user mailing list ffmpeg-user at mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/ffmpeg-user
participants (4)
-
dalias@aerifal.cx -
erik@slagter.name -
fredericbochmann@sympatico.ca -
inverseparadox@comcast.net