[mythtv-users] FFMPeg Commercial cutting puts audio out of sync

Justin Alcorn justin at jalcorn.net
Sun Sep 14 02:19:11 UTC 2014


On Sat, Sep 13, 2014 at 8:13 PM, John Finlay <finlay at moeraki.com> wrote:
> I use something like this to split the file at given frames and throw away
> the commercial segments and save the program segments into a file which is
> remuxed:
>
> mythffmpeg -i {file_path} -map 0 -c copy -f ssegment -segment_frames
> {frame_list} -segment_format mpegts pipe:1%d 10>/dev/null 11>{tmp_file}
> 12>/dev/null 13>{tmp_file} ...
>
> mythffmpeg -y -i {tmp_file} -map 0 -c copy -f {args.format} {output_file}
>
> Where the items in {} need to be replaced with specific info. The second
> pass of mythffmpeg remuxes the output file to correct the timestamps. There
> may be an easier or better way to do this but this works for me.


That's exactly what I was thinking. Thanks for the example.
--
Justin B. Alcorn
PGP Fingerprint A36D D691 C5B0 BE15 5A2A AF49 AA1C 372C


More information about the mythtv-users mailing list