[FFmpeg-user] Process video while streaming from youtube?

Robert Johnston anaerin at gmail.com
Fri Oct 7 05:17:59 CEST 2011

On October-06-11 7:20:05 PM, Wael Louis wrote:
> I have some image processing function that I want to apply to a video. I am
> re-implementing the function in PHP. What I am planning to do is the
> following:
> 1- On my website, a user search a video from Youtube (I have google code API
> for YouTube).
> 2- The desired video doesn't play right away, rather my image processing
> function is applied on the streamed data. And the user only gets the
> processed video.
> I know one of the methods would be saving the video then processing it using
> FFMPEG, but what I want to do is processing whatever is buffered and
> displaying the processed frames.
> An example: I want to do what is called cartooning. I have the function for
> it, so by just entering YouTube, I need to display the cartooned video
> 'instantly'; hence, I want to process the video on the go.
> Do you know if that is possible ? can you please guide me to some possible
> approaches ?

How about using pipes to run the data through FFMpeg. WGet to STDOUT, 
pipe that into FFMpeg with FFMpeg's STDOUT then serving to the client? 
So, something like:

wget -q0- http://youtube.address/goes/here | ffmpeg -i -- <parameters 
go here> --

More information about the ffmpeg-user mailing list