[Libav-user] How to redirect FFMPEG output to a socket

Wagner Patriota wagner.patriota at gmail.com
Thu May 10 16:38:11 CEST 2012


should work...

maybe you are compiling with "–-disable-protocols" ?
http://ffmpeg.org/ffmpeg.html#Protocols

On Tue, May 8, 2012 at 4:02 PM, Denis <info at denisgottardello.it> wrote:

> In data lunedì 07 maggio 2012 16:14:17, Wagner Patriota ha scritto:
> > no, it's easier... example: if you have myprotocol.c, just add to
> Makefile
> > the following line:
> >
> > OBJS-$(CONFIG_MYPROTOCOL_PROTOCOL) += myprotocol.o
> >
> > that's it... look for the session "protocols I/O" in the Makefile
>
>
> I don't understand. I have placed a file called "bufferptocolo.c" in
> "ffmpeg-0.10.2/libavformat/" folder. Then in the
> "ffmpeg-0.10.2/libavformat/makefile" file I have added this row
> "OBJS-$(CONFIG_BUFFER_PROTOCOL)             += bufferprotocol.o"
> but the file is not compiled. No error has reported.
>
> The file contains this:
>
>
> #if CONFIG_BUFFER_PROTOCOL
>
> static int buffer_open(URLContext *h, const char *filename, int flags)
> {
>    printf("buffer_open\n");
>    return 0;
> }
>
> static int buffer_read(URLContext *h, unsigned char *buf, int size)
> {
>    printf("buffer_read\n");
>    return (-1 == r)?AVERROR(errno):r;
> }
>
> static int buffer_write(URLContext *h, const unsigned char *buf, int size)
> {
>    printf("buffer_write\n");
>    return (-1 == r)?AVERROR(errno):r;
> }
>
> static int64_t buffer_seek(URLContext *h, int64_t pos, int whence)
> {
>    printf("buffer_seek\n");
>    return 0;
> }
>
> static int buffer_close(URLContext *h)
> {
>    printf("buffer_seek\n");
>    return 0;
> }
>
> static int buffer_get_handle(URLContext *h)
> {
>    printf("buffer_get_handle\n");
>    return (intptr_t) h->priv_data;
> }
>
> static int buffer_check(URLContext *h, int mask)
> {
>    printf("buffer_check\n");
>    return 0;
> }
>
> URLProtocol ff_buffer_protocol = {
>    .name                = "buffer",
>    .url_open            = buffer_open,
>    .url_read            = buffer_read,
>    .url_write           = buffer_write,
>    .url_seek            = buffer_seek,
>    .url_close           = buffer_close,
>    .url_get_file_handle = buffer_get_handle,
>    .url_check           = buffer_check,
> };
>
> #endif /* CONFIG_BUFFER_PROTOCOL */
>
>
> Have you got any idea?
>
> --
> www.denisgottardello.it
> Skype: mrdebug
> Videosurveillance and home automation!
> http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120510/e977c0cd/attachment.html>


More information about the Libav-user mailing list