Hi,

[EMAIL PROTECTED] wrote:
> HI,
> 
>  I'm new to ffmpeg and need to stream videos from computer A to computer 
> B. The task is to read a file (eg. mpeg), send it from A to B (over the 
> network), and play the video at computer B (source code; not the command 
> line tools).

There are various way to stream an mpeg file over the network (for example,
you can put the file on an http server, and play it by using the correct
"http://..."; URL, or do similar things).


> First I tried to play a video from the local disc. That's not a problem so 
> far. But, now I want to send the file over the network and decode it at B. 
> How do I use av_open_input_file() without using a local file path?

This depends on how you want to stream the video. If you are streaming it
over http, you can just open the "http://..."; URL; if you are streaming it
using RTSP/RTP (for example, by using ffserver, or the live555 media server),
you can open the "rtsp://..." URL; if you are streaming it over RTP (maybe
multicast), you can open the SDP file describing the stream (the SDP file
is generated by the streamer. All this can be done by using 
av_open_input_file().

> Does 
> anybody have an example how to do this (except ffserver.c or ffplay.c)? 

If you only need to write the player, and if you already have code for playing
local files, your code is already able to receive network streams (just open
the proper URL, and you are done with your own code).

> Should I send the raw data of the file (encoded data), or do I need to form 
> AVPackets at the sender, or is it necessary to send the decoded frames (I 
> don't expect that!)?

This is your choice, and it depends on your requirements and preferences (also,
keep in mind that if you use standard techniques you do not need to write the
streamer, but you can use an existing one).

>  Perhaps it helps, if somebody could explain me (or give examples) the 
> usage of the following functions/classes in detail:
[...]
See the doxygen documentation. If it is not clear, feel free to ask, but try
to ask more specific questions (pointing to the things that are not clear in
the documentation).


                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to