Android Media Support
https://developer.android.com/guide/topics/media/media-formats.html
ffmpeg
https://ffmpeg.org/ffmpeg.html
http://lnpcd.blogspot.tw/2012/07/ffmpeg-mp4.html
在Mac OSX上安裝ffmpeg && ffmpeg命令行將h264封裝為mp4
FFmpeg 中文文件計畫
https://sites.google.com/site/ffmpegdoc/man-page
Test
ffmpeg -y -i i.mpg -c:v libx264 -vf scale=1280:720 -c:a aac -b:v 1.5M -b:a 192k -pass 1 o.mp4
ffmpeg -y -i 20170504022437.mp4 -framerate 30 -c:v libx264 -vf scale=1280:720 -c:a aac -strict -2 -b:v 1.5M -b:a 128k ../output/20170504022437.m4v
ffmpeg -y -r 30 -i 20170504022437.mp4 -c:v libx264 -vf scale=1280:720 -c:a libvo_aacenc -b:v 1.5M -b:a 128k ../output/20170504022437.m4v
FULL_FILE_NAME=$1 EXTENSION_NAME="${FULL_FILE_NAME##*.}" FILE_NAME="${FULL_FILE_NAME%.*}" NEW_FILE_FULL_NAME="$FILE_NAME.m4v" ffmpeg -y -i $FULL_FILE_NAME \ -c:v libx264 \ -s 1280x720 \ -color_primaries 1 -color_trc 1 -colorspace 1 \ -r 30 \ -b:v 1500K \ -acodec copy \ -profile:v baseline \ -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 #-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 # for ipod: main, for android: baseline #-profile:v baseline \
留言
張貼留言