Page 1 of 1

Stream conversion on the FLY

Posted: Tue May 06, 2014 2:46 pm
by ironhide707
Hey all,
As the title suggests, i need to know that how can i convert a stream to a required format. My application structure is like this:

1- I have a parser which parses a youtube video download response which in turn provides me with different stream URLS.
2 - After that i want to grab that input stream and put it inside a container which could flv or 3GP.

I read somewhere that FFMPEG has the option of using HTTP protocol for getting streams so i did something like this:

ffmpeg -i http:http:

But it gives me this error:
[tcp @ 0200bc60] Port missing in uri
http:http: ... .40.157.23:
Input/output error

Please it would be very helpful for me if someone can help me on this.


Re: Stream conversion on the FLY

Posted: Tue May 06, 2014 10:18 pm
by svnpenn
This seems to do it

Code: Select all

youtube-dl -g wsVNgB_DS_g | xargs -i ffmpeg -i {} outfile.flv

Re: Stream conversion on the FLY

Posted: Thu May 08, 2014 11:28 am
by ironhide707
Yup, got it to work :) thanks svnpenn. I have another question though, i am actually doing all this using PHP scripts, i just wanted to know one thing, is it possible to send the converted stream to a client using php scripts OR more better using FFMPEG? if anyone has any sort of info on this lemme know.

Re: Stream conversion on the FLY

Posted: Mon Jun 09, 2014 10:59 am
by heklind
I'm not sure what do you mean. ffmpeg download, then save transcoded video file to the destination you provided. Now you can play it whathever you like (you can use scripts and whatever you want, to play file from the destination you provided in ffmpeg command line).