Skip to main content

How to Upload Video using video encoder FFMPEG?

Rails • Asked by Talgat

Is there any resources or tutorials about uploading videos(songs) through Carrierwave and using Video.js ?
I heard also that I should use encoding(ffmpeg) if I want to upload.


None that I've done, but you can upload videos or songs using Shrine, Carrierwave, etc just like you would with pictures. Then from there as long as you've got Video.js or something, you can feed the url of the upload into that pretty much the same way you would take the upload url and embed it with an image tag. It would just go into a video tag instead.

As far as ffmpeg, you can do all kinds of cool stuff with it. I've used it with Shrine to process uploaded videos.

This example shows using ffmpeg to extra some video metadata out: https://github.com/janko-m/shrine#custom-metadata

And this example shows processing a video to transcode it and take a screenshot for a thumbnail: https://github.com/janko-m/shrine#custom-processing


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.