[FFmpeg-devel] rtmp support and librtmp

Stefano Sabatini stefano.sabatini-lala
Mon Sep 27 00:48:29 CEST 2010


On date Monday 2010-09-27 00:16:52 +0200, aviad rozenhek encoded:
> On Sun, Jun 6, 2010 at 10:36, Howard Chu <hyc at highlandsun.com> wrote:
> 
> > aviad rozenhek wrote:
> >
> >> On Thu, Jun 3, 2010 at 15:06, trueice<trueice at gmail.com>  wrote:
> >>
> >>  On Wed, Jun 2, 2010 at 9:42 PM, aviad rozenhek<aviadr1 at gmail.com>
> >>>  wrote:
> >>>
> >>>>
> >>>>> it says the stream is not found
> >>>>>
> >>>>
> >>>>  try:
> >>> ./ffplay "rtmp://myserver/live/mystream live=1"
> >>>
> >>>
> >>>  it works!
> >> however embedded spaces are indeed annoying.
> >>
> >
> > Feel free to write a better solution. Take as much time as you like.
> >
> >
> How about this general purpose method of passing parameters to protocols?
> 
> instead of:
> udp://localhost?pkt_size=1316&localport=1234
> [where ?pkt_size=1316&localport=1234 are actually parameters to udp
> protocol] use
> udp?pkt_size=1316&localport=1234://localhost
> 
> and in the same manner, instead of
> "rtmp://localhost/live/mystream live=1 buffer=100"
> [where live=1 buffer=100 are actually parameters to rtmp protocol instead of
> part of url] use
> rtmp?live=1&buffer=100://localhost/live/mystream
> 
> this achieves a couple of things
> 1) it is clear which parameters are part of the real url, and which are
> ffmpeg-specific flags
> 2) it reuses familiar syntax with the ? & notation
> 3) since & and ? are not legal in protocol names, this shouldnt break
> anything

Another "option": use something like -proto_opts="..." and use
av_parse_options() (currently in libavfilter/parseutils.c, but can be
moved to lavu now that AVOptions are there) for setting the options in
the url context.

That should be more generic and possibly more robust, as it shouldn't
require &/? escaping.

Regards.
-- 
FFmpeg = Foolish and Fierce Magic Pacific Exxagerate Gorilla



More information about the ffmpeg-devel mailing list