Logo

dev-resources.site

for different kinds of informations.

FFMPEG Libraries - RTSP Client Keep Alive

Published at
4/26/2024
Categories
ffmpeg
Author
adder
Categories
1 categories in total
ffmpeg
open
Author
5 person written this
adder
open
FFMPEG Libraries - RTSP Client Keep Alive

I am using the FFMPEG Libraries (Windows Build) to connect and stream RTSP Streams from IP Cameras, this works with no issues on Dahua, Hikvision, etc.

Pseudo code :

avformat_open_input (...)
....
....
av_read_play (...)
...
...
while (TRUE)
{
int nRet = av_read_frame(...)
if (nRet == AVERROR_EOF)
{
OutputDebugString("AVERROR_EOF\n");
break;
}
else if (nRet < 0)
break;

// process packet

av_free_packet(...);
av_init_packet(...);
}

However when connecting to a Grandstream IP camera using RTSP URL :

rtsp://admin:[email protected]/0

av_read_frame fails with an AVERROR_EOF error after 28 video frames (it's always 28 video frames no matter what resolution, frame rate, etc that the camera is set to)

However when I use the same RTSP URL in VLC it connects and maintains the video stream ok, is VLC sending "Keep Alive" packets or "Receiver Reports" back to the camera to keep the connection active.

If this is needed then how do I do this from the FFMPEG Libraries.

Thanks in advance

Iain

ffmpeg Article's
30 articles in total
Favicon
Desvendando Subprocessos: Criando um Bot de Música com Go
Favicon
Video data IO through ffmpeg subprocess
Favicon
Wisper, ffmpeg을 활용한 비디오 자막 자동 생성
Favicon
Integrating MinIO notifications with your Node.js service, FFmpeg, and Mozilla convert API.
Favicon
Cliet-side WebM/MP4 export from React.js Canavs Animation using ffmpeg.wasm for an Upwork client
Favicon
Reduce bitrate using FFMPEG
Favicon
Add a Watermark to a Video Using VideoAlchemy
Favicon
No Bullshit Guide to Youtube shorts automation in NodeJS, OpenAI, Ollama, ElevanLabs & ffmpeg
Favicon
Building a Video Streaming Platform with Node.js, FFmpeg, and Next.js
Favicon
Record Windows Screen using ffmpeg and convert to time lapse video
Favicon
Introducing Comet: A Free, Cross-Platform Video Converter Powered by FFmpeg
Favicon
Compress, Convert and Trim Videos with Command Line
Favicon
เผื่อใครอยากทำ mp4 to gif แบบคมๆ
Favicon
How to generate thumbnails from video ?
Favicon
Convert .caf to mp3 by Directory
Favicon
FFMPEG
Favicon
Run ffmpeg within a Docker Container: A Step-by-Step Guide
Favicon
New to DEV.to - About me
Favicon
Streaming Video to AWS MediaConnect Using FFmpeg and SRT Protocol: A Complete Guide
Favicon
Displaying a video on a ESP32 powered SSD1306 OLED screen
Favicon
FFMPEG Libraries - RTSP Client Keep Alive
Favicon
From Pixels to Playbacks: Dominate Multimedia with FFmpeg in Python
Favicon
Access webcam by ffmpeg in Windows
Favicon
OSCAR 2022 sea surface velocity streamplot animation
Favicon
Mastering Video Previews: A Guide to Compressed Videos and Thumbnails
Favicon
Dall.E Image Gen, And Size Comparison Of Image Formats
Favicon
AIS vessel density maps with pyspark and h3 and animations with ffmpeg
Favicon
Using Electron to create videos (Canvas + FFmpeg)
Favicon
BMF 📹 + Hugging Face🤗, The New Video Processing BFFs
Favicon
Leveraging GPU Acceleration in BMF for High-Performance Video Processing

Featured ones: