Monday 19 September 2016

Convert multiple Video files at a same time to various formats like MPG and Mp3 using Batch and add it to sendTo options in Windows 10

Now In this post we are going to see how to convert the video file to MPG and Mp3 using batch file with simple steps like using SendTo options, for this first we need to install the VLC player, then we have to do the following steps.

Checklist : VLC player needs to be installed








Next : we are going to create a two batch scripts , one for Convert to MPG, another one for Convert to Mp3, so at the end we are going to have a screen like below , to quick access from sendTo options.


From the above screen , now we know that when we right click the file we have options like convert to in sendTo, so for achieve that we have to create two script file , 

Screenshot:









1. Copy the below code and save it as "Convert To Mp3.bat" file in desktop,  
2. Type  "shell:sendto" in run window, it will open the shell window, 
3. Copy the "convert To Mp3.bat" file to shell window like below




@ECHO OFF
rem ***********************************************************************
rem * Convert to Mp3 batch converter.                                     *
rem *                                                                     *
rem * For installation just copy batch file to SendTo directory.          *
rem * Type "SHELL:sendto" in Run     to go to Sendto folder.              *
rem *                                                                     *
rem * I got quite good compression rations with these parameters:         *
rem * vcodec=none      codec used                                         *
rem * vb=10000         video bandwidth                                    *
rem * deinterlace=1    rebuild full pictures from keyframes and diffs.    *
rem * acodec=mp3       audio codec                                        *
rem * ab=128           128kbps mp3 quality                                *
rem * channels=2       stereo                                             *
rem *                                                                     *
rem ***********************************************************************
echo **********************************************************************
echo Convert to MP3 VLC batch converter called: %0 %1 %2 %3 %4 %5 %6 %7 %8
echo **********************************************************************
echo.
echo.

SET _new_extention=mp3

:start
if "%~1"=="" (call goto :the_end)
CALL :SUB_CONVERT %1
SHIFT
goto :start


:SUB_CONVERT
SET _orig_path=%~1
rem SET _orig_extention=%_orig_filename:*.=%
echo %_orig_path%
SET _orig_extention=%_orig_path:*.=%
CALL SET _new_path=%%_orig_path%:.%_orig_extention%=.%_new_extention%%%
set _new_path="%_new_path%"
echo.
echo Converting %1 ======TO===== %_new_path% ...
echo.

if exist "%ProgramFiles%\VideoLAN\VLC\vlc.exe" (
SET _vlc_path="%ProgramFiles%\VideoLAN\VLC\vlc"
) else (
SET _vlc_path="%ProgramFiles(x86)%\VideoLAN\VLC\vlc"
)

CALL %_vlc_path% -I dummy -vvv %1 --sout=#transcode{vcodec=none,acodec=mp3,
ab=128,channels=2,samplerate=44100}:standard{access=file,mux=mp3,
dst=%_new_path%} vlc://quit
GOTO :eof

:the_end
echo **********************************************************************
echo * FINISHED                                                           *
echo **********************************************************************


pause





2.  Type  "shell:sendto" in run window





3.  copy the "convert To Mp3.bat" file to shell window 












1. Copy the below code and save it as "Convert To MPG.bat" file in desktop, 
2. Type  "shell:sendto" in run window, it will open the shell window, 
3. Copy the "convert To MPG.bat" file to shell window like below




@ECHO OFF
rem ***********************************************************************
rem * Convert to MPG batch converter. (2014-09-29 Sinx)                   *
rem *                                                                     *
rem * For installation just copy batch file to SendTo directory.          *
rem * On Win8 execute "SHELL:sendto" to go to Sendto folder.              *
rem *                                                                     *
rem * I got quite good compression rations with these parameters:         *
rem * vcodec=h264      codec used                                         *
rem * vb=10000         video bandwidth                                    *
rem * deinterlace=1    rebuild full pictures from keyframes and diffs.    *
rem * acodec=mp3       audio codec                                        *
rem * ab=128           128kbps mp3 quality                                *
rem * channels=2       stereo                                             *
rem *                                                                     *
rem ***********************************************************************
echo **********************************************************************
echo MOV to MPG VLC batch converter called: %0 %1 %2 %3 %4 %5 %6 %7 %8
echo **********************************************************************
echo.
echo For installation, just copy batch file to SendTo folder..
echo.

SET _new_extention=mpg

:start
if "%~1"=="" (call goto :the_end)
CALL :SUB_CONVERT %1
SHIFT
goto :start


:SUB_CONVERT
SET _orig_path=%~1
rem SET _orig_extention=%_orig_filename:*.=%
echo %_orig_path%
SET _orig_extention=%_orig_path:*.=%
CALL SET _new_path=%%_orig_path%:.%_orig_extention%=.%_new_extention%%%
set _new_path="%_new_path%"
echo.
echo Converting %1 ======TO===== %_new_path% ...
echo.

if exist "%ProgramFiles%\VideoLAN\VLC\vlc.exe" (
SET _vlc_path="%ProgramFiles%\VideoLAN\VLC\vlc"
) else (
SET _vlc_path="%ProgramFiles(x86)%\VideoLAN\VLC\vlc"
)

CALL %_vlc_path% -I dummy -vvv %1 --sout=#transcode{vcodec=h264,vb=10000,deinterlace=1,
acodec=mp3,ab=128,channels=2,samplerate=44100}:standard{
access=file,mux=ts,dst=%_new_path%} vlc://quit
GOTO :eof

:the_end
echo **********************************************************************
echo * FINISHED                                                           *
echo **********************************************************************

pause




2.  Type  "shell:sendto" in run window





3. copy the "convert To MPG.bat" file to shell window               









After copying the batch file in the sendto, now you can right click the video files, and go to the 
SendTo options , you can see various options Convert To Mp3, Convert To MPG 












Now you can see the converted file in the same location , where to click the sendTo options, for Convert To Mp3 or Convert To MPG

From this post you can able to learn how to create a tool to convert multiple video files at a same time to various formats like MPG and MP3 using batch file




No comments:

Post a Comment