On 02/29/2012 03:59 AM, Zanelli Franco wrote:
int res;
AVFormatContext *fc = avformat_alloc_context();
res = avformat_open_input(&fc, "rtsp://10.0.0.204/media?tcp", NULL, NULL);
I found out that ?tcp option passed via rtsp URL is deprecated and now
we use -rtsp_transport parameter, but how can I set this using ffmpeg
apies? Is there a parameter in AVFormatContext or AVCodecContext that I
have to set?
This works for me:
AVDictionary *opts = 0;
av_dict_set(&opts, "rtsp_transport", "tcp", 0);
if (avformat_open_input(&context, "rtsp://10.20.30.40/video", 0, &opts) != 0) raise AVError("can't open input");
|
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user