[libav-api] Problems transmitting video & data with MPEG-2 TS
Luis Díaz Más
ldiaz at catec.aero
Wed Jun 29 08:07:24 CEST 2011
> On Tue, Jun 28, 2011 at 4:06 AM, Luis Díaz Más <ldiaz at catec.aero> wrote:
>> I have solved the problem related with the order of DATA packets. I
>> to stablish the pts values in the packets. Now I receive image frames
>> medatada in the way desired when I save the MPEG-2 TS in a video file.
>> However when I send the streams over UDP, the reception doesn't work in
>> program using libav neither with ffplay application. But with VLC I can
>> receive perfectly the video stream ... As I explained in the previous
>> email, if I remove the data stream my application works perfectly.
>> The code in the "receptor" app is very simple ...
>> AVFormatContext * _ifc;
>> // path = "udp://localhost?localport=1234";
>> av_open_input_file(&_ifc, path, NULL, 0, NULL);
>> av_find_stream_info(_ifc); // The application is blocked here ...
>> Is there any way to specify what kind of streams are going to be
>> in the "receptor" app to avoid to call av_find_stream_info ?
> Where is it hanging? You didn't set a remote port in UDP, so that may
> be a problem i.e. it may not be receiving any data because it doesn't
> know where to listen.
I don't think that's the problem. As I explained previously, if I remove
the data stream, the my application works perfectly (it doesn't hang in
the av_find_stream_info() function). I'm seeing the code of
av_find_stream_info() in order to try to initialize the AVFormatContext
structure on my own, knowing that I only am going to recieve a MPEG-2
video stream and other data stream.
Nonetheless, I'm interested in your suggestion. For establishing the
remote port in UDP I have to use the function udp_set_remote_url ? I was
seeing the ffmpeg and ffplay code, and none of them uses this function :S.
If anyone has other suggestions I'd love to listem them ^^.
More information about the libav-api