Now I can batch process clips, thanks again, it gives me one more problem, namely a muddled folder full of original and processed clips. Mkdir produces a new folder, but how do I get ffmpeg to place its output in there please?
+ Reply to Thread
Results 1 to 5 of 5
-
-
Add the desired path 'in front of' the output filename i.e.: C:\mypath\clip.mkv (windows) or /whatever/path/clip.mkv (linux)
-
Side to babiulep answer it will be good to add two additional steps - detection if required folder / directory exist and if not exist then create desired folder
-
creation of a new directory was used in that "scary" python script
bash script with simple relative directory path:
Code:#!/bin/bash DIR_NAME="new_709_files" mkdir -p ${DIR_NAME} #create that directory on disk if it does not exist for filename in *.mp4 do NAME=$(basename "${filename}" .mp4) OUTPUT_FILENAME="${DIR_NAME}/${NAME}.mp4" ffmpeg -y -i "${filename}" -c copy "${OUTPUT_FILENAME}" # example, it does nothing just copies mp4 to that new folder done
Code:#!/bin/bash DIR_NAME="new_709_files" mkdir -p ${DIR_NAME} #create that directory on disk ABSOLUTE_OUTPUT_DIR_NAME=$(cd ${DIR_NAME}; pwd) #creates absolute path for that new directory for filename in *.mp4 do NAME=$(basename "${filename}" .mp4) OUTPUT_FILENAME="${ABSOLUTE_OUTPUT_DIR_NAME}/${NAME}.mp4" ffmpeg -y -i "${filename}" -c copy "${OUTPUT_FILENAME}" done
-
Thank you all. Once again, with a bit of patience and some tinkering, it works a treat.
Similar Threads
-
I wish to apply and ffmpeg filter to many clips
By DeJay in forum LinuxReplies: 8Last Post: 4th Dec 2024, 06:15 -
How to feed output of ffmpeg into another ffmpeg filter?
By BosseB in forum Video ConversionReplies: 3Last Post: 27th Mar 2024, 14:53 -
How to prepare clips for ffmpeg merging
By vmackey in forum EditingReplies: 7Last Post: 17th Feb 2024, 19:53 -
How to normalize audio of an entire folder with MP4s (FFmpeg)
By Aorin in forum Newbie / General discussionsReplies: 0Last Post: 4th Jun 2020, 18:23 -
How can I Concatenate an entire folder with xfade+fade out? (FFMPEG)
By Aorin in forum Video ConversionReplies: 0Last Post: 22nd May 2020, 09:18