Parameter | YouTube recommends setting |
---|---|
-movflags faststart | moov atom at the front of the file (Fast Start) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import videojs from 'video.js'; | |
import 'video.js/dist/video-js.css'; | |
// video.js player from the docs: https://github.com/videojs/video.js/blob/master/docs/guides/react.md | |
class VideoPlayer extends React.Component { | |
componentDidMount() { | |
// instantiate Video.js | |
this.player = videojs(this.videoNode, this.props, function onPlayerReady() { |
FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.
Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openssl' | |
def gen_key(name) | |
key = OpenSSL::PKey::RSA.new 1048 | |
file = File.new(name, "w") | |
file.write(key) | |
file.close | |
end | |
def get_key(name) |