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_003and so on.Make use of the
%dformat 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%04dwhile 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_02andvideo_04, then the ingestion will stop after readingvideo_02sincevideo_03is not present in the directory.
In case one does not want to loop the video with multifilesrc element then set the
loopproperty toFALSEIn case one wants to play a single video for specific number of iterations set the
loopproperty toFALSEandstop-indexproperty to the number of iterations. For example, settingstop-index=0would play it once, settingstart-index=1andstop-index=5would play it five times. Setting theloopproperty toTRUEwill override thestop-indexproperty.When playing multiple videos from a folder, set the
loopproperty toFALSEandstart-indexandstop-indexproperties 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.aviand the available videos in the directory arevideo001.avi,video002.avi,video003.avi,video004.avispecifyingstart-index=1andstop-index=2will playvideo001.aviandvideo002.avi.The
loopproperty ofmultifilesrcplugin 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
loopproperty of themultifilesrcelement to falseloop=FALSEto avoid memory bloat issues. If you want to loop the video, then use the cvlc based RTSP stream.In case one notices general stream error with multifilesrc element when certain video files are used then transcode the video file to
H264video with.avicontainer format to ensure the compatibility of the format of the video file.