Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Time: XX.YYYYY (XX are the seconds and YYYYY are the decimals (as much as you want, at least two if you want a precise enough cut)
- example: "651.165" is the time for 10 minutes, 51 seconds and 165 milliseconds
- Note: "E:\encoding\" is the path to my work place, I recommand you to create your own for example "C:\Users\<YourSession>\Documents\Encoding" if you don't have any other hard drive
- * Scaling (from 720 to 480 for example) *
- ffmpeg -i E:\encoding\<input>.webm -map 0:v -map 0:a -shortest -c:v libvpx-vp9 -b:v 0 -crf 20 -pix_fmt yuv420p -vf scale=-1:<resolution> -deadline good -cpu-used 1 -tile-columns 6 -threads 5 -c:a libopus -b:a 320k -ac 2 E:\encoding\<output>.webm
- (res= 720 or 480 usually)
- * cuting video *
- ffmpeg -ss <StartTime> -to <EndTime> -i E:\encoding\<input>.webm -map 0:v -map 0:a -shortest -c:v libvpx-vp9 -b:v 0 -crf 20 -pix_fmt yuv420p -deadline good -cpu-used 1 -tile-columns 6 -threads 5 -c:a libopus -b:a 320k -ac 2 E:\encoding\<output>.webm
- * cuting and scaling (from 720 to 480 for example) *
- ffmpeg -ss 586.213 -to 632.948 -i E:\encoding\01.mkv -map 0:v -map 0:a -shortest -c:v libvpx-vp9 -b:v 0 -crf 20 -pix_fmt yuv420p -vf scale=-1:<resolution> -deadline good -cpu-used 1 -tile-columns 6 -threads 5 -c:a libopus -b:a 320k -ac 2 E:\encoding\DeadmanWonderlandInsKomoriuta_720.webm
- * extract audio from a video *
- ffmpeg -i E:\encoding\<input_video>.webm -codec:a libmp3lame -b:a 320k -compression_level 7 E:\encoding\<output_audio>.mp3
- * add audio to a video *
- ffmpeg -i E:\encoding\<input_video>.webm -i E:\encoding\<input_audio>.ogg -c copy -map 0:v -map 1:a E:\encoding\<output>.webm
- * check volume levels for mp3/webm/whatever // For AMQ: Aim at max peak between -5 and -9dB, and mean around -20dB* -Approximate values, do not take those as granted-
- ffmpeg -i E:\encoding\<input>.mp3 -af "volumedetect" -vn -sn -dn -f null /dev/null
- * scale audio (from ogg to mp3 for example) *
- ffmpeg -i E:\encoding\<input>.ogg -b:a 320k -compression_level 7 E:\encoding\<output>.mp3
- ------------------------------------------------------------------------------------------------------------------------------------------
- * to cut in-between a video using ffmpeg *
- ffmpeg -ss <StartTime> -to <EndTime of the first half> -i E:\encoding\<input>.webm -map 0:v -map 0:a -shortest -c:v libvpx-vp9 -b:v 0 -crf 20 -pix_fmt yuv420p -deadline good -cpu-used 1 -tile-columns 6 -threads 5 -c:a libopus -b:a 320k -ac 2 E:\encoding\firstpart.webm
- ffmpeg -ss <StartTime of the second half> -to <EndTime of the second half> -i E:\encoding\<input>.webm -map 0:v -map 0:a -shortest -c:v libvpx-vp9 -b:v 0 -crf 20 -pix_fmt yuv420p -deadline good -cpu-used 1 -tile-columns 6 -threads 5 -c:a libopus -b:a 320k -ac 2 E:\encoding\secondpart.webm
- <etc if there are more cuts to made>
- * Create a .txt file containing this *
- file 'E:\encoding\firstpart.webm'
- file 'E:\encoding\secondpart.webm'
- <etc if there are more different part>
- * use this command to fuse the different part *
- ffmpeg -f concat -safe 0 -i E:\encoding\<file>.txt -c copy E:\encoding\<output>.webm
- * add this to a line to change volume *
- -af volume=-2.5dB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement