Reputation: 697
Following the answer at Ffmpeg inaccurate cutting with ts and m3u8 files despite resamping audio filter, I am cutting some portion out of an m3u8 file.
My m3u8 has a segment every 4 seconds, so I seek to a location around 10 seconds before the cutting point with -ss before -i. Then adjust position with -ss after -i.
Here are two examples where the starting cut points are off by 1s:
ffmpeg -y -ss 0:03:22 -start_at_zero -i http://tyberis.com/CFTE-AM_2020-08-28_23-00-00.m3u8 -ss 1 -t 0:00:10 322.wav
ffmpeg -y -ss 0:03:23 -start_at_zero -i http://tyberis.com/CFTE-AM_2020-08-28_23-00-00.m3u8 -ss 1 -t 0:00:10 323.wav
When I compare the two output files, they are binary same:
diff 323.wav 322.wav -s
Files 323.wav and 322.wav are identical
What am I doing wrong? How can I accurately seek to the desired position?
Upvotes: 0
Views: 1222
Reputation: 1132
You are setting the start position twice, you should set the start position before the input to make Ffmpeg start reading the input from there. Setting the seeking flag after the input makes it process the whole input.
ffmpeg -y -ss 0:03:23 -i http://tyberis.com/CFTE-AM_2020-08-28_23-00-00.m3u8 -t 0:00:10 323.wav
Upvotes: 1