get-iplayer / get_iplayer

A utility for downloading TV and radio programmes from BBC iPlayer and BBC Sounds
https://github.com/get-iplayer/get_iplayer/wiki
GNU General Public License v3.0
2.15k stars 233 forks source link

Trim subtitles according to --start and --stop #341

Closed notnac closed 6 years ago

notnac commented 6 years ago

Actual start and stop times (to nearest chunk boundary) are used to trim subtitles when --start and --stop are specified. Subtitles before start time and after stop time are skipped when producing the .srt subtitles file. The value of --suboffset is taken into account. Does not apply to --subsraw. Also does not apply to --subtitles-only because actual start and stop times are not known unless media file is downloaded.

This is my alternative approach to #339, for the same usage scenarios.

dinkypumpkin commented 6 years ago

Thanks for the PR. This is a much better approach. I'm still a little concerned by the asymmetry with --subtitles-only, but it makes sense for subtitles to match the downloaded media by default.