Giter Site home page Giter Site logo

l0lock / ffmpeg-bat-collection Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 5.0 3.83 MB

A collection of .bat files for some usefull ffmpeg conversions.

Home Page: https://l0lock.github.io/FFmpeg-bat-collection/

License: GNU General Public License v3.0

Batchfile 76.73% HTML 12.98% JavaScript 2.60% SCSS 7.69%
ffmpeg ffmpeg-script batchfile batch batch-script

ffmpeg-bat-collection's Issues

ffmpeg simple .bat question

Hi, sorry for bothering you. I'm new to .bat and ffmpeg in general. I recently found out a ffmpeg command I would like to use as a .bat script.

  1. dragn n drop xyz.mkv on .bat
  2. take xyz.mkv as input and output filename
  3. run ffmpeg script: ffmpeg -i xyz.mkv -af "pan=stereo|c0=c2+0.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3" -c:v copy -codec:a ac3 -b:a 160k -ar 44100 -sn -dn xyz.mkv
  4. output location G: drive

Any help would be appreciated :)

okay this is working, but I don't know how to change the output location. I want to ouput to my usb drive which is G:

@echo off
:again

ffmpeg ^
	-i "%~1" ^
	-af "pan=stereo|c0=c2+0.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3" -c:v copy -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
	"%~p1%~n1.mkv"
if NOT ["%errorlevel%"]==["0"] goto:error
echo �[92m%~n1 Done!�[0m

I guess this has something to do with
%~1 - expands %1 removing any surrounding quotes (")
%~f1 - expands %1 to a fully qualified path name
%~d1 - expands %1 to a drive letter only
%~p1 - expands %1 to a path only
%~n1 - expands %1 to a file name only
%~x1 - expands %1 to a file extension only
%~s1 - expanded path contains short names only
%~a1 - expands %1 to file attributes
%~t1 - expands %1 to date/time of file
%~z1 - expands %1 to size of file

ffmpeg IF condition

Hi I have a .bat file to convert and change channel volume (with ffmpeg) from 5.1 Audio to Stereo, and a different .bat for Stereo/Mono Audio that doesn't change loudness.
Now I have to manually look if a movie is 5.1 or Mono/Stereo and decide which .bat to run. I would like to make one .bat with a condition so it looks what the channel layout is and then decide which profile to run. I hope this makes sense. It has to check also the language tag, because sometimes (in my case) german is 2.0 but English is 5.1 or vice versa.

Thank you for any advice

5.1

ffmpeg ^
	-i "%~1" ^
	-af "pan=stereo|c0=c2+0.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3" -map 0:v:0 -c:v copy -map 0:a:m:language:ger -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
	"G:\%~n1.mkv"

2.0/Mono

ffmpeg ^
	-i "%~1" ^
	-map 0:v:0 -c:v copy -map 0:a:m:language:ger -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
	"G:\%~n1.mkv"

This is the whole .bat

@echo off
:again

ffmpeg ^
	-i "%~1" ^
	-map 0:v:0 -c:v copy -map 0:a:m:language:ger -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
	"G:\%~n1.mkv"
if NOT ["%errorlevel%"]==["0"] goto:error
echo �[92m%~n1 Done!�[0m

shift
if "%~1" == "" goto:end
goto:again

:error
�
echo �[93mThere was an error. Please check your input file or report an issue on github.com/L0Lock/FFmpeg-bat-collection/issues.�[0m
pause
exit 0

:end
�
cls
echo �[92mEncoding succesful. This window will close after 10 seconds.�[0m
timeout /t 1

no visible thumbnail after encoding

i tested your dragndrop to android and was fascinated how it compresses my video from 10mb to 1,x mb. amazing!!!

i noticed the preview thumbnail was missing. while no error i am curious how it would look like with enabled preview thumbnail in windows.
thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.