0

Is there a way to trim a video before uploading it, so that the upload would be faster ? If possible, I'd like such a solution to:

  • not require a huge library
  • work on most frequent video formats
Guig
  • 9,891
  • 7
  • 64
  • 126
  • No I don't have code, because I don't have a solution in mind yet, and at the moment I tend to think it's not possible. I'm aware of the html5 file api, the existence of getUserMedia, of how some video format are encoded etc, and of some image tricks like this one http://stackoverflow.com/questions/10333971/html5-pre-resize-images-before-uploading. But all that don't solve the issue that there's probably gonna be some decoding/encoding to do, because the html5 video can't be plugged as a source of the getUserMedia. So that means a javascript library to do decoding, and that sounds like a lot. – Guig Mar 28 '16 at 18:48

2 Answers2

1

I cannot seem to find a answer for the "non huge library" but I know this framework exists: https://bgrins.github.io/videoconverter.js/ Have you tried it yet?

user282190
  • 300
  • 4
  • 20
  • I didn't know about that one exactly, but I was aware that ffmpeg is available in javascript (and quite big!) I'll probably go with a flow like: - user previews his video, plays with the trimming limits, and has a preview that fakes the trimming - download a library like this one in the background - when the user is ready do go, wait for the library if needed, and start the trimming that'd pipe to an upload request, to start uploading asap. I'll share my code if that ends up working, or if I can find a way to do that with a lighter code base! Thanks – Guig Mar 28 '16 at 22:44
  • @Guig Thats great! Do keep us updated. – user282190 Mar 29 '16 at 03:32
  • Did you manage to make it? – Alex Pappas Feb 22 '20 at 11:27
0

Simple program I used recently was the "Free Mp4 Converter" you can download as an app from Apple`s app store or get it off the net. I have Adobe Creative Cloud but this was much simpler and faster though possibly not as high quality.