Playing .mp4 files in Linux

Tips

Now this is a problem which i was facing for a long time in both Ubuntu and Mandriva. I wasnt able to play .mp4 format files . Now i have a solution and  i am sharing it with you. I stumbled upon this simple solution in http://ubuntuforums.org and the solution was posted by Fabián Rodríguez , whom i appreciate for his different thinking . Now to the solution…

Just convert the .mp4 file into a .ogv file and you will be able to play it in any video player in Linux. 🙂

The conversion can be done by installing ffmpeg2theora and using the following syntax in Terminal.

$ ffmpeg2theora  filename.mp4

the output is a clone of filename.mp4 but with a .ogv extension (say filename.ogv). That video file is playable in a ll video players.

It took me 3 mins (approx) for converting a 18MB .mp4 video file and the video/audio quality didnt get affected in any way.

Advertisements

10 comments on “Playing .mp4 files in Linux

  1. Hm. I’ve never run into that problem. I don’t think I’ve ever run into a video that VLC or Mplayer couldn’t play.

    Your video probably uses a weird proprietary audio codec, and that’s what’s causing the problem. MP4 can support many different audio codecs, and I’ve never run into an MP4 that Mplayer couldn’t play, but I suppose if it used some proprietary format then Mplayer would have to be compiled from source to support it (due to licensing issues, it can’t be supported by default in the ubuntu packaged binary).

    I’m sure if you asked Ubuntu forums they’d have more patience to help you. But really, encoding the entire video is overkill and will end up hurting video quality. Stripping the audio out of the MP4, converting it to AAC or something, then merging it back into the MP4 is probably the solution I’d go with. It’s quicker and better for quality because the video is never actually converted or modified — only the audio is.

  2. I can’t find a player in Ubuntu that (usefully) plays my mp4s, from Sanyo Xacti camera.
    They all play them as though they need another screen or 2 to fit image on.
    I do much macro work, but the movie on Ubuntu might not feature the bee, except now and then when bee is in the segment of the image which the player happens to display fullscreen.
    Not just macro work though.
    Anyone know what’s wrong?
    Some of these I’ve watched on Wndws, and fine.

  3. The problem with VLC is that sometimes regressions sneak in and the player loses the ability to produce quality playback of certain formats for awhile. For example, right now the version of VLC released has a problem with static on the audio for mp4 files. The ffmpeg2theora solution would be a nice temporary workaround to that problem if you didn’t want to go through the hassle of installing a prior version of VLC and so forth.

  4. The 1080 mp4 files produced by my SamsungHMX-Q10BN/XAA (don’t ask me why the have to have screwed up model names) stutter like crazy in VLC and Totem freezes when attempting to play them. This is on a 64-bit system with 8GB or RAM and a Intel i7 > 3GHz CPU with a SSD drive, so the hardware is definitely there. I have yet to try this solution to see if it changes things, but I just wanted to chime in on the fact that even though VLC plays everything you throw at it, sometimes it does not do so properly.

    Ubuntu 10.10
    VLC 1.1.4

  5. Hi,
    I installed Red hat linux 5 on my Lapy. and I thought after installed i will be familiar of Linux. but i got lot of problem during installation of Linux. finally i installed Red hat Linux OS my Laptop. now i have to install VLC media player and some Office software. But it’s getting a lot of problem. Because i am new of Linux and some people say i will have to install RPM and package.but i am unknown about the RPM and package. and also i could’t connect wireless internet because my lapy is old version. and some peored hat Linux specialized person say wireless will not work my laptop. now how can i download Package and RPM. that’s the mazor problem i am getting.

  6. The reason the audio does not play is because the audio stream is encoded with FourCC (Quicktime (albeit somewhat bastardized)). From memory one of the ways is to download the mplayer win32 codecs and manually install them, rough but it does work 98% of the time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s