Can we segment more than one movie file using mediafilesegmenter tool - HTTP Live Streaming
Is there any way to achieve segmenting from more than one movie file using mediafilesegmenter. I want to creat开发者_C百科e one prog_index.m3u8 file from multiple movie files. If mediafilesegmenter doesn't support, can anyone suggest alternate approach to achieve this.
Thanks in advance to all the viewers who takes time to look into this query .
Thanks Sudheer
I couldn't find any help for segmenting more than one video file using mediafielsegmenter but found a solution to my issue. As we know that mediafilesegmenter tool will generate a prog_index.m3u8 file by default after segmenting the movie file, here I'm creating a new index file with contents appended from prog_index.m3u8 and updating the new index file when a new movie file is segmented. This has solved my issue.
MediaFileSegmenter
is not meant for combining more than one files. It's used for segmenting video files.
If you want to combine multiple files you can use ffmpeg
. It's a very simple and efficient tool for performing various operations on video files.
From ffmpeg
documentation,
Create a file mylist.txt
with all the files you want to have concatenated in the following form:
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'
Note that these can be either relative or absolute paths. Then you can stream copy or re-encode your files:
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output
The -safe 0
above is not required if the paths are relative.
you can find more on concatenation
here.
Once you have combined the files. Segment them using mediafilesegmenter
, you don't need to manually append index files within prog_index.m3u8
.
精彩评论