Multiple files with one ffmpeg command?

Everything about displays and monitors. 120Hz, 144Hz, 240Hz, 4K, 1440p, input lag, display shopping, monitor purchase decisions, compare, versus, debate, and more. Questions? Just ask!
Xx123456xX
Posts: 33
Joined: 03 Dec 2016, 16:03
Location: Houston, TX

Re: Multiple files with one ffmpeg command?

Post by Xx123456xX » 07 Aug 2017, 18:46

I'm typing this into Windows Powershell. The single-file command works fine, but I don't know what's happening with the multi-file command.

User avatar
RealNC
Site Admin
Posts: 3743
Joined: 24 Dec 2013, 18:32
Contact:

Re: Multiple files with one ffmpeg command?

Post by RealNC » 07 Aug 2017, 19:47

It's for cmd.exe, not powershell.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Xx123456xX
Posts: 33
Joined: 03 Dec 2016, 16:03
Location: Houston, TX

Re: Multiple files with one ffmpeg command?

Post by Xx123456xX » 08 Aug 2017, 07:17

I'm still quite new when it comes to CLIs and "advanced"/"deep" computer stuff.

Unfortunately with the Creator's Update, I'm no longer able to access cmd.exe from the right-click context menu, and I don't trust myself putting it back.
Conversely, when I search for the Powershell "equivalent" to the given command, all I see is a hodgepodge of Lovecraftian chaos.

Unless someone can dumb-down this "chaos" to a form I can comprehend, or if I'm given the exact command to enter, it seems as if I'm limited to entering the "basic" command 109 times.

User avatar
RealNC
Site Admin
Posts: 3743
Joined: 24 Dec 2013, 18:32
Contact:

Re: Multiple files with one ffmpeg command?

Post by RealNC » 08 Aug 2017, 08:31

You press Winkey+R the "run" dialog pops up. You enter "cmd.exe" and hit enter. This gives you a cmd console.

Put your 1-78 videos in C:\videos. Then type:

Code: Select all

cd c:\videos
Then you can run the command I gave you:

Code: Select all

for /l %x in (1, 1, 78) do ffmpeg -i a%x.mov -r 120 -vf "setpts=(1/5)*PTS" -an b%x.mov
Wait it to finish. This will produce the resulting b*.mov files in C:\videos. Then, put your 79-109 videos in C:\videos and run this command:

Code: Select all

for /l %x in (79, 1, 109) do ffmpeg -i a%x.mov -r 120 -vf "setpts=(1/5)*PTS" -an b%x.mov
Wait for it to finish and again you'll find the resulting b*.mov files in C:\videos.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Xx123456xX
Posts: 33
Joined: 03 Dec 2016, 16:03
Location: Houston, TX

Re: Multiple files with one ffmpeg command?

Post by Xx123456xX » 08 Aug 2017, 09:36

Do press enter when I type cd c:\videos? Because it says it can't find the path.

User avatar
RealNC
Site Admin
Posts: 3743
Joined: 24 Dec 2013, 18:32
Contact:

Re: Multiple files with one ffmpeg command?

Post by RealNC » 08 Aug 2017, 09:41

Did you create the C:\videos folder? You obviously need to create it.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Xx123456xX
Posts: 33
Joined: 03 Dec 2016, 16:03
Location: Houston, TX

Re: Multiple files with one ffmpeg command?

Post by Xx123456xX » 08 Aug 2017, 09:44

I'm using the one already there. Do I need to create a new one? If so in which location?

User avatar
RealNC
Site Admin
Posts: 3743
Joined: 24 Dec 2013, 18:32
Contact:

Re: Multiple files with one ffmpeg command?

Post by RealNC » 08 Aug 2017, 09:50

It's just a temporary directory. It can be c:\bazagazabooba if you want to. Just a place to put your videos and convert them.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Xx123456xX
Posts: 33
Joined: 03 Dec 2016, 16:03
Location: Houston, TX

Re: Multiple files with one ffmpeg command?

Post by Xx123456xX » 08 Aug 2017, 10:09

When I open the command prompt it displays:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\jacob>

User avatar
RealNC
Site Admin
Posts: 3743
Joined: 24 Dec 2013, 18:32
Contact:

Re: Multiple files with one ffmpeg command?

Post by RealNC » 08 Aug 2017, 10:19

Change to the directory first to the directory you've put your videos in. The "cd" command is used for that. So if you create a C:\videos folder, change to that with "cd c:\videos" (yes, press enter to enter commands.) Then you can run the previous commands I posted.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Post Reply