
If (!(video_file_output_format = av_guess_format(NULL, outputMP4file. If ((errorNum = avformat_find_stream_info(rtsp_format_context, NULL)) streams->codec If ((errorNum = avformat_open_input(&rtsp_format_context, uriANSI.c_str(), NULL, &opts)) max_analyze_duration = 50000 Std::string outputMP4file = "D:\\somemp4file.mp4" Īv_dict_set(&opts, "rtsp_transport", "tcp", 0) used in YUV-centric codecs such like H.264 YVU9, YV12, YV16. Int errorNum = 0, video_stream_index = 0 I have several network cameras that stream live video using RTSP as h264 file i'm using ffmpeg to capture the raw h264 stream and dump the feed to a disk, everything works fine except the speed at which the stream is being saved is about 2 times faster than it is while watching it live. FFmpeg is published under the LGPL-2.1-or-later or GPL-2.0-or-later, depending on which. I can get a poorly coded MP4 produced, using this code: // Variables here for demoĪVFormatContext * video_file_output_format = nullptr ĪVFormatContext * rtsp_format_context = nullptr ĪVCodecContext * video_file_codec_context = nullptr ĪVCodecContext * rtsp_vidstream_codec_context = nullptr

Basically, webcam output into a MP4 container. I'm attempting to transcode/remux an RTSP stream in H264 format into a MPEG4 container, containing just the H264 video stream.
