this post was submitted on 01 Jan 2024
8 points (100.0% liked)

techsupport

2473 readers
22 users here now

The Lemmy community will help you with your tech problems and questions about anything here. Do not be shy, we will try to help you.

If something works or if you find a solution to your problem let us know it will be greatly apreciated.

Rules: instance rules + stay on topic

Partnered communities:

You Should Know

Reddit

Software gore

Recommendations

founded 1 year ago
MODERATORS
8
submitted 11 months ago* (last edited 11 months ago) by sarmale to c/[email protected]
 

Originally posted on beehaw technology. So I have some .opus files that I want to convert to .mp3. I used ffmpeg CLI with a script from https://ottverse.com/convert-all-files-inside-folder-ffmpeg-batch-convert, I used the wav to mp3 one but put opus instead of wav. The output is always in the same folder, and I want it to go to another, how can I do it? (windows 10)

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 11 months ago* (last edited 11 months ago) (1 children)

I would try adding ffmpeg to path, setting your working directory to the output folder, and running the script from there. If that doesn't work then you probably need to tweak the script.

The script page you linked also gives example syntax of

for %f in (*.mp4 *.avi *.mov) do ffmpeg -i "%f" -c:v libx264 -c:a aac "%~nf_new.mkv"

Did you try modifying the very last argument to something like "c:/your/path/%~nf_new.mkv"?

[–] sarmale 1 points 11 months ago* (last edited 11 months ago) (1 children)

Thank you, didnt knew that I should put the path there. Ended up with this: for %f in (*.opus) do ffmpeg -i "%f" -b:a 192k -ar 44100 "E:\MUZICA\Music\miscmp3\%~nf_new.mp3"

[–] [email protected] 1 points 11 months ago (1 children)

Did that work or are you missing a backslash after "miscmp3"?

[–] sarmale 1 points 11 months ago* (last edited 11 months ago) (1 children)

It was a typo, I put a backslash there like 40min ago(so it worked) but it seems like it didnt edit... Weird

Try clicking view source, it shows it

[–] [email protected] 2 points 11 months ago

I don't know the markup language for Lemmy but it might be treating it like an escape character. In any case, I hope your ffmpeg project is working!