Jump to content

batch ffmpeg


arrbee99
 Share

Recommended Posts

Don't know if this is allowed in an Emby forum, but seeing as you guys seem to use and like ffmpeg quite a bit -

 

Am trying to take 50fps mp4 and turn it into 25fps mp4. This seems to work ... ffmpeg -i name.mp4 -r 25 name_25.mp4

 

Does anyone know how to make a Windows bat file that would do that for a bunch of mp4 files in a folder, so that the are all changed to 25fps and with a modified name so that the originals are kept.

 

Thanks very much.

 

Edit: I browsed around on Google and tried a few suggestions but they didn't work.

Edited by arrbee99
Link to comment
Share on other sites

Just save into a bat file and run it - its not recursive so only looks in local dir

 

change the path to your ffmpeg

REM Testing for loop
FOR %%m in (*.mp4) do (
REM ReMux MP4 to 25 fps
F:\Video\ffmpeg\bin\ffmpeg -i "%%m" -r 25 "%%~nm_25.mp4"
echo ====================================================
)

ps - it uses the original filename it finds and adds a "_25"

Edited by PenkethBoy
  • Like 1
Link to comment
Share on other sites

Just save into a bat file and run it - its not recursive so only looks in local dir

 

change the path to your ffmpeg

REM Testing for loop
FOR %%m in (*.mp4) do (
REM ReMux MP4 to 25 fps
F:\Video\ffmpeg\bin\ffmpeg -i "%%m" -r 25 "%%~nm_25.mp4"
echo ====================================================
)

ps - it uses the original filename it finds and adds a "_25"

 

Thanks very much. Shall give it a go.

Link to comment
Share on other sites

Is it interlaced content?

 

Not sure of the best way to tell. Its not in Emby yet. Looking at the scrolling titles at the end of a few of them it appears not.

 

If it is interlaced would that give a worse / bad / terrible result ?

Link to comment
Share on other sites

If it's interlaced then you could probably get the same result using the server's convert media feature.

Link to comment
Share on other sites

Tried PenkethBoys's bat file and works great. Thank you. Bit surprised the conversions are a quarter of the size and not half. I realise ffmpeg isn't literally removing alternate frames but still surprised. Output seems fine though after a quick look.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...