Article^ Parent
Mencoder 笔记
Date: | 2017-09-12 00:00:00 |
Description: | Mencoder 使用笔记。 |
Keywords: | Mencoder, 视频编码转换 |
Category: | engineering_technology/computer/software/media/code |
Tag: | mencoder, encoding, media |
Link: | https://www.diewuxi.com/blog/article/86.html |
Changelog
* 2018-05-15
* Add: Add link 私房课
* 2017-09-12
* Done
语法
mencoder [OPTIONS] FILE [FILE|URL|-] [-o FILE | file://file | smb://[user:password@]host/path]
mencoder [OPTIONS] FILE1 [FILE1 OPTIONS] [FILE2] [FILE2 OPTIONS]
分割
mencoder -ss START -endpos DURATION -ovc copy -oac copy -of avi INPUT -o OUTPUT
-vf
scale=320:270,expand=320:270:::1,crop=320:270:0:0
-ovc
lavc -lavcopts vcodec=flv:vbitrate=200:acodec=mp3:abitrate=56
lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
lavc -lavcopts vcodec=flv:vbitrate=200 -srate 22050
lavc -lavcopts vcodec=mpeg4:vbitrate=320
lavc -lavcopts vcodec=mpeg4 // 比较快
xvid -xvidencopts bitrate=600
xvid -xvidencopts bitrate=400
x264 -x264encopts bitrate=600
-oac
lavc -lavcopts acodec=mp2:abitrate=64 -srate 22050
lavc -lavcopts acodec=mp3:abitrate=56
mp3lame -lameopts aq=9:cbr:br=64:vol=2
mp3lame -lameopts abr:br=56 -srate 22050
mp3lame -lameopts aq=7:cbr:br=64 -srate 32000
mp3lame -lameopts aq=7:cbr:br=64 -srate 22050
mp3lame -lameopts preset=64
ffmpeg mencoder视频格式转换 - 私房课(http://www.sifangke.com)
转 flv
mencoder \
-ffourcc FLV1 -lavfopts \
i_certify_that_my_video_stream_does_not_use_b_frames \
-of lavf \
-oac mp3lame -lameopts aq=9:cbr:br=64:vol=2 \
-ovc lavc -lavcopts vcodec=flv:vbitrate=200:acodec=mp3:abitrate=56 \
-vf scale=320:270,expand=320:270:::1,crop=320:270:0:0 -ofps 18 -srate 22050 \
input.xxx -o output.flv
转 avi
mencoder.exe \
-oac mp3lame -lameopts aq=7:cbr:br=64 -srate 32000 \
-vf scale=220:176 \
-ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=320 \
“input.xxx” -o “output.avi”
mencoder \
-of lavf \
-oac mp3lame -lameopts abr:br=56 -srate 22050 \
-ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3
..\v\wmv.wmv -o ..\v\wmv-3.flv
mencoder \
-oac mp3lame -lameopts aq=7:cbr:br=64 -srate 32000 \
-vf scale=220:176 \
-ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=320 \
“input.xxx” -o “output.avi”
mencoder \
-oac mp3lame -lameopts aq=7:cbr:br=64 -srate 22050 \
-vf scale=320:-3 \
-ovc xvid -xvidencopts bitrate=600 \
“wmv.wmv” -o “wmv.avi”
mencoder \
-oac lavc -lavcopts acodec=mp2:abitrate=64 -srate 22050 \
-vf scale=320:-3 -ofps 15 \
-ovc xvid -xvidencopts bitrate=400 \
rmvb.rmvb -o rmvb.avi
mencoder \
-oac mp3lame -lameopts preset=64 \
-ovc xvid -xvidencopts bitrate=600 \
-of avi \
1.rmvb -o rmvb.avi
RMVB 转 FLVCODE
mencoder \
-vf scale=320:240 -ffourcc FLV1 \
-of lavf -lavfopts \
i_certify_that_my_video_stream_does_not_use_b_frames \
-ovc lavc -lavcopts vcodec=flv:vbitrate=200 -srate 22050 \
-oac lavc -lavcopts acodec=mp3:abitrate=56 \
1.rmvb -o rmvb.flv
mencoder 转 flv 同时加字幕水印
试了一下,可以加进去,但有些参数还设置不好.比如中文的字幕只显示成”_____”
, 文件的各项设置:
cd mencoder
mencoder \
../file/test.mov -o ../flv/zbzbzb.flv \
-of lavf \
-oac mp3lame -lameopts abr:br=56 \
-ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:v4mv:last_pred=3 \
-subpos 5 \
-subfont-text-scale 10 \
-unicode \
-font c:\arial.ttf \
-sub ../file/test.srt \
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \
-srate 22050
pause
上面是在一个批处理文件中执行的,所以写成这样子
subpos 是说明字幕的位置:垂直方向上越大越靠下,水平方向的参数我没找到,最小0, 最大100
subfont-text-scale 设置字体的大小
-unicode 文字编码方式,其他的没试过
-font 字体文件
-sub 你的字幕文
Last modified: 2018-05-15
Comments [0]
There is no comments now.