Opened 2 years ago

Last modified 2 years ago

#5789 new enhancement

Fast in-place replacement of embedded subtitles with ffmpeg

Reported by: forthrin Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: sub
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Let's say you have a 10 GB video file with embedded subtitles, and there is an error in the subtitles.

You extract subtitles with ffmpeg -i in.mp4 in.srt and quickly edit them, but to get subtitles back in the .mp4 the whole file must be rewritten, which takes forever even with -codec copy.

Since subtitles are 0.001% of of a modern video file, has ffmpeg developers considered an in-place replacement of subtitles, ie. use fseek in the same file and simply overwrite the previous data?

This would obviously require that the new data was smaller than the old one, but ffmpeg could even reserve a few extra K of zeroes when initially writing a full file to accommodate for this eventuality.

Change History (1)

comment:1 Changed 2 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords sub added
  • Priority changed from normal to wish
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.