[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[格式转换] 批处理命令行工具转DVD视频为MP4,H264

是命令行工具么?能否把自带的帮助信息贴出来方便大家查看?
Do All in Command Line

TOP

是命令行,功能强大,可转ipod,PSP视频,说明太长,贴一部分,其他请看:http://trac.handbrake.fr/wiki/CLIGuide

Using HandBrakeCLI¶HandBrake's CLI is really easy to use. If you get comfortable with it, it can be a lot more efficient than the GUIs.

The Basics¶First, simple input and output.
HandBrakeCLI -i source -o destination That will encode with default values: 1000kbps ffmpeg video and 160kbps AAC audio in an .mp4 container.
Easy, right? So now you can start customizing those settings. You can pile on all sorts of things, and end up with a monster like:
HandBrakeCLI -i /Volumes/MyBook/VIDEO_TS -o /Volumes/MyBook/movie.m4v -v -P -m -E aac,ac3 -e x264-q 0.65 -x ref=3:mixed-refs:bframes=6:b-pyramid=1:weightb=1:analyse=all:8x8dct=1:subme=7:me=umh:merange=24:filter=-2,-2:trellis=1:no-fast-pskip=1:no-dct-decimate=1:direct=auto For now, think about less complex stuff:
HandBrakeCLI -i VIDEO_TS -o movie.mp4 -e x264 -b 2000 -B 192That will encode a source video located at the path VIDEO_TS to an output file called movie.mp4. It will use x264 with a bitrate of 2000 to encode the video, and encode the audio as 128kb/s AAC.
So can you start to see how this works? The most important info for HandBrakeCLI is the location of the DVD, and the location and name where you want to store the encoded video it will output. If you don't specify anything else, it uses fast, low-quality, default values. Each bit of information is preceded by a flag: -i for input, -o for output. To select an encoder, you use -e followed by the encoder name. So -e x264 uses x264 to encode the video. Video bitrate is controlled by -b, and audio bitrate is controlled by -B (yes, the option names are case-sensitive. -b is not -B and -e is not -E).
A few rudimentary hints for using the command line¶
  • Filepaths are important. I'm on a Mac, and my username is jon. My home directory is: /Users/jon/So the path to my Desktop is: /Users/jon/DesktopAnd so my Movies folder is at /Users/jon/MoviesA common shortcut is to use a tilde (~) to represent your home directory. That means: ~/Moviesis the same as: /Users/jon/Movies
Make sure you remember the right capitalization for everything. At the command line, HandBrakeCLI is not the same as handbrakecli. If you have to type a space in filepath, precede it with a \ backslash so the system knows what's going on.
  • You usually store GUI programs in the /Applications folder. CLI programs are usually stored in places like /usr/bin or /opt/local/bin. You can do that with HandBrake, but the easiest thing to do is just navigate to the directory that stores HandBrakeCLI. To navigate through your file system at the command line, you change directories (folders) by using the "cd" (Change Directories) command. For example, to move to my Movies folder, I would type: cd ~/MoviesThen, tell the shell to look for the program in the current working directory. To run a command in the Terminal, you just type its name. But the shell will only look in the places where applications are usually stored (like /usr/bin/). You need to tell it to look in the current directory. To do that, precede the program name with ./ like this: ./HandBrakeCLIOf course, running that won't do much anything useful. If you run HandBrake without telling it what to do, it will just tell you to read the help...
Presets¶HandBrake offers hard coded, factory-fresh presets that are exactly the same as the built-in presets in the MacGui. Descriptions of presets and rankings for speed, as well as a web-copy of all the presets' CLI strings are available.
To use a preset, type, for example:
./HandBrakeCLI -i /Volumes/DVD -o movie.mp4 --preset="iPhone & iPod Touch" So it's:
--preset="Preset Name"Be careful -- spelling and spacing and capitalization count. Don't forget the quotation marks, either. You can override most preset settings by specifying other options on the command line. To see a list of all the preset names and settings, type:
./HandBrakeCLI --preset-listThe following presets are available:

[ 本帖最后由 hmgl 于 2010-3-23 20:46 编辑 ]

TOP

好东西  支持 楼主 这个好东西 正是我需要的 嘿嘿

TOP

高端黑,我自己为了不支持.AAC后缀的iPad也弄了一个批量转的,留贴纪念:

@echo off

cd /d %~dp0
set iroot=%cd%

set path=%iroot%;%path%

set /p src=Source Dir:

cd /d %src%

for /f "delims=" %%i in ('dir /b *.aac') do (
                call :handle "%%i"
)

pause
exit

:handle

set input=%1

REM echo a=%input%


set "input=%input:~1,-1%"

REM echo b="%input%"

set "sname=%input:~0,-4%"
REM echo sn="%sname%"

set "output=%sname%.m4a"
REM echo output="%output%"

mp4box.exe -flat -add "%input%" -new "%output%"

goto :eof

TOP

返回列表