Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server-side video conversion for html5-formats #17

Closed
dularion opened this issue Jul 31, 2015 · 18 comments
Closed

Server-side video conversion for html5-formats #17

dularion opened this issue Jul 31, 2015 · 18 comments

Comments

@dularion
Copy link
Member

Video-conversion via ffmpeg & HandBrake, triggered both after upload & through a cron-job. I will make it optional to the user whether he wants all 3 codecs (h.264, ogg, and webm) or not.

@dularion
Copy link
Member Author

dularion commented Aug 2, 2015

Ok, I have pushed a first try at h264 video conversion to this branch: https://github.com/dularion/streama/tree/videoConverter

If anyone feels like playing around with it, feel free!

@dularion
Copy link
Member Author

dularion commented Aug 3, 2015

Hmm, it cannot find the bash script in the project root for some reason. im calling it via './convertVideoH264.sh'. works locally. I'm gonna look into it. anyone have any ideas in the meantime?

@valpackett
Copy link

Log the output of the pwd command to see which directory you're in...
Does Grails have some variable that points to the project root?

Thank you for using #!/bin/sh and not bash :-)

But why HandBrakeCLI instead of just ffmpeg?

One last thing: adding binaries like HandBrakeCLI to git isn't a good idea, you should .gitignore them.

@dularion
Copy link
Member Author

dularion commented Aug 3, 2015

I added it in git on purpose so people wouldnt have to install it :/ I looked at their license and it stated that it could be freely distributed. Why is it not good to add them you think?

The reasoning behind using handbrake instead of ffmpeg is that I saw more people referencing handbrake (in forums etc) when it comes to h264. Other than that no reasoning at all. I could do ffmpeg also, its really not important to me. as long as conversion works and the users are happy :P

@valpackett
Copy link

Git is not made to work with binary files! Because if you update that file, cloning the repo will download the previous version too and… see where this is going? :) Git can't diff a binary, so it will store all the full versions and the repo will become huge over time. GitHub even made an additional tool for large binary files.

People talk about Handbrake because it has a desktop GUI! On servers, ffmpeg is the most popular tool. It's available in pretty much all operating systems' package managers. Just tell the users to brew / pkg / apt-get / … install ffmpeg.

@dularion
Copy link
Member Author

dularion commented Aug 3, 2015

Ok makes absolute sense. Will use ffmpeg instead and will remove the binary. Thanks for the info, learned something new :)

Btw, since you seem to know a little bit about this stuff, do you know a good ffmpeg h264 execution for me? I tried the following, but there was no sound. Looking around for others now, but there are so many different options that people suggest... its a bit like a jungle.

ffmpeg -i input.avi -an -vcodec libx264 -crf 23 test.mp4

@dularion
Copy link
Member Author

dularion commented Aug 3, 2015

that sounds really fancy and interesting .. But this doesnt work with html5?

@yusijs
Copy link

yusijs commented Aug 4, 2015

ffmpeg is deprecated - you should use avconv instead. It uses the same parameters, but for claritys sake:
ffmpeg -y -i input.mkv -vcodec libx264 -strict experimental output.mp4
avconv -y -i input.mkv -vcodec libx264 -strict experimental output.mp4
This should give you the results you want, but you might have to manuall add in the audiocodec (https://libav.org/avconv.html#Audio-Encoders)

@dularion
Copy link
Member Author

dularion commented Aug 4, 2015

After reading this answer on stackoverflow http://stackoverflow.com/a/9477756/919459 it seems like the whole "deprecated" debate was because of poor wording, and that that is actually not the case

@valpackett
Copy link

No, it's not deprecated! Where did you get that?!

Here's the news page, it doesn't say anything like that

@yusijs
Copy link

yusijs commented Aug 4, 2015

/data/streama/upload# ffmpeg -y -i input.mkv -vcodec libx264 -strict experimental output.mp4
ffmpeg version 0.8.17-6:0.8.17-1, Copyright (c) 2000-2014 the Libav developers
built on Mar 15 2015 17:00:31 with gcc 4.7.2
The ffmpeg program is only provided for script compatibility and will be removed
in a future release
. It has been deprecated in the Libav project to allow for
incompatible command line syntax improvements in its replacement called avconv
(see Changelog for details). Please use avconv instead.
input.mkv: No such file or directory

Well... :) (on debian, at least)

Edit: Just read your so post dularion, poor wording like you say - my bad then!

@dascandy
Copy link

dascandy commented Aug 4, 2015

@yusiswtor To clarify for people only reading this and not SO, "ffmpeg" the command from the libav project is deprecated. "ffmpeg" the command from the ffmpeg project is not.

@maherm
Copy link

maherm commented Jan 13, 2017

Any news on this feature? Looks like you had it running but somehow it didn't make it in the end?

@OSDDQD
Copy link

OSDDQD commented Jan 14, 2017

What about h264 nvenc for better speed of conversion?

@triDcontrols
Copy link

Any update to this? would really like server-side transcoding. can't wait. :)

@Jeronimo95
Copy link
Contributor

Closing this because discussion of transcoding is in issue #440

@EMcCormack
Copy link

Should we merge any remaining changes in the videoConverter branch to the transcoder branch and close the videoConverter branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants