viernes, 17 de agosto de 2012

RTMP listen went into libav

After some time we have managed to get rtmp listen into libav master. It has been harder than getting the last rtsp patch I announced in this same blog mainly because I didn't have any experience with rtmp. I have to thank Martin and Luca who had a lot of patience with me and in general to all the people within libav.

Now libav supports receiving a stream with the rtmp publish command, no authentication, no encryption, no... but at least it is a first step.

Now anyone can use the -rtmp_listen 1 argument to receive a stream and -timeout x to set an initial timeout to wait for incoming connections. How can we then receive an rtmp stream on our machine?

avconv -rtmp_listen 1 -f flv -timeout 10 rtmp://localhost/app/test outfile

on the other side to send the stream is as easy as:

avconv -i inputfile -f flv rtmp://localhost/app/test

Isn't that nice? And what if I want to just play my favorite movie on the laptop connected to my tv without using those slow pendrives?

"avplay -f flv -rtmp_listen 1 rtmp://my_ip/app/test" on the laptop and "avconv -i inputfile -f flv -c copy rtmp://my_ip/app/test" in your desktop.

Now using raw tcp, rtsp or rtmp to receive your streams is only a matter of choice.

Oh, didn't I say it? now you can use tcp://address:port/path?listen with your avconv to receive raw tcp streams. (Don't forget to set the output format with -f in the sender side)

recv: avconv -i tcp://ip:port/path?listen outfile

send: avconv -i inputfile -f format tcp://ip:port/path

I think that is all by now. Next improvement... Multiple connections!

 

miércoles, 11 de julio de 2012

RTSP listen went into libav

Finally we did it, the RTSP announce/record scenario I announced some months ago has been accepted into libav. This means that anyone will be able to receive rtsp streams on demand with avconv or avplay. With this enhancement with others which will hopefully be merged into libav soon, we will be able to implement avserv using URLContext and limiting the network functionalities to the demuxer developed into libavformat. The other enhancements are: modification to the libavformat TCP demuxer to allow multiple accepts to one socket (like servers do) and a rtsp listen like functionality to rtmp, which is waiting for review.

We added the "-rtsp_flag listen" option which allows both avconv and avplay to wait for an incoming RTSP connection which will send a stream after a RECORD command and receive the stream over UDP or TCP. What is this useful to? Imagine that you want to publish a real time stream with a client that only supports rtsp but your server only supports rtmp, what can we do?

avconv -f rtsp -rtsp_flags listen -i rtsp://myhost/stream.sdp rtmp://myhost/app/stream

or you can just store it to a file

avconv -f rtsp -rtsp_flags listen -i rtsp://myhost/stream.sdp file.mp4/ogv/mpg/...

In addition you will be able to do the usual with avconv as for instance convert to any of the infinite available codecs.

I don't know if it is really useful but isn't it cool? ;-)

viernes, 18 de mayo de 2012

GSoC2012 Libav - Rewrite avserv

This summer I will be again happily involved with the Google Summer of Code inside the LibAV project. This year I have been accepted to accomplish one of the proposed tasks of the project: Rewrite avserver.

On the last three weeks I have been implementing the RTSP ANNOUNCE/RECORD. With this enhancement, the avconv can listen to an ANNOUNCE REQUEST which followed by SETUP and RECORD will allow to receive a stream and then handle the new incoming data.

The implementation is by today at my github https://github.com/nenjordi/libav/commits/rtsp-announce-preparepatch for those of you who want to take a look at its current status.

miércoles, 29 de febrero de 2012

Libros Gratis de Programación


Meta-Lists



Graphics Programming



Language Agnostic



Android



Autotools



ASP.NET MVC



Assembly Language



Bash



C / C++



C#



  • See .NET below


Clojure



CoffeeScript



ColdFusion



DB2



Delphi / Pascal



Django



Emacs



Erlang



Flex



F#



Forth



Git



Go



Grails



Haskell



HTML / CSS



Java



JavaScript



JavaScript (Node.js specific)



LaTeX



Linux



Lisp



Lua



Mathematica



Maven



Mercurial



Nemerle



  • See .NET below


.NET (C# / VB / Nemerle / Visual Studio)



NoSQL



Oberon



Objective-C



OCaml



Oracle Server



Oracle PL/SQL



Parrot / Perl 6



Perl



PHP



PowerShell



Prolog



PostgreSQL



Python



R



Ruby



Ruby on Rails



Scala



Scheme



Sed



Smalltalk



Subversion



SQL (implementation agnostic)



Teradata



Vim



Websphere



Windows Phone



Google Summer of Code (GSoC) 2012

Un año más se convoca, a todos los estudiantes que lo deseen, a participar en proyectos de codigo libre con remuneración por parte de google y tutoría por parte de expertos en la materia. Animaos, hay proyectos para todos. Para los estudiantes el plazo comenzará el 26 de Marzo.
GSoC Flyer

lunes, 23 de enero de 2012