Adding a video transformation (subtitles) in subdirectories results in a 400 response
Hello,
I'm trying to add a subtitle layer to my video but the URL returns a 400. My video url without the transformation is: https://res.cloudinary.com/imperfect/video/upload/b_blurred:400:15,c_pad,h_318,w_592/shop-dev/shelf-videos/puppy_test_dy54vj.webm and that works great.
The vtt subtitle file is in the same subdirectory, so I've made this URL: https://res.cloudinary.com/imperfect/video/upload/b_blurred:400:15,c_pad,h_318,w_592/l_subtitles:shop-dev:shelf-videos:puppy_test_rzk5ma.vtt/fl_layer_apply/shop-dev/shelf-videos/puppy_test_dy54vj.webm and that does not work.
Why isn't this working? Both files are in the shop-dev/shelf-videos/ subdirectory and I believe I followed the public ID rules.
Thank you!
-
Hi Ronald,
In general, in order to help debug Cloudinary URLs, the response would include a header called X-Cld-Error which provides more information on why the request was not successful. If you inspect the X-Cld-Error response header after making a request for the derived video example you'll see the following:
X-Cld-Error: Video file corrupt
This means there is something wrong with the .vtt file since the video works fine without it. If I change the .vtt file to the file I just uploaded to your account (YouTube.srt) it works:
https://res.cloudinary.com/imperfect/video/upload/b_blurred:400:15,c_pad,h_318,w_592/l_subtitles:shop-dev:shelf-videos:YouTube.srt/fl_layer_apply/shop-dev/shelf-videos/puppy_test_dy54vj.webmIf you wanted to use the vtt file as the subtitle for a
<video>
tag, you could do it as demonstrated in the following JSFiddle: http://jsfiddle.net/dannyv_cloudinary/yb497so6/To overlay the subtitles on the video directly, you'll need to apply a video transformation as described here in our docs.
Btw, we have an addon available that will automatically generate vtt files for you. More information on that can be found here: https://cloudinary.com/documentation/google_ai_video_transcription_addon
Best regards,
-Tamara
0 -
Thank you Tamara! This fixed my issue. Also, great to know about the
X-Cld-Error
header.
0
Post is closed for comments.
Comments
2 comments