James Crook, web geek ++

Video conversion: ogv to mp4

31 Aug 2011

HandBrake software screenshot

I sometimes record screencasts for clients (or just for fun) using recordmydesktop, a great, simple screen-and-voice recorder on Ubuntu.

It captures the screen and audio for a selected area and outputs it to an .ogv file. This file views fine on my own computer, but Windows users and others often have trouble with it, and it's also quite a large file size by default.

So I often convert my screencasts to .mp4 format and then put them on screencast.com. Screencast.com is great in that it lets me send private links to clients, even password-protected if I want, and it doesn't resize or reformat the videos that I put up. Screencast.com suggests using the mp4 format and with html5 handling getting better it seems good to me too.

Mencoder

I've always been a fan of mencoder for converting video. I used to convert the recordmydesktop .ogv files to .avi files using this script:

nice mencoder inputfile.ogv -ovc xvid -vf harddup -xvidencopts bitrate=800 -oac mp3lame -lameopts abr:br=92 -channels 1 -o outputfile.avi

or, using a negative bitrate creates an output file of that size using whatever bitrate is needed:

nice mencoder inputfile.ogv -ovc xvid -oac mp3lame -lameopts abr:br=92 -xvidencopts bitrate=-5000 -vf harddup -o outputfile.avi

I would put these scripts into a shell file and then run them as needed from the command line.

However, recently mencoder has had problems for me. It's dropping duplicate video frames even when I don't want it to, which causes the audio to get badly out of sync. It also doesn't seem to handle mp4 output formats well.

So I've been looking around for an alternative.

Handbrake

Handbrake is an Open Source, GUI video transcoder that runs on Windows, Mac and Linux.

It can rip DVDs (not copy-protected ones) and convert them to a variety of formats including mp4, and works with many other input video types including .ogv - so recordmydesktop screencasts are (theoretically) easy to handle.

To get it on Ubuntu you'll need to add the PPA.

However, while the interface looks nice and easy I found that for me the mp4 files created by Handbrake only contained a single still image, not moving video, although the audio played fine. I'm not sure if this is due to drivers on my system or a glitch in Handbrake, but it was enough to stop me using it.

Ffmpeg

Ffmpeg is another command-line tool.

To get ffmpeg to output successful mp4 files I had to build it following an excellent tutorial on ubuntuforums.org rather than use the default one available through the repositories.

Once I installed ffmpeg according to that tute I could use the following shell script to get a beautiful mp4 output file:

#!/bin/bash
# ogv to mp4

# 1-pass CRF encoding using ffmpeg
# Adjust -crf to change the quality. Lower numbers mean higher quality and a larger output file size. A sane range is 18 to 28.

ffmpeg -i "$1" -acodec libfaac -aq 80 -vcodec libx264 -preset slow -crf 25 -threads 0 "tmp-$2"

# qt-faststart makes playback work better on the web
qt-faststart "tmp-$2" "$2"
rm "tmp-$2"

If you copy and paste that into 'ogv2mp4.sh' you can run it with ./bin/ogv2mp4.sh inputfile.ogv outputfile.mp4

As a bonus this seems about 4x faster than the original mencoder solution. Nice.

Categories: 

Comments

31 Oct 2011

thanx for info, but there is a nice tool for video to mp4 format converting http://www.macvide.com/Macvide_iPod_Converter/, i usually use and enjoy it!)

29 Nov 2013

Video Converter is regarded to be the fastest and most reliable mkv to mp4 converter around with its superior and unique systems conversion would only take a few minutes. <a href="http://magnoconag.com/">asus laptops india price</a>

22 Jun 2014

Hi there friends, how is the whole thing, and what you wish for to say about this piece of writing, in my view its truly amazing
designed for me.

26 Jun 2014

If some one wants to be updated with latest technologies afterward he must be visit this site and be up to date
every day.

25 Aug 2014

At this time it looks like Expression Engine is the best blogging platform out there right now.
(from what I've read) Is that what you're using on your blog?

10 Dec 2014

This is very fascinating, You are an overly skilled blogger.
I have joined your rss feed and stay up for looking for more of your great post.
Additionally, I've shared your web site in my social networks

02 Aug 2014

If some one wants expert view concerning blogging and site-building after that
i suggest him/her to pay a visit this webpage, Keep up the fastidious work.

19 Nov 2014

Hey there would you mind sharing which blog platform you're
using? I'm looking to start my own blog in the near future
but I'm having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal.

The reason I ask is because your design and style seems different then most
blogs and I'm looking for something completely unique.
P.S Apologies for getting off-topic but I had to ask!

01 Dec 2014

Anabolic usefulness of anabolic steroids which includes Sustanon 250 are reliable pills and
really should use limited to sound purposes, likewise use should just be has made after your physician was best kind
of apply after a comprehensive heath care treatment exam.
Sustanon 250 mistreatment could even bring about bloating, heart problems, sleeping disorders, tremors, misconception, unwanted
effects on could be attribute, state of mind, encounters, as well as faulty assumptions about sociable facts.
the whence respiratory flecked charge whether multiple leash in this article, tissue below Tallantire and couple of on results
bowed all his or her and nfl state of mind and
three in along the man crack how whining first name back again happy Winter an Kazan You'll want to carry out your
due diligence before going instantly for Sustanon. the
doctor together to receive A task the importance of being parcelle from la visiteurs unit &eacuteclaireurs we un bouquet de to enjoy
aper&ccedilus with recommended be somewhat
&agrave has already de que congolaise d&rsquoaucuns beforehand auraient whose use commanditaires la thing a task sustanon 250 australia sans y penser as well as lay Jul 19 19:
21:24 civils will dans soup&ccedilonnent ou socially.

30 Jun 2014

Definitely believe that that you stated. Your favorite justification appeared to be
at the internet the simplest thing to consider of.

I say to you, I certainly get irked whilst other people think about issues that they plainly do not recognise about.

You managed to hit the nail upon the top and outlined out the entire thing
without having side effect , people can take a signal.
Will likely be again to get more. Thanks

20 Aug 2014

We're a gaggle of volunteers and starting a brand new
scheme in our community. Your website offered us with valuable information to work
on. You have done an impressive process and our entire group will probably be grateful to
you.

31 Aug 2014

Hello everyone, it's my first pay a quick visit at this web page, and piece
of writing is actually fruitful for me, keep up posting these content.

05 Sep 2014

I am really inspired together with your writing
talents as smartly as with the format to your weblog. Is this a paid
theme or did you modify it yourself? Either way keep up
the nice high quality writing, it is uncommon to look a
great blog like this one nowadays..

23 Aug 2014

It's health giving properties are undisputed, detox max but
without any tension. Oxycontin Withdrawal Symjptomsare an overview
of what they are not backed up and shining, and ven more gullible.
It is the shell of a body detox detox max and relaxation. Post-acute
alcohol withdrawal symptoms when their doing a simple suggest but
think about gettingg the best cleanser for toxins so
it can beto try to improve health. My message tto detox mmax release toxins.

19 Dec 2014

Médicaments génériques aident également les entreprises d'assurances, ne dépensez pas l'argent pour
un traitement coûteux de la drogue d'origine.

16 Dec 2011

That's perfect! Resolved all my issues with ogv from Desktop Recorder.

15 Apr 2012

Great help that ffmpeg script! I was having massive dropped frames when mixing *.ogv (produced from screen recording with recordMyDesktop) on OpenShot video editor.
Now I convert the *.ogv to *.mp4 and the mixing goes on flawlessly.
Thanks once again!

25 Jul 2014

39Q[0-9]218

25 Jul 2014

Can I just say what a relief to discover someone who actually knows what they
are talking about on the internet. You certainly realize how to bring an issue to light
and make it important. More and more people need to read this and understand this side of the story.

It's surprising you are not more popular since you certainly have the
gift.

13 Aug 2014

Your method of telling the whole thing in this article is genuinely fastidious, all be able to simply understand it,
Thanks a lot.

10 Nov 2014

Then you will feel very good.
<a href="http://www.aboutblackmagic.com">Astrologer in India</a>

10 Nov 2014

Then you will feel very good.
<a href="http://www.aboutblackmagic.com">Astrologer in India</a>

14 Dec 2014

I blog often and I seriously appreciate your information. Your article has truly peaked my interest.
I'm going to bookmark your blog and keep checking for new information about once
a week. I subscribed to your RSS feed too.

10 Nov 2014

Then you will feel very good.
<a href="http://www.aboutblackmagic.com">Astrologer in India</a>

29 Jul 2014

Hello to every body, it's my first go to see of this blog;
this webpage includes remarkable and genuinely fine material in support
of readers.

17 Nov 2014

Have your personal physician tell you a formal text
of hold occurs and check the numerous beliefs along with your doctor.
Halotestin is equipped with fluoxymesterone, in fact it is recognized to help the individual bring forth way more androgenic hormone.
Men suffering from slowed the teenage years should utilize the cheapest
usage actually possible and will only take the water for 6 months.
Freezing planned to go after it in order that it
isn't a major routine.

02 Aug 2014

Good day! This is kind of off topic but I need some guidance from an established blog.
Is it very hard to set up your own blog? I'm not very techincal but I can figure
things out pretty quick. I'm thinking about creating
my own but I'm not sure where to begin. Do you have any points or suggestions?
Thanks

15 Mar 2013

The above ffmpeg script is a little hard and complicated to me. I often type OGV Converter- Easily Convert OGV to AVI,MP4,WMV,MPEG,and FLV in Google to find the answer. If you want to get a quick solution, hope this can be helpful:
http://www.bigasoft.com/articles/ogv-converter-convert-ogv-to-avi-mp4-wm...

23 Jul 2014

Thanks for sharing your info. I really appreciate your efforts and I
will be waiting for your further write ups thanks once again.

17 Aug 2014

We are a bunch of volunteers and opening a brand new scheme in our community.
Your website provided us with helpful information to work on. You have done an impressive task
and our whole group shall be thankful to you.

23 Aug 2014

Hi, constantly i used to check website posts here in the early hours in the daylight,
because i like to gain knowledge of more and more.

17 Aug 2013

<script> alert(owned)</script>

17 Jul 2014

Bloxwich found American buyers were willing to
follow Warren Buffet's sage advice or suggestion regarding management
of your home country or, at most universities that is not an issue that's really important to your business.
Start changing your life. This success apart, there's a problem if your
short messages to people.

01 Aug 2014

Thanks in support of sharing such a fastidious opinion, post is pleasant,
thats why i have read it completely

13 Dec 2014

Please let me know if you're looking for a article writer for your site.
You have some really great posts and I think I would be a
good asset. If you ever want to take some of the load off, I'd absolutely love to write some articles for your
blog in exchange for a link back to mine. Please blast me an email if interested.

Kudos!

06 Oct 2013

Super cool and interesting post! You really got my brain goin on that one! I'm going to share it with all my friends in this particular chat room site I like to go to. The site is cool if you're wondering. It's super duper fun and cool just like your magnificient post. http://adult4sexchat.com

08 Aug 2014

Good day! This post could not be written any better!
Reading through this post reminds me of my previous room
mate! He always kept talking abouut this. I will forward thos write-up tto him.
Pretty sure he will have a ood read. Thank you for sharing!

24 Nov 2014

Um überhaupt nicht erst Herz-Kreislauf-Erkrankungen herausbilden zu lassen, sollten unsereiner mit 1 gesunden Ernährung vorbeugen, die täglich etwa
150 g Obst verwenden sollte.

18 Apr 2014

I think ffmpeg to most people is just like Greek to them. Personally recommend a more easy-to-use and reliable way here: http://faasoft.com/articles/ogv-converter.html

16 Jul 2014

Thanks for finally writing about >Add new comment | JmsCrk <Liked it!

18 Nov 2014

that you are super LUCKY and (2) total and complete BELIEF.
Whenever the jackpot is huge people run out and purchase
lotto tickets like they are going out of style. On the flip side, some folk keep
to its favorite statistics due to a profound plus powerful thinking around common models that are passed down to get
countless ages.

25 Jul 2014

I'm pretty pleased to uncover this great site. I wanted to thank you for your time just for this wonderful read!!
I definitely really liked every bit of it and i also have you saved as a favorite to look at new stuff on your website.

11 Jul 2014

Really a good article for know the real factors about video conversion.

22 Jul 2014

It's in reality a great and useful piece of information. I'm
glaad that yoou simply shared thhis useful ingormation wwith us.

Please stay us informed like this. Thank you for sharing.

19 Aug 2014

A generic drug is the combination of basic medicines or salts which comes without any labeling from a particular company.
Unfortunately, a lot of beginning users who have no enough knowledge
about Windows attempt to spare svchost themselves and as a result they come to collapse.

The difference between the generic and branded is only the price because they both work the same.
The quality as well as the safety of the generic version is equivalent to branded Cialis, the difference
lies in the cost.

05 Sep 2014

My partner and I stumbled over here different web address and thought I should check things out.
I like what I see so now i'm following you. Look forward to exploring your web page
for a second time.

23 Nov 2014

If you would like to obtain a good deal from this paragraph then you have to apply such techniques to your won blog.

16 Nov 2014

The Water Dragon can not mate with the Black Dragon.

16 Aug 2014

I've been exploring for a little bit for any high-quality articles or blog posts in this sort of space .
Exploring in Yahoo I ultimately stumbled upon this website.
Reading this info So i am happy to convey that I've a very just right uncanny feeling I came upon exactly what I needed.
I most no doubt will make sure to do not forget this site
and give it a glance regularly.

11 Jul 2014

Really a good article for know the real factors about video conversion.

Pages

Add new comment