I have successfully installed openSMILE for extracting features of a wav file (audio).
SMILExtract -C config/chroma_fft.sum.conf -I input.wav -O chroma.csv
I have successfully used this cmdline (I am using Windows 10) command to extract the features of a single audio file.
Now I want to compute features of multiple files at once using OpenSmile, rather than feeding 1000s of filenames and then concatenating the resultant CSV.
Any help here would be appreciated.
Related
This question already has answers here:
How do you convert an entire directory with ffmpeg?
(34 answers)
Closed 2 years ago.
I am completing a project in which I have mountains of .h264 video files that all need to be converted into good quality .avi files. They need to be .avi because I'm using DeepLabCut on them after.
I have been able to do this file by file with the code:
ffmpeg -i practicevid_5.h264 -q:v 6 practicevid_5_2.avi
However, I would ideally like to be able to convert an entire folder of these files to save time. Please let me know if you can help out with this.
If you are using bash:
cd /the/dir/the/h264/videos/are/in
for input in *.h264; do ffmpeg -i $input -q:v 6 ${input/.h264/_2.avi}; done
In Windows default shell:
for %%input in (*.h264) do ffmpeg %%input -q:v 6 %input:.h264=_2.avi%
Couldn't test the windows sample, as i do not have a windows machine !
I have 30 rtf files that I need to convert all of them to txt. Is there any script can I run it on command line and do Multiple-Files convert
I’m using Kali Linux 2020.2 ..
Thanks
I've just had the same problem and tested the recommended programs here.
Of those, I found unoconv to work the best. A one-liner to convert everything in one directory is:
for rtf in rtf/*.rtf; do unoconv -f txt $rtf;done
Please note that unoconv adds a BOM mark at the beginning of each .txt file (at least for my rtf files), so if your future processing can't handle that you should strip it.
I am trying to compress an audio file and I use -y command to overwrite the existing file. But problem is that that command decreases the duration of the audio file.
I am using the following command:
ffmpeg -y -i D:\audio\Blues.mp3 -ab 64 D:\audio\Blues.mp3
Is there any way to resolve this within ffmpeg? Thanks.
You can't read from a file and write to it at the same time with FFmpeg.
Write to a different file, then delete the original afterwards.
I've looked at this post and this post among a few others. They provided some information as to how to get started, unfortunately my use case is slightly more complex.
I have pairs of video files that I run ffmpeg commands on. The command I run transfers metadata from the original files to the converted files and looks as follows:
christian$ ffmpeg -i file_1.mov -i file_1.mp4 -map 1 -map_metadata 0 -c copy file_1_fixed.mp4
This post explains what the command does, should an explanation be required. Basically the use case is that both the original file and the converted file have the same name, but different extensions. How would I go about writing a shell script that finds all such pairs in a directory and composes and runs the command specified above for each pair?
I assume, from a logical point of view that I would need to loop through all the pairs, get the file names, do some sort of string manipulation (if this is even possible with shell scripting) compose the command and run it.
Any resources you could point me towards would be deeply appreciated. Just to clarify, some pseudo code:
for (file in directory) {
string name = file.getname
string command = "ffmpeg -i " + name + ".mov -i " + name + ".mp4 -map 1
-map_metadata 0 -c copy " + name + "_fixed.mp4"
run(command)
}
Hope this makes sense, please let me know if I should clarify more. Thank you for reading.
As you tagged this question with bash I send you this sketch for a bash script. This should work in general but you may adjust it to you actual needs:
#!/usr/bin/bash
# for debugging remove the hash from next line:
#set -x
# loop over all .mov files
for FILE in *.mov; do
FILE_MP4="${FILE/.mov/.mp4}"
FILE_FIXED="${FILE/.mov/_fixed.mp4}"
ffmpeg -i "$FILE" -i "$FILE_MP4" -map 1 -map_metadata 0 -c copy "$FILE_FIXED"
done
Notes/Hints:
for FILE in *.mov loops over all files with extension .mov but no other files. This is good because it will even work if called multiple times in the same directory.
The for loop will search in the current directory. You may use cd to change to a specific directory. (Handling of absolute or relative file paths instead of names is also possible...)
The quotes are choosen with care. Quoting in bash is very powerful but definitely not easy.
To check this script, you may prefix your ffmpeg command with command echo. This is like a dry run. (You will see what would be called without the echo "prefix".)
i'm trying to use SOX to cut certain mp3s, convert them to different formats and add fade in-out to the files.
It works fine with mp3 to mp3 but when i try to convert it from an MP3 to an m4r i get the error: "sox FAIL formats: no handler for file extension `m4r'".
I'm using SOX in windows so how can i install the ffmpeg package on top of the SOX so it knows waht to do with the m4r format?
on the same machine i can use ffmpeg to convert from mp3 to m4r just fine. It sucks that ffmpeg doesn't offer FADE for audio.
You may download and install ffmpeg library for audacity and then copy avcodec-52.dll avformat-52.dll avutil-50.dll swscale-0.dll to sox installation directory. Thus you can use sox as :
sox -t ffmpeg youFile.wma yourFile.wav