Converting video files while preserving subtitles can be a bit tricky, but it's definitely doable with the right tools. Here are some steps and recommendations:
Using FFmpeg:
Verify Subtitles: After conversion, play the video to ensure the subtitles are correctly displayed. JUQ-968-engsub Convert02-23-49 Min
If the source is shorter than 2 h 23 m 49 s: Converting video files while preserving subtitles can be
# 1️⃣ Create a silent black video of the required extra duration
ffmpeg -f lavfi -i color=c=black:s=1280x720:d=00:05:00 \
-f lavfi -i anullsrc=channel_layout=stereo:sample_rate=48000 \
-c:v libx264 -pix_fmt yuv420p -r 30 \
-c:a aac -b:a 128k \
pad_extra.mp4
# 2️⃣ Concatenate the original + padding
ffmpeg -i "concat:JUQ-968‑engsub.mkv|pad_extra.mp4" \
-c copy \
"JUQ-968‑padded.mkv"
Replace 00:05:00 with the exact amount of time needed to reach 02:23:49. Using FFmpeg :
| # | Given | When | Then |
|---|-------|------|------|
| AC‑1 | The user is on the “EngSub Convert” page | They upload one or more subtitle files and click Convert | The system validates each file (correct extension, well‑formed timestamps) and returns an error list for any invalid file, aborting processing for those files only. |
| AC‑2 | The offset field is empty | The user clicks the “02:23:49 Min” shortcut button | The field is auto‑filled with 02:23:49 and the UI shows “+2 h 23 m 49 s”. |
| AC‑3 | The user selects .srt as source and .vtt as target | Conversion runs | All timestamps are shifted, the file is rewritten in VTT syntax, and the download name changes to <original‑name>.vtt. |
| AC‑4 | Any subtitle line after shifting would become negative (e.g., original 00:00:02 shifted by –00:00:05) | The conversion runs | The system clamps the timestamp to 00:00:00 and flags the line in the preview log with a warning. |
| AC‑5 | The user uploads ≥ 1 and ≤ 100 files | The conversion starts | A progress bar shows “Processing X of Y files”, and a Cancel button aborts remaining work while preserving already processed outputs. |
| AC‑6 | The conversion finishes successfully | The UI shows Download All (ZIP) and Download Log (CSV) buttons | Clicking either triggers a file‑download with correct MIME types (application/zip, text/csv). |
| AC‑7 | The user clicks Preview before conversion | The system displays the first 5 subtitle entries after applying the offset (but before format conversion) | The preview table includes original timestamp, new timestamp, and subtitle text. |
| AC‑8 | The user has an invalid file (e.g., .txt) | They attempt to process it | The UI shows a clear error “Unsupported file type – only .srt, .vtt, .ass are allowed.” |
| AC‑9 | The user’s browser is IE11 (unsupported) | They load the page | The UI displays a friendly “Your browser is not supported – please use Chrome, Edge, or Firefox.” |
| AC‑10 | The conversion is completed | The server cleans up temporary files | No processed files remain on the server after 15 minutes or after the user downloads, whichever comes first. |
| # | As a … | I want … | So that … | |---|--------|----------|-----------| | US‑1 | Power user who just edited a video | to shift all subtitle timestamps by +02:23:49 (or any offset) | the subtitles line up perfectly with the new video version without manual editing. | | US‑2 | Content creator with many episodes | to drag‑and‑drop a folder of .srt files and apply the same offset to all of them | I can batch‑process an entire season in minutes. | | US‑3 | Accessibility specialist | to convert subtitles from .srt → .vtt (or .ass) while shifting timestamps | the final package meets the platform’s subtitle format requirements. | | US‑4 | QA engineer | to see a preview table of the first 5 subtitle entries before committing | I can verify the offset looks correct and avoid costly re‑uploads. | | US‑5 | Operations manager | to receive a downloadable CSV log of all timestamp changes | we have an audit trail for compliance reports. | | US‑6 | End‑user with a flaky internet connection | to cancel the conversion mid‑process and resume later without losing already processed files | I can continue work when the network stabilizes. |