Rails app vs video player - ruby-on-rails

not so long ago began using reils and i have one question arose with the loading and processing of video ...
is there something like carrierwave for video ?
user upload video to the file public/video
and in the DB created file with uploaded file name
and after that in a view ve create a video tag
there is something like this?

You might benefit from Nick DeSteffen's blog post on Uploadify + CarrierWave + Zencoder + Video.js

Related

Uploading/playing mp3 files using Rails

I'm working on my first "real" Rails project - "modernizing" an old website for a church choir and am building it in Rails. They currently have a practice page with a list of links to mp3 files stored on their server. I would like to store the mp3 files in a database and have created a model for the songs - title:string, part:string (tenor, soprano, etc), audio:binary (this is the mp3 file). When I submit the form, the audio field is nil - the other fields save correctly. Should I be using a Gem for uploading/saving the mp3 files? I've come across CarrierWave, but have only seen it used with images. I was under the impression that the binary field in active record was for preserving the original file format. Thanks in advance!
If you want to use file upload instead of saving it into database then you can use paperclip . please have a look at it https://github.com/thoughtbot/paperclip

Rails s3_direct_upload without file field

My website generates a file in javascript (audio recording) and I then want it to be uploaded to Amazon S3.
I first managed to get the uploading part working by sending the generated file to my server, where it is uploaded. However I would like now to upload the file directly to S3, without going through my server.
So I started to use the s3_direct_upload gem, which works great when using a file_field. However my file is generated by the javascript and :
- The value of a file field has to be set by the user for security reasons
- I do not want the user to have to interact with the upload
I tried to play with the S3Uploader class and to directly add data, without any success for now, it seems that I do not use the correct method.
Does anyone has any idea on how to achieve S3 direct upload without a file field ?
Thanks
Never mind, I found out that the S3Uploader class used by the s3_direct_upload gem has the same methods as the jQuery-File-Upload from which it is derived.
So one can call $("#s3_uploader").fileupload('send', {files: [f]});
And the f File will be uploaded to S3 directly

Embedding Sample QuickTime (.mov) video

I need to display sample .mov video on my site, I need one that won't be deleted anytime soon and the host won't block me me for embedding it on my website.
Unfortunately sample QuickTime files on Apple's site are compressed: http://support.apple.com/kb/HT1425 :(
Have you got any other rock solid sources?
Use this link:
trac.foswiki.org/export/5630/branches/Release01x00/TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/examples/media/sample.mov
uploaded 4 years ago and i think this won't be deleted soon.

Convert H.264 to HLS in a Rails app

Using carrierwave or another file upload plugin, there should be an easy way to convert uploaded mp4 (H.264) video files to Apple HLS. You need this for streaming videos on mobile devices.
This way, while uploading 1 streaming video file you can support most of the browsers (every browser except Opera and FF for Linux/OSX).
It can be done with ffmpeg, is anyone working on a gem?
How about streamio-ffmpeg? It seems to support custom command line parameters. You could add then use parameters like from this answer: https://stackoverflow.com/a/10047372/759140
You might also give carrierwave-video a try. It's backed by streamio-ffmpeg and allows passing custom settings through.

Intro MP3 file with SHOUTcast

I have a PHP MP3 file which changes every time it is loaded, and plays a different advert, what I would like is away or is there away to play that before the SHOUTcast stream as the SHOUTcast intro file.
I personally dont really want to put it into flash or create custom playlist files but more would like SHOUTcast to fetch an intro file from a URL address.
Unfortunately, the SHOUTcast configuration doesn't allow this directly.
However, you can easily accomplish what you need by having a script pick a new intro file every few seconds or so. Then you can either write that MP3 to the file configured in SHOUTcast, or create a symlink and update it.

Resources