Hello again, I am a huge fan of anime, (Dragon Ball and Naruto) in particular. I saw some channels uploading Anime videos bypassing YouTube’s copyright detection. So I looked on the ways and mostly involved some video editing software and you have to invest a lot of your time. So I wanted to automate the process that takes in input as a Video and modifies its properties so that it would bypass YouTube’s Copyright detection and quality of video should still be watchable.
So lets explore FFmpeg commands first and then we can simply write a bash script to automate the complete process.
To extract audio from the video -
Add watermark to the video - watermark.png would be overlayed at (x,y) -> (10,10) on the frames of input.mp4
Extract clip from video whose starting time and ending time is specified -
Increase Audio speed by 10% - If you have a general audio file and you want to speed up the audio, below command can be used
Increase video speed by 10% -
Increase audio and video speed together using complex filtergraph - this is similar to when you speed up the YouTube Videos or increase playback speed in VLC player.
To increase volume by 10dB - you must have seen videos whose sound is quite less even if you are listening on MAX volume, that’s because embedded audio level is low, below command would increase the audio level by 10dB. Change value to 20dB, 30dB and so on depending on how much audio level you want to increase.
To decrease volume by 5dB - Similar to increasing audio level, you can also decrease audio level of an independent audio file or audio embedded inside a video.
Remove audio from video file - If you want to mute the audio of a video file, you can use the command below to extract a muted video file.
I have listed some commands which are used most frequently. To automate the filtering and editing process, we can write a pipeline in which video would be edited in stages. Starting from the input video, output of one level would be input to another level and finally output video is saved. All intermediate files are removed.
Shell Programming with bash : http://matt.might.net/articles/bash-by-example/