[FFmpeg-user] Generate .ts file parallel, resume option, offset HLS
Diogo Serrano
diogoserrano at sapo.pt
Mon Aug 25 12:30:36 CEST 2014
Hi, Andrew Sinclair thanks for your reply.
I did a litlle script that generates all the ffmpeg commands to create ts
files and i give the arguments of range of time.
Basicaly i want to create a single .ts giving in the arguments the range of
time, after that i need to join all .ts files and generate the m3u8
playlist.
The ffmpeg command list bellow are a prove of concept to resolve my
problem, but when a generate the m3u8 playlist the video is not fluid,
because the cut is not very precise
> fmpeg -ss 0.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v copy
-bsf h264_mp4toannexb -flags -global_header -map 0 -f segment -segment_time
10 -segment_start_number 1 -segment_list 0001_test.m3u8 -segment_format
mpegts 1stream%05d.ts
> ffmpeg -ss 10.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 2 -segment_list 0002_test.m3u8
-segment_format mpegts 2stream%05d.ts
> ffmpeg -ss 20.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 3 -segment_list 0003_test.m3u8
-segment_format mpegts 3stream%05d.ts
> ffmpeg -ss 30.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 4 -segment_list 0004_test.m3u8
-segment_format mpegts 4stream%05d.ts
> ffmpeg -ss 40.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 5 -segment_list 0005_test.m3u8
-segment_format mpegts 5stream%05d.ts
> ffmpeg -ss 50.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 6 -segment_list 0006_test.m3u8
-segment_format mpegts 6stream%05d.ts
> ffmpeg -ss 60.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 7 -segment_list 0007_test.m3u8
-segment_format mpegts 7stream%05d.ts
> ffmpeg -ss 70.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 8 -segment_list 0008_test.m3u8
-segment_format mpegts 8stream%05d.ts
> ffmpeg -ss 80.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 9 -segment_list 0009_test.m3u8
-segment_format mpegts 9stream%05d.ts
> ffmpeg -ss 90.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 10 -segment_list 0010_test.m3u8
-segment_format mpegts 10stream%05d.ts
> ffmpeg -ss 100.000 -i "/home/USER/vagrant/files/rod.mp4" -t 10.000 -c:v
copy -bsf h264_mp4toannexb -flags -global_header -map 0 -f segment
-segment_time 10 -segment_start_number 11 -segment_list 0011_test.m3u8
-segment_format mpegts 11stream%05d.ts
...........
.........................
....................................
(the list continue depending the time of the video)
More information about the ffmpeg-user
mailing list