Multifilesrc Usage#
Contents
Video File with gstreamer ingestor (multifilesrc)#
NOTE:
The videos should follow a naming convention and should be named in the format characters followed by digits in the sequential order. For e.g.
video_001
,video_002
,video_003
and so on.Make use of the
%d
format specifier to specify the total digits present in the filename. For example, if the videos are named in the formatvideo_0001
,video_0002
, then it has total 4 digits in the filename. Use%04d
while providing the name<video_filename>_%04d.mp4
.The ingestion will stop if it does not find the required file name. For example, if directory contains videos
video_01
,video_02
andvideo_04
, then the ingestion will stop after readingvideo_02
sincevideo_03
is not present in the directory.
In case one does not want to loop the video with multifilesrc element then set the
loop
property toFALSE
In case one wants to play a single video for specific number of iterations set the
loop
property toFALSE
andstop-index
property to the number of iterations. For example, settingstop-index=0
would play it once, settingstart-index=1
andstop-index=5
would play it five times. Setting theloop
property toTRUE
will override thestop-index
property.When playing multiple videos from a folder, set the
loop
property toFALSE
andstart-index
andstop-index
properties can be set for specifying the range of videos to play in a sequence. For example, if the location is set to/home/pipeline-server/video_dir/video%03d.avi
and the available videos in the directory arevideo001.avi
,video002.avi
,video003.avi
,video004.avi
specifyingstart-index=1
andstop-index=2
will playvideo001.avi
andvideo002.avi
.The
loop
property ofmultifilesrc
plugin does not support video files of MP4 format. Hence MP4 video files will not loop and the recommendation is to transcode the video file to AVI format.It is recommended to set the
loop
property of themultifilesrc
element to falseloop=FALSE
to avoid memory bloat issues. If you want to loop the video, please refer cvlc based RTSP stream option.In case one notices general stream error with multifilesrc element when certain video files are used then transcode the video file to
H264
video with.avi
container format to ensure the compatibility of the format of the video file.