FFmpeg Encoding Bash Scripts – Ubuntu 16.10

#!/bin/bash

echo ==========================

read -erp 'Input: ' input
#read -erp 'Output: ' output
#read -erp 'Video Bitrate: ' vb
#read -erp 'GOP: ' gop

echo ==========================

echo

set -x #echo on

ffplay -x 640 -y 360 -vf "drawtext=text='%{pts\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)" "$input"
#!/bin/bash

echo ==========================

read -erp 'Input: ' input
read -erp 'Output: ' output
read -erp 'Video Bitrate: ' vb
read -erp 'GOP: ' gop

echo ==========================

echo

set -x #echo on

ffmpeg -hwaccel cuvid -c:v h264_cuvid -i "$input" -c:v h264_nvenc -g $gop -b:v $vb -c:a aac -metadata:s title="" -metadata:s:a language=eng -metadata creation_time=now -loglevel verbose "$output"
#!/bin/bash

echo ==========================

read -erp 'Input: ' input
read -erp 'Output: ' output
read -erp 'Video Bitrate: ' vb
read -erp 'GOP: ' gop
read -erp 'Start (hh:mm:ss): ' start
read -erp 'Time (hh:mm:ss): ' time

echo ==========================

echo

set -x #echo on

ffmpeg -ss $start -hwaccel cuvid -c:v hevc_cuvid -i "$input" -map 0 -ss 00:00:30 -t $time -c:v h264_nvenc -g $gop -b:v $vb -c:a ac3_fixed -c:s copy -metadata:s title="" -metadata:s:a language=eng -metadata creation_time=now -loglevel verbose "$output"

Leave a Reply

Your email address will not be published. Required fields are marked *