Hello,

I am just learning how to create programs with ffmpeg.

I wanted to send a video using UDP in a peer to peer
application. 
In my understanding in order to be able to send a
video through UDP I requiere the RTP protocol. Then,
following a previous discussion e-mail in this list I
read:
"Streaming over RTP is just like writing to a file:
you just need to use 
the rtp format, and to provide an "rtp://<destination 
address>:<destination port>" url as output file name."
....
"Just change the file to an RTP url, and you 
are done."


So I tried to follow the advice and I wrote the next
code in the next application:

    ctx = av_alloc_format_context();
    if (!ctx) {
      printf("I couldn't allocated the format
context\n");
      return;
    }

    if( url_open(&h, "udp://127.0.0.1:6000",
URL_WRONLY) < 0 ) {
      printf("Something wrong with url_open\n");
      if (h)
        url_close(h);
      av_free(ctx);
      return;
    }

    /*    f = fopen(filename, "wb");
    if (!f) {
      fprintf(stderr, "could not open %s\n",
filename);
      exit(1);
    }
    */

The problem is that the application breaks always on
the url_open function. 

Thank you.
Miguel Miranda.



      
____________________________________________________________________________________
¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:              
        
http://correo.yahoo.com.mx/
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to