Jump to content


Photo

batch ffmpeg

ffmpeg

  • Please log in to reply
7 replies to this topic

#1 arrbee99 OFFLINE  

arrbee99

    Advanced Member

  • Members
  • 2638 posts
  • Local time: 04:13 AM
  • LocationNew Zealand

Posted 10 June 2018 - 05:23 PM

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, 10 June 2018 - 05:31 PM.


#2 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3254 posts
  • Local time: 05:13 PM
  • LocationWarrington,UK

Posted 10 June 2018 - 05:49 PM

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, 10 June 2018 - 05:50 PM.

  • CBers likes this

#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 128939 posts
  • Local time: 12:13 PM

Posted 10 June 2018 - 06:02 PM

Is it interlaced content?



#4 arrbee99 OFFLINE  

arrbee99

    Advanced Member

  • Members
  • 2638 posts
  • Local time: 04:13 AM
  • LocationNew Zealand

Posted 10 June 2018 - 06:23 PM

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.



#5 arrbee99 OFFLINE  

arrbee99

    Advanced Member

  • Members
  • 2638 posts
  • Local time: 04:13 AM
  • LocationNew Zealand

Posted 10 June 2018 - 06:25 PM

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 ?



#6 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 128939 posts
  • Local time: 12:13 PM

Posted 10 June 2018 - 06:29 PM

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



#7 arrbee99 OFFLINE  

arrbee99

    Advanced Member

  • Members
  • 2638 posts
  • Local time: 04:13 AM
  • LocationNew Zealand

Posted 10 June 2018 - 06:40 PM

Never thought of that. Interesting. Thanks.



#8 arrbee99 OFFLINE  

arrbee99

    Advanced Member

  • Members
  • 2638 posts
  • Local time: 04:13 AM
  • LocationNew Zealand

Posted 10 June 2018 - 11:26 PM

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.







Also tagged with one or more of these keywords: ffmpeg

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users