Skip to content

Add script to shift subtitles forward or backward #539

Description

@Syed-56

The repository currently lacks a script to shift subtitle timings forward or backward, which is needed when subtitles are out of sync with the video.

A simple Python script or function could be added to shift subtitle timestamps by a specified offset (positive or negative), preferably supporting .srt files via command-line arguments.

At the moment, this can be done using external tools like Subtitle Edit or ffmpeg, but having this functionality in the repo would keep workflows consistent and easier to automate.

This would be especially useful for handling audio/video delays or re-encoded media files.

Activity

  1. github-actions commented on Jan 14, 2026

    @github-actions

    Thank you for raising this issue! Our team will review it soon.

    For more queries or discussions or approval of requests, please join the Discord server for further discussion: Discord Link

  2. Kulkarnivaishnavi473 commented on Feb 10, 2026

    @Kulkarnivaishnavi473

    Hi, I’d like to work on this issue. Could you assign it to me?

  3. anosvoldi883 commented on Feb 10, 2026

    @anosvoldi883

    Hi 👋

    This looks like a useful addition to the repo.
    I’ve worked with SRT files before and understand the timestamp
    format and edge cases (negative offsets, zero clamping, etc.).

    I’m planning to:

    • Add a small Python CLI script to shift SRT timestamps
    • Support positive/negative offsets via command-line arguments
    • Ensure timestamps don’t go below 00:00:00,000
    • Keep it dependency-free if possible

    Before starting, I wanted to confirm:

    • Is there a preferred location in the repo for utility scripts?
    • Should the script overwrite the file or write to a new output file?

    If this approach works, I’d be happy to take this up.
    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions