[Libav-user] rtsp over tcp by apies

Zanelli Franco fzanelli at tecnosens.it
Thu Mar 1 09:23:23 CET 2012


thank you very much, it works for me too.

regards 

Il 29/02/2012 18:44, Camera Man ha scritto: 

	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" <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" <rtsp://10.20.30.40/video> , 0, &opts) != 0) raise AVError("can't open input");



	 
	
	_______________________________________________
	Libav-user mailing list
	Libav-user at ffmpeg.org
	http://ffmpeg.org/mailman/listinfo/libav-user



-- 


 

Ing. Franco Zanelli
Sviluppo Software - Divisione Sistemi Videosorveglianza 
Software Engineer - Videosecurity System Division 

TECNOSENS S.P.A.
Via Vergnano, n.16, 25125 BRESCIA - ITALIA
Tel: +39 030.3534144 Fax: +39 030.3530815
Email: fzanelli at tecnosens.it
Web: http://www.tecnosens.it <http://www.tecnosens.it/>  




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120301/eb3c31fc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: immagini1
Type: image/png
Size: 8557 bytes
Desc: immagini1
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120301/eb3c31fc/attachment.png>


More information about the Libav-user mailing list