Advertising
- Unbenannt
- Tuesday, February 5th, 2008 at 4:06:41pm MST
- @ECHO off
- SET width=220
- SET height=auto
- REM Default: auto
- SET fps=source
- REM Default: source (same framerate as input; if the framerate is not
- REM compatible then fps2 is used).
- REM Valid framerates:5,10,12,15,24000/1001,24,25,30000/1001,30,50,60000/1001,60
- SET fps2=25
- REM Alternative framerate; used when encoding fails on the first try
- REM (when fps=source)
- SET audiobitrate=standard
- REM Numeric value between 8 and 320; in combination with mp3lame you can
- REM also use: medium, standard, extreme or insane.
- SET audiocodec=mp3lame
- REM Possible options: mp2, mp3, mp3lame, source.
- REM You can use source if you don't want to transcode audio, audiobitrate
- REM is then ignored.
- SET audioid=
- REM Audio Channel, leave blank for default; numeric value (MPEG: 0-31,
- REM AVI/OGM: 1-99, ASF/RM: 0-127, VOB(AC3): 128-159, VOB(LPCM): 160-191,
- REM MPEG-TS 17-8190). MPlayer prints the available audio IDs when run in
- REM verbose (-v) mode.
- SET videocodec=mpeg2video
- SET videoquality=6
- REM Quality(?) of the video. Use a value between 2 and 32 (lower value means
- REM better quality).
- SET keyframe_interval=15
- SET max_b_frames=4
- REM Max number of B-frames between two non-B-frames; use a value between 0
- REM and 4.
- SET croptop=0
- SET cropbottom=0
- REM Default: 0 (no cropping).
- REM Offset between the top of the input video and the top/bottom of the
- REM cropped part in pixel.
- SET decopts=-mc 0
- REM additional decoder options. Try "-mc 0" if you have A/V-sync problems
- REM with .flv files, else leave blank.
- SET mencoder="%USERPROFILE%\Desktop\Downloads\mplayer\mencoder.exe"
- REM Path to the mencoder.exe
- SET targetdir=%~dp0
- REM Path to the directory for the encoded files.
- REM using %~dp0 outputs the file to the dir where this batch file is located.
- SET editor="C:\Programme\notepad2_1.0.12_de\Notepad2_de.exe"
- REM !!!Don't edit below this line.!!!
- IF x%1==x (
- IF EXIST %editor% (
- GOTO EDIT
- ) ELSE (
- GOTO EOF
- )
- )
- SET /a croph = %cropbottom% - %croptop%
- IF %cropbottom%0 GTR %croptop%0 (
- SET crop=crop=0:%croph%:0:%croptop%,
- ) ELSE (
- SET crop=
- )
- IF %audiocodec%==source (
- SET audio=-oac copy
- ) ELSE (IF %audiocodec%==mp3lame (
- SET audio=-oac mp3lame -lameopts preset=%audiobitrate% -af resample=44100:0:0
- ) ELSE (
- SET audio=-oac lavc -lavcopts acodec=%audiocodec%:abitrate=%audiobitrate% -af resample=44100:0:0
- ))
- IF "%audioid%"=="" (
- SET aid=
- ) ELSE (
- SET aid=-aid %audioid%
- )
- IF "%height%"=="auto" (
- SET scale=-vf %crop%scale,harddup -zoom -xy %width%
- ) ELSE (
- SET scale=-vf %crop%scale=%width%:%height%,harddup
- )
- :FPS
- IF %fps%==source (
- SET ofps=
- ) ELSE (
- SET ofps=-ofps %fps%
- )
- ECHO. >>"%~dp0RB_encode.log"
- ECHO %date%, %time:~0,5%: %~nx1 >>"%~dp0RB_encode.log"
- ECHO W=%width% H=%height% FPS=%fps% AC=%audiocodec% AB=%audiobitrate% VQ=%videoquality% KEYINT=%keyframe_interval% MAXB=%max_b_frames% CT=%croptop% CB=%cropbottom% O=%decopts% >>"%~dp0RB_encode.log"
- REM ECHO %mencoder% -priority belownormal -msglevel mencoder=1 %decopts% %aid% -of mpeg %audio% -ovc lavc %ofps% -lavcopts vcodec=%videocodec%:vqscale=%videoquality%:vmax_b_frames=%max_b_frames%:keyint=%keyframe_interval% %scale% %* -o "%targetdir%%~n1.rb.mpg" >>"%~dp0RB_encode.log"
- %mencoder% -priority belownormal -msglevel mencoder=1 %decopts% %aid% -of mpeg %audio% -ovc lavc %ofps% -lavcopts vcodec=%videocodec%:vqscale=%videoquality%:vmax_b_frames=%max_b_frames%:keyint=%keyframe_interval% %scale% %* -o "%targetdir%%~n1.rb.mpg"
- IF %ERRORLEVEL% GTR 0 (
- IF NOT "%fps%" == "%fps2%" (
- SET fps=%fps2%
- ECHO Errorlevel: %ERRORLEVEL%
- GOTO FPS
- )
- )
- REM ECHO. >>"%~dp0RB_encode.log"
- ECHO
- PAUSE
- GOTO EOF
- :EDIT
- START "dummy" %editor% %0
- :EOF
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.