mencoder mp4
Wednesday, 19. December 2007, 17:19:45
-oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac \
-lavfopts format=psp:i_certify_that_my_video_stream_does_not_use_b_frames \
input.video -o output.psp
mencoder -oac lavc -ovc lavc -of lavf -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=aac
-af lavcresample=24000 -vf harddup -lavfopts
format=psp:i_certify_that_my_video_stream_does_not_use_b_frames
-ofps 30000/1001
http://www.mplayerhq.hu/DOCS/HTML/zh_CN/menc-feat-handheld-psp.html
注意你可以通過 -info name=MovieTitle為視頻攝者標題
轉換視頻文件的命令格式
mencoder filename.xx -of avi -o xx.avi -ofps 24 -vf-add scale=320:240 -vf-add expand=320:240:-1:-1:1 -srate 44100 -ovc xvid -xvidencopts bitrate=500:max_bframes=0:quant_type=h263:me_quality=4 -oac lavc -lavcopts acodec=mp2:abitrate=96
(這是一個完整的命令,只有一行,每行的行末有空格,可以直接複製,然後修改相應參數)
命令具體含義:
filename.xx 代表你所要轉換的文件的文件名和後綴,若不在當前目錄,需要加入完整路徑
-of avi 輸出文件格式為avi
xx.avi 輸出文件完整文件名,若不存在當前目錄,也需要寫完整路徑
-ofps 24 輸出文件的幀速率,基本上2608a芯片可以解碼24fps的視頻
-vf-add scale=320:240 -vf-add expand=320:240:-1:-1:1 輸出文件分辨率320:240,拉伸也是320:240,這個在加黑邊的時候有用
-srate 44100 聲音採樣率44.1kHz
-ovc xvid -xvidencopts bitrate=500:max_bframes=0:quant_type=h263:me_quality=4 視頻編碼格式為xvid編碼,bitrate代表比特率,為500kbps,算法採用h.263
-oac lavc -lavcopts acodec=mp2:abitrate=96 音頻編碼格為libavccodec編碼包種的mp2編碼,abitrate是比特率,看所需要得音頻質量,電影96kbps就夠了,MTV可以選擇 128kbps,或者更高的192kbps,再高就沒有什麼意義了
對於一些Mkv封裝視頻的內嵌字幕和dvdrip的外掛字幕,需要在上面的命令後面添加嵌入字幕的參數。
對於Mkv視頻,在後面添加如下參數
-sid 0 -font "" -subfont-text-scale 5 -subfont-outline 2 -subfont-blur 2 -subpos 90 -subcp CP936
在使用的時候將替換為字幕字體文件的完整路徑,例如/usr/share/fonts/truetype/arphic/uming.ttf。
後面的-subfont-text-scale 5 代表字體大小,數字越大,字體越大
-subfont-blur 2什麼字體模糊半徑,2就行了
-subpos 90字體在屏幕中的位置,90是屏幕從上往下90%的地方
-subcp CP936使用語言以及編碼方式
對於外掛字幕則在上面的基礎上給出字幕的路徑即可,添加如下參數:
-sub "" 替換為字幕絕對路徑
對於16:9比例的寬頻視頻文件,按照上面的方法轉換會把人擠扁,可以通過加黑邊的方式解決,
就是在轉換好的視頻上下加上黑邊,補足4:3(320:240)這樣需要將最開始的參數中的-vf-add scale=320:240改為-vf-
add scale=320:-3,expand=:240:::1,意思就是寬度保持不變,高度用黑邊補足
http://bbs.sumisora.com/read.php?tid=10871752
http://all-abroad.blogspot.com/2006/12/encoding-psp-compatible-mp4-files-on.html
Correct one:
mencoder -oac lavc -ovc lavc -of lavf -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:vbitrate=500:acodec=aac -af lavcresample=24000 -vf scale=368:208,harddup -lavfopts format=psp -ofps 30000/1001 -o test.MP4 input.avi
在lavc 裏找不到acc的話,用mp3lame or faac:
mencoder -oac mp3lame -ovc lavc -of lavf -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:vbitrate=500:acodec=aac -af lavcresample=24000 -vf scale=368:208,harddup -lavfopts format=psp -ofps 30000/1001 -o test.MP4 input.avi
or
mencoder -oac faac -ovc lavc -of lavf -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:vbitrate=500:acodec=aac -af lavcresample=24000 -vf scale=368:208,harddup -lavfopts format=psp -ofps 30000/1001 -o test.MP4 input.avi
Eventually, I google and find an article which mentions the parameter "aac" has changed to "libfaac", so just replace it and then everything is as usual.
mencoder input.avi -oac lavc -ovc lavc -of lavf -lavcopts aglobal=1:\
vglobal=1:vcodec=mpeg4:vbitrate=800:autoaspect:acodec=aac \
-lavfopts format=mp4:i_certify_that_my_video_stream_does_not_use_b_frames\
-ofps 24.0 -af lavcresample=24000 -vf scale=640:362,harddup -o ipod.mp4
☆ parameter: -acodec aac ----> -acodec libfaac
http://blog.xuite.net/napmas/worknote/10780352
http://www.cnblogs.com/niuniu502/archive/2007/06/17/786112.html
mencoder -ofps 30000/1001 -af lavcresample=24000 -vf harddup -of lavf -oac faac -ovc lavc -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:vbitrate=768:acodec=aac:abitrate=64 -lavfopts format=psp test.avi -o M4V00001.MP4
http://www.chineselinuxuniversity.net/articles/7509.shtml
mencoder /f/BT/"$a" -oac mp3lame -lameopts preset=128 -ovc xvid -xvidencopts bitrate=570 -vf scale=480:272 -of avi -o /f/date/PSP_A/"$a".avi
mencoder 目標.rmvb -oac mp3lame -lameopts preset=128 -ovc xvid -xvidencopts bitrate=570 -vf scale=368:272 -of avi -o 目標.avi
http://www.tgbus.com/sf/newsoftware/pspsoft/200603/20060317135557.html
http://www.hacken.cc/ss/index.php/144989/viewspace-5136












