Convert .wma files to .ogg with ffmpeg

find -name '*wma' -exec ffmpeg -i {} -acodec vorbis -ab 128k {}.ogg \;

11
By: muadib
2009-02-28 20:45:19

These Might Interest You

  • Note: %~nI expands %I to a file name only (cf. http://technet.microsoft.com/en-us/library/bb490909.aspx)


    1
    FOR %I IN (*.mp4) DO \Tools\ffmpeg\bin\ffmpeg.exe -i "%I" "%~nI.mpeg"
    tomtom99 · 2013-12-25 16:43:49 0
  • This converts all m4a files in a dir to flv. You can just swap the m4a bit to anything else ffmpeg supports though, and it'll work.


    2
    for f in *.m4a; do ffmpeg -i "$f" "${f%.m4a}.flv"; done
    topher1kenobe · 2009-05-18 22:38:49 0
  • Uses ffmpeg to convert all that annoying .FLAC files to MP3 files keeping all the Artist's information in them. There's not much more to it. Show Sample Output


    0
    find . -name "*.flac" -exec ffmpeg -i {} -ab 160k -map_metadata 0 -id3v2_version 3 {}.mp3 \;
    gustavohmsilva · 2016-06-28 19:35:06 0
  • It loops through all files in current directory that have flac extension and converts them to mp3 files with bitrate of 320kpbs using ffmpeg and default codec.


    0
    for FILE in *.flac; do ffmpeg -i "$FILE" -b:a 320k "${FILE[@]/%flac/mp3}"; done;
    Orkan · 2016-07-04 04:13:17 0

What Others Think

nice, but this leaves .wma in the output filename, for example output.wma.ogg
alphakamp · 472 weeks and 6 days ago
Add this argument: find -name '*wma' -exec ffmpeg -i {} -acodec vorbis -ab 128k {}.ogg \; -exec rename -v 's/\.wma//' {}.ogg \;
laugg · 452 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: