[Libav-user] AVDictionary options for very old D1 rtsp stream?
bsenftner at earthlink.net
bsenftner at earthlink.net
Fri Oct 2 07:39:16 EEST 2020
I have a libav based player library. Using AVDictionary options, set via
av_dict_set() and ultimately passed to av_format_open_input(), the library
handles playing video files, USB cameras, or IP streams.
Using the following AVDictionary setup, the library has been able to handle
pretty much every IP camera tried, until we encountered a client with
several hundred very old Verint cameras.
av_dict_set(&mp_opts, "threads", "auto", 0);
av_dict_set( &mp_opts, "refcounted_frames", "1", 0 );
av_dict_set( &mp_opts, "sync", "video", 0 );
av_dict_set( &mp_opts, "fflags", "discardcorrupt", 0 );
av_dict_set( &mp_opts, "max_delay", "100000", 0 );
// av_dict_set( &mp_opts, "fflags", "nobuffer", 0 );
// av_dict_set( &mp_opts, "flags", "low_delay", 0 );
// av_dict_set( &mp_opts, "rtsp_transport", "tcp", 0 );
av_dict_set( &mp_opts, "framerate", "29.97", 0 );
av_dict_set( &mp_opts, "analyzeduration", "1000000", 0);
av_dict_set( &mp_opts, "allowed_media_types", "video", 0 );
The very old (20 years?) Verint cameras have a maximum resolution of D1
(720x480), while offering resolutions of CIF, 2CIF and D1, in either h264 or
mjpeg stream formats.
The h264 stream will play in VLC. With VLC logging set to debug, it looks
like VLC attempts and fails 16 + 26 + 27 + 13 different h264 wrappers before
figuring out through (maybe?) emulated DirectX9 hardware a stream header for
720x480. Playing and expecting 720x480, a Dx9 message says a resolution
change occurs setting the stream to 720x540 resolution frames. That's the
frame size VLC ultimately displays.
Trying ffprobe on the rtsp stream, it finds the 720x480 header. But there is
no mention of a framebuffer resolution change. I know libav and my library
link with the DirectX libraries, as that's how I get USB stream support.
Yet, I'm not familiar with how to handle dynamic resolution changes. This
resolution change occurs before the first frame, so maybe that's just how
this old rtsp codec conventionally worked?
Are there some additional AVDictionary options necessary to get recognition
of such an old D1 resolution h264 codec?
And is there some additional callback or metadata capture for identifying a
dynamic resolution change?
-Sincerely,
Bsenftner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20201001/8d4cf9bd/attachment.html>
More information about the Libav-user
mailing list