VideoConvert.sh
FULL_FILE_NAME=$1 EXTENSION_NAME="${FULL_FILE_NAME##*.}" FILE_NAME="${FULL_FILE_NAME%.*}" NEW_FILE_FULL_NAME="${FILE_NAME}.mp4" #ffmpeg -y -i $FULL_FILE_NAME \ #-c:v libx264 \ #-vf scale=640:-1 \ #-color_primaries 1 -color_trc 1 -colorspace 1 \ #-r 29.92 \ #-b:v 340K \ #-profile:v baseline \ #-g 90 \ #-keyint_min 0 \ #-bf 0 \ #-sc_threshold 40 \ #-coder 0 \ #-c:a aac \ #-ar 44100 \ #-b:a 96k \ #-ac 2 \ #-level 3.1 \ #-movflags +faststart \ #-brand isom \ #../output/$NEW_FILE_FULL_NAME #ffmpeg -y -i $FULL_FILE_NAME \ #-c:v libx264 \ #-s 480x320 \ #-color_primaries 1 -color_trc 1 -colorspace 1 \ #-r 23.796 \ #-b:v 1440K \ #-profile:v main \ #-g 90 \ #-keyint_min 0 \ #-bf 0 \ #-sc_threshold 40 \ #-coder 0 \ #-c:a aac \ #-ar 44100 \ #-b:a 128k \ #-ac 2 \ #-level 3.1 \ #-movflags faststart \ #../output/$NEW_FILE_FULL_NAME ffmpeg -y -i $FULL_FILE_NAME \ -c:v libx264 \ -vf scale=1280:-1 \ -crf:v 18 \ -color_primaries 1 -color_trc 1 -colorspace 1 \ -r 30 \ -b:v 1200K \ -profile:v baseline \ -g 90 \ -keyint_min 0 \ -bf 0 \ -sc_threshold 40 \ -coder 0 \ -c:a aac \ -ar 44100 \ -b:a 128k \ -ac 2 \ -level 3.1 \ -movflags +faststart \ -brand isom \ ../output/$NEW_FILE_FULL_NAME # mediainfo ../output/20170504022437.m4v #ffmpeg -y -i 20170504022437.mp4 -crf:v 23 -c:v libx264 -s 1280x720 -vf colormatrix=bt601:bt709 #-pix_fmt yuv420p -r 30 -b:v 1M -acodec copy -profile:v baseline -level 3.0 -movflags faststart ../output/20170504022437.m4v # #-crf:v 23 \ #-vf scale=1280:720 #-vf scale=320:-1 #-s 1280x720 \ #-color_primaries 1 -color_trc 1 -colorspace 1 \ #-vf colormatrix=bt601:bt709 -pix_fmt yuv420p \ #-c:a aac #-c:a libvo_aacenc #-c:a aac -strict -2 #-b:a 128k #-ar 44100 # for ipod: main, for android: baseline #-profile:v baseline \ #-acodec copy \ #-profile:a aac_he_v2 \ #-brand isom \ # # ## ASW-Amazon Elastic Transcoder-Android-Default ################################################## # Video # Codec=H.264 # Codec Options=InterlacedMode:Progressive,MaxReferenceFrames:3,Level:3.1,ColorSpaceConversionMode:Auto,Profile:baseline # Maximum Number of Frames Between Keyframes=90 # Fixed Number of Frames Between Keyframes=false # Bit Rate=1500 # Frame Rate=30 # Video Max Frame Rate # Max Width=1280 # Max Height=720 # Sizing Policy=Fit # Padding Policy=Pad # Display Aspect Ratio=16:9 # # Audio # Codec=AAC # Codec Options=Profile:AAC-LC # Sample Rate=44100 # Bit Rate=128 # Channels=2 # # # #
轉檔指令
./VideoConvert.sh IMG_3626.m4v
留言
張貼留言