Easily Sync Your Subtitles with React, RHF and shadcn/ui

Introduction As a big fan of movies and TV shows, I often run into subtitle syncing issues that can be frustrating. This usually happens when the .srt file comes from a different source, causing delays with the actual dialogue. Adjusting the subtitles manually on a TV isn’t always an option, as the settings might not allow precise changes or may be outside of range. To solve this problem, let's create a simple tool that allows you to shift the timecodes of your subtitles to perfectly sync them with your video. We'll use React with Vite, shadcn/ui (a collection of reusable components I have been wanting to try for a while), React Hook Form for form management, and Zod for schema-based form validation. Here is the final result: So let's jump into it

Jan 23, 2025 - 00:08
 0
Easily Sync Your Subtitles with React, RHF and shadcn/ui

Introduction

As a big fan of movies and TV shows, I often run into subtitle syncing issues that can be frustrating. This usually happens when the .srt file comes from a different source, causing delays with the actual dialogue. Adjusting the subtitles manually on a TV isn’t always an option, as the settings might not allow precise changes or may be outside of range.

To solve this problem, let's create a simple tool that allows you to shift the timecodes of your subtitles to perfectly sync them with your video.

Ten seconds delay

We'll use React with Vite, shadcn/ui (a collection of reusable components I have been wanting to try for a while), React Hook Form for form management, and Zod for schema-based form validation.

Here is the final result:

SRT Shifter App

So let's jump into it

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow