Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8009781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:32:39+00:00 2026-06-04T18:32:39+00:00

I am running a OSX, don’t know tons about video conversions. But I have

  • 0

I am running a OSX, don’t know tons about video conversions. But I have like 200 videos that are all in mp4 format and won’t play in Firefox. I need to convert them to ogg to use the html5 video tag.

These files live in a folder structure that makes it hard to do files one at a time. I would like the bash command or Ruby command to go through all child folders and find all .mp4’s and convert them.

I found one reference of how to do this with Google: http://athmasagar.wordpress.com/2011/05/12/a-bash-script-to-convert-mp4-files-to-oggogv/

#!/bin/bash
for f in $(ls *mp4 | sed ‘s/\(.*\)\..*/\1/’)
do
ffmpeg -i $f.mp4 -acodec vorbis -vcodec libtheora $f.ogg
done

But have no idea how to convert this from linux to osx.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:32:41+00:00Added an answer on June 4, 2026 at 6:32 pm

    While the direct answer to your question would be like this:

    #!/bin/bash
    MOVIES=~/Movies/
    find "$MOVIES" -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -sameq "${0%%.mp4}.ogg"' {} \;
    exit;
    

    I think you might find better results using the VP8 or webm codec as it will give you much better results and is actually preferred in modern versions of Firefox. Given that, you should try this:

    #!/bin/bash
    MOVIES=~/Movies/
    find "$MOVIES" -name '*.mp4' -exec sh -c 'ffmpeg -i "$0" -sameq "${0%%.mp4}.webm"' {} \;
    exit;
    

    Both of these methods WILL result in a loss of quality in your resulting videos as they are re-encoding the already encoded material and, in my opinion, even the webm codec is not nearly as good as a properly encoded MP4 using the h.264 codec.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't like my MBP because it's flaming hot to the touch and about
I'm running some code on Mac OSX 10.6.6 and XCode 3.2.4 and I have
I don't have a huge amount of experience using VI. I am running it
I know this question is like one posed before, but I need a good
I have a mac osx lion. I have xampp running (i.e. I click on
I'm running Postgres 9.1 (Homebrew installation on Mac OSX) and I'd like to monitor
I don't know what I've broken but I can't create any rails apps using
I'm running Mac OSX 10.6.4 and have installed RVM. Its been great so far,
I have a problem that seems to manifest itself only on Mac OSX, and
I'm running node.js on OSX and have just installed mongodb using command npm install

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.