Read RTSP over TCP with -rtsp_transport tcp
Read an RTSP camera over TCP with ffmpeg 7.1 -rtsp_transport tcp, which avoids the packet loss and blocked ports UDP runs into.
Short posts that solve one thing: the code, the output we got, and why it works.
Read an RTSP camera over TCP with ffmpeg 7.1 -rtsp_transport tcp, which avoids the packet loss and blocked ports UDP runs into.
List the playback cards and devices ALSA sees with aplay -l from alsa-utils 1.2, and turn the output into a hw:card,device name.
Wrap a raw Annex B .h264 file into MP4 without re-encoding using ffmpeg 7.1, and give it the frame rate the raw stream does not carry.
Create a libVLC 3.0 engine instance with libvlc_new, check for NULL when plugins are missing, and print the version it loaded.
Check that GStreamer can open a window with gst-launch-1.0 videotestsrc ! autovideosink, using num-buffers so the test ends on its own, on GStreamer 1.26.
Pick the main video or audio stream with av_find_best_stream, which returns an index and can hand back the decoder, instead of looping over streams yourself.
Open a media file in C with avformat_open_input from libavformat 61 (FFmpeg 7.1), check the negative error code, and release it with avformat_close_input.
Encode H.264 on an NVIDIA GPU with h264_nvenc, using -preset p5, -tune hq and a constant-quality -cq value, on FFmpeg 4.4 or later.
Decode H.264 on an NVIDIA GPU with ffmpeg -hwaccel cuda, which uses NVDEC but copies frames back to system memory unless you also set an output format.
Rotate video 90 degrees clockwise in FFmpeg 7.1 with transpose=1, and use 2 for counter-clockwise or two filters for a half turn.
Crop a centred square in FFmpeg 7.1 with crop=ih:ih, which defaults the offset to the centre so you only name the size.
Use -t as an output option in FFmpeg 7.1 to keep exactly the first N seconds of a stream, and know how it differs from -to.
We send one email when a new post is published. No spam.