Ahmad Awais



Fix Invalid Caption File on Vimeo

Ahmad AwaisAhmad Awais

After building the VSCode.pro course, I wanted to make it more accessible by adding Closed Captions to the videos. I use Vimeo to host videos and they provide an interface for adding subtitles/captions.

My apprentice and I wrote the closed captions ourselves and everything went well. Except for two videos where I would get an error when I uploaded the subtitles/captions file.

I searched a lot and even rewrote the captions but couldn’t find a fix until just now. So, sharing that fix in this post in the hope of making someone else’s life easier.

Invalid Caption File Error#

When I uploaded these .srtΒ Closed Captions files, I got an error that read like Invalid Caption File.Β What the heck is that, I thought? No more info, just tht the caption file is invalid.

⚑ After searching around I figured that maybe it’s the <Β and >Β characters β€” since the videos were about HTML code and I had <span>Β and <p>Β in my captions.

πŸ€” So, I went ahead and encoded the entire contents of these captions files. You can use a site like this, paste the contents of your .srtΒ file inside the Decoded block and copy the generated contents in the Encoded block back into the file. Maybe just replace --&#x3E;Β back to -->.

Now when you upload the captions to Vimeo β€” they just work!

Peace! ✌️


πŸ‘¨β€πŸ« Edutainer & teacher at VSCode.pro 🎩 Full-time #OpenSourcerer 🦊 Google Developers Expert for Web πŸ₯‘ OSS Developer Advocate 🌳 Node.js Foundation Community Committee Member πŸ”₯ Ridiculously hard-working Full Stack Web Developer πŸ˜‚ Hilarious comedian ⓦ Regular WordPress Core Developer πŸ“£ TEDx Speaker ✌️ Spends 50-80% of his time building professional FOSS (Free & Open Source Software) used by over 1,399,687 Developers πŸ™Œ Cloud Community Evangelist 🎯 JavaScript & DevOps fanboy πŸ’œ Loves his wife (Maedah) πŸ• Learn more about Ahmad ↣

Say πŸ‘‹ on Twitter @MrAhmadAwais | Subscribe to the Developer's Takeaway!


TheDevTakeaway: Developers' Newsletter!

Takeaway my professional opinion about Open Source, JavaScript/Cloud, Full Stack Development, building a business, growing a family, and everything in between! Delivered to your inbox once a month. 🀣 I'm even funny some times. πŸ‘» I hate spam! Pinky Promise!

πŸ”₯ CHECK OUT β†’