Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Klyith
Aug 3, 2007

GBS Pledge Week
That code sample is for linux bash script. I'm assuming you're on windows?

Copy ffmpeg.exe into the directory with your video files. Make a new text file there, and paste this:
code:
mkdir output
FOR %%F IN (*.mp4) DO ffmpeg -i "%%F" -c copy -an ".\output\%%F"
pause
then rename the text file from .txt to .bat, and run the bat
(if you can't see the .txt, you need to turn off "Hide extensions for known files" in folder options)


edit:

quote:

These files are also organized in folders by project/month/year.
If you wouldn't mind telling me a bit more detail about that, I can give you a batch to do the whole shebang at once. Change the names to fake for privacy is fine.

So like if the client that wants this stuff is Hanes underwear, is your structure:
C:\Video Projects\Hanes\2020\Jan\Socks Commercial\
or
C:\Video Projects\2020\Jan\Hanes\Socks Commercial\

Klyith fucked around with this message at 17:37 on Jun 25, 2021

Adbot
ADBOT LOVES YOU

Klyith
Aug 3, 2007

GBS Pledge Week

tangy yet delightful posted:

Thanks for this, I assume I would put it in the top-most directory and it would do everything within that?
No, that batch only hits the files in the directory it runs in, I hadn't read your OP closely at first.

So you could just keep moving the .bat & ffdshow to each folder you need processed. If that's a relatively easy task because there's only 10 target folders with 300 videos each, do that. But if you have 300 folders with 10 videos each it'd be a pain and you want something better.

quote:

So don't laugh at what is probably not the most efficient file structure, currently the footage is spread across multiple drive letters and I'll likely buy a drive to consolidate it all which will be passed to the client, so the top letter (C/D/E) might change but the structure is(will be):

C:\Client Footage\20XX Videos\Month 20XX\Client\Project Name\

Each month has probably 4-8 different project folders if that matters. And if needed I'm not opposed to creating a different folder structure via some manual renaming if that'll make things work better/at all :)

So that folder that I've bolded Client is the consistent target? A Year/Month folder might contain multiple Client folders, but the Client you're looking at is unique and always the same?

Example, if Hanes was the client:
C:\Client Footage\2020 Videos\January 2020\Hanes\Socks Commercial\
C:\Client Footage\2020 Videos\January 2020\Art Museum\Van Gogh Exhibit\
D:\Client Footage\2018 Videos\August 2016\Hanes\Tshirts Ad\
D:\Client Footage\2018 Videos\August 2016\Starbucks\Training Video\


(My objective is to do it as recursively as possible, and also make it so that your source videos stay on your drive. Doing the audio strip and copy to the external in the same step is better.)

Klyith
Aug 3, 2007

GBS Pledge Week
The TEST RUN:
code:
SET "_client=Hanes"
@echo OFF
FOR /R  %%G IN (*.mp4) DO CALL :process "%%G"
pause
exit
:process
SET _path=%~p1
CALL SET _test=%%_path:%_client%=%%
if /I NOT "%_path%"=="%_test%" (
	echo %1 >> fileslist.txt
	)
exit /B
Edit the Hanes on the first line into whatever your Client folder name is, save as .bat file in the base directory for your Client Footage.

All this does is make a text file with the list of videos it found. Sanity check to make sure we're on the same page.

Klyith
Aug 3, 2007

GBS Pledge Week
The REAL THING:
code:
SET "_client=Hanes"
SET _outdrive=X:
@echo OFF
if NOT exist %_outdrive% (
	echo ***   %_outdrive% not present   ***
	pause
	exit
	)
FOR /R  %%G IN (*.mp4) DO CALL :process "%%G"
pause
exit
:process
SET _path=%~p1
CALL SET _test=%%_path:%_client%=%%
if /I NOT "%_path%"=="%_test%" (
	if NOT exist "%_outdrive%%_path%" (mkdir "%_outdrive%%_path%")
	ffmpeg -i %1 -c copy -an "%_outdrive%%_path%%~n1.mp4"
	)
exit /B
Again replace Hanes with your client folder name and X with the drive letter of the output drive that you're dumping video to (ie the external you're going to deliver to the client).

Save as a .bat file, put the .bat and ffmpeg into the base directory & run it. Then repeat for other drives that have more Client Footage.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply