遇到bug
执行 ffmpeg -i out.mp4 -c copy -bsf h264_mp4toannexb output.ts 报错
Codec 'aac' (86018) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs...
换成命令:
ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
生成OUTPUT.TS
接着执行命令:
ffmpeg -i output.ts -c copy -map 0 -f segment -segment_list playlist.m3u8 -segment_time 3 output%03d.ts
报错 output.ts: Invalid data found when processing input
原因是之前 生成的是 OUTPUT.TS 而不是 output.ts
改成:
ffmpeg -i OUTPUT.ts -c copy -map 0 -f segment -segment_list playlist.m3u8 -segment_time 3 output%03d.ts