Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Unbenannt
Tuesday, February 5th, 2008 at 11:06:41pm UTC 

  1. @ECHO off
  2. SET width=220
  3. SET height=auto
  4.     REM Default: auto
  5.  
  6. SET fps=source
  7.     REM Default: source (same framerate as input; if the framerate is not
  8.     REM compatible then fps2 is used).
  9.     REM Valid framerates:5,10,12,15,24000/1001,24,25,30000/1001,30,50,60000/1001,60
  10. SET fps2=25
  11.     REM Alternative framerate; used when encoding fails on the first try
  12.     REM (when fps=source)
  13.  
  14. SET audiobitrate=standard
  15.     REM Numeric value between 8 and 320; in combination with mp3lame you can
  16.     REM also use: medium, standard, extreme or insane.
  17. SET audiocodec=mp3lame
  18.     REM Possible options: mp2, mp3, mp3lame, source.
  19.     REM You can use source if you don't want to transcode audio, audiobitrate
  20.     REM is then ignored.
  21. SET audioid=
  22.     REM Audio Channel, leave blank for default; numeric value (MPEG: 0-31,
  23.     REM AVI/OGM: 1-99, ASF/RM: 0-127, VOB(AC3): 128-159, VOB(LPCM): 160-191,
  24.     REM MPEG-TS 17-8190). MPlayer prints the available audio IDs when run in
  25.     REM verbose (-v) mode.
  26.  
  27. SET videocodec=mpeg2video
  28. SET videoquality=6
  29.     REM Quality(?) of the video. Use a value between 2 and 32 (lower value means
  30.     REM better quality).
  31.  
  32. SET keyframe_interval=15
  33. SET max_b_frames=4
  34.     REM Max number of B-frames between two non-B-frames; use a value between 0
  35.     REM and 4.
  36.  
  37. SET croptop=0
  38. SET cropbottom=0
  39.     REM Default: 0 (no cropping).
  40.     REM Offset between the top of the input video and the top/bottom of the
  41.     REM cropped part in pixel.
  42.  
  43. SET decopts=-mc 0
  44.     REM additional decoder options. Try "-mc 0" if you have A/V-sync problems
  45.     REM with .flv files, else leave blank.
  46.  
  47. SET mencoder="%USERPROFILE%\Desktop\Downloads\mplayer\mencoder.exe"
  48.     REM Path to the mencoder.exe
  49.  
  50. SET targetdir=%~dp0
  51.     REM Path to the directory for the encoded files.
  52.     REM using %~dp0 outputs the file to the dir where this batch file is located.
  53.  
  54. SET editor="C:\Programme\notepad2_1.0.12_de\Notepad2_de.exe"
  55.  
  56.  
  57.  
  58. REM !!!Don't edit below this line.!!!
  59.  
  60. IF x%1==x (
  61.     IF EXIST %editor% (
  62.         GOTO EDIT
  63.     ) ELSE (
  64.         GOTO EOF
  65.     )
  66. )
  67.  
  68. SET /a croph = %cropbottom% - %croptop%
  69. IF %cropbottom%0 GTR %croptop%0 (
  70.     SET crop=crop=0:%croph%:0:%croptop%,
  71. ) ELSE (
  72.     SET crop=
  73. )
  74.  
  75. IF %audiocodec%==source (
  76.     SET audio=-oac copy
  77. ) ELSE (IF %audiocodec%==mp3lame (
  78.     SET audio=-oac mp3lame -lameopts preset=%audiobitrate% -af resample=44100:0:0
  79. ) ELSE (
  80.     SET audio=-oac lavc -lavcopts acodec=%audiocodec%:abitrate=%audiobitrate% -af resample=44100:0:0
  81. ))
  82.  
  83. IF "%audioid%"=="" (
  84.     SET aid=
  85. ) ELSE (
  86.     SET aid=-aid %audioid%
  87. )
  88.  
  89. IF "%height%"=="auto" (
  90.     SET scale=-vf %crop%scale,harddup -zoom -xy %width%
  91. ) ELSE (
  92.     SET scale=-vf %crop%scale=%width%:%height%,harddup
  93. )
  94.  
  95. :FPS
  96.  
  97. IF %fps%==source (
  98.     SET ofps=
  99. ) ELSE (
  100.     SET ofps=-ofps %fps%
  101. )
  102.  
  103. ECHO. >>"%~dp0RB_encode.log"
  104. ECHO %date%, %time:~0,5%: %~nx1 >>"%~dp0RB_encode.log"
  105. 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"
  106. 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"
  107.  
  108. %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"
  109. IF %ERRORLEVEL% GTR 0 (
  110.     IF NOT "%fps%" == "%fps2%" (
  111.         SET fps=%fps2%
  112.         ECHO Errorlevel: %ERRORLEVEL%
  113.         GOTO FPS
  114.     )
  115. )
  116. REM ECHO. >>"%~dp0RB_encode.log"
  117. ECHO 
  118. PAUSE
  119. GOTO EOF
  120.  
  121. :EDIT
  122.  
  123. START "dummy" %editor% %0
  124.  
  125.  
  126. :EOF

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



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.

comments powered by Disqus
worth-right
worth-right