Hi there
I am working on a C++ library file that captures an RTSP stream and extracts
Onvif metadata.
My libraries are
extern "C" {
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
}
The problem is I don't want the video or audio tracks because the CPU
workload is too high.
If I could send DESCRIBE and SETUP requests in FFmpeg my DESCRIBE url would
be rtsp://<ip>/Src/MediaInput/stream_1?event=1
And my SETUP url would be rtsp://<ip>/Src/MediaInput/trackID=4 ( metadata )
I've tried using a filtergraph
char* filtergraph = av_strdup("!a:codec_type=video !a:codec_type=audio");
// Set the filtergraph expression as an option
av_dict_set(&format_opts, "map", filtergraph, 0);
// Set TCP as an option
av_dict_set(&format_opts, "rtsp_transport", "tcp", 0);
// Open the RTSP stream with the filtergraph expression
int ret = avformat_open_input(&formatContext, fullrtspstring,
nullptr, &format_opts);
but trackID=1 the Video track is still captured.
Any suggestions welcome on streaming with just the metadata track.
Regards
Graham
_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".