Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: [OPGELOST]mp4 filmpjes(quicktime) fout afgespeeld in 8.04  (gelezen 1319 keer)

Offline aartje

  • Lid
[OPGELOST]mp4 filmpjes(quicktime) fout afgespeeld in 8.04
« Gepost op: 2008/07/16, 14:44:56 »
Met mijn fototoestel kan ik mp4 filmpjes maken. De gegevens van die filmpjes
zijn resoluitie 640x480, 30 frames per seconde, quicktime codec.

Als ik hem met avidemux afspeel krijg ik netjes het volledige beeld in een
window op mijn scherm, als ik binnen avidemux naar de properties kijk kloppen die ook met
eerdergenoemde eigenschappen. Als ik hem met vlc of totem afspeel krijg
ik maar een deel van het beeld (een kwart ?). Hier wordt nu dan ook beweerd
dat de resolutie 320x240 is (???).
Als ik onder bestandsbeheer (nautilus) met de rechtermuistoets->Eigenschappen->Audio/Video kijk, dan wordt er ook de
verkeerde resolutie aangegeven (320x240). Bij avi- en/of mpg-bestanden
klopt de resolutie wel met de echte waarde. Het lijkt dus met de codec te
maken te hebben (??).

Dit gebeurt onder Ubuntu 8.04 (netjes uptodate gehouden).
Onder Ubuntu 7.10 is alles wel ok en wordt het filmpje ook onder
totem en vlc netjes afgespeeld. Wie zou hier iets zinnigs over kunnen zeggen ?
« Laatst bewerkt op: 2009/03/10, 08:48:19 door aartje »

Offline aartje

  • Lid
mp4 filmpjes(quicktime) fout afgespeeld in 8.04
« Reactie #1 Gepost op: 2008/07/17, 11:18:41 »
IK heb de oplossing al op het internet gevonden, het blijkt een
foutje in het mp4 formaat van de camera te zijn:

How to fix the bad resolution of Sanyo Xacti videos
Sat, 2007-01-13 17:29 — Gnurou
During my latest trip to Japan, I bought a Sanyo Xacti C5 camera. This hybrid digicam/videocam device is rather honest, and what I especially liked was that it directly records videos in Mpeg 4 format.
However, I quickly noticed that something sucked about it. When I wanted to watch my recorded videos on my PC, I could only see the top-left corner of the video. Although the device records videos in 640x480, mplayer, xine, or vlc would invariably show me a 320x240-sized window with only the top-left part. Only ffplay would play them correctly (but without sound). I know my videos sucks, but this way they suck even more now.
It is no surprise that the feature is actually a bug: for unknown reasons, the video size is not correctly written in the MP4 file (it seems the Olympus C-770 is also affected). So, here is how to fix it. I have found two ways, one bad, one better.
The bad way
The bad one first: use mencoder to rewrite your file into an avi. You'll have to encode the sound, but the video will be left untouched. This can be achieved by the following command:

$ mencoder -oac mp3lame -ovc copy SCREWED-FILE.MP4 -o FIXED-FILE.avi

There are two disadvantages to this solution:

1.There may be a little glitch at the beginning of the video. I don't know why, but it happens.
2.Although mplayer will play the video correctly, xine will still display the top-left corner.

The better way

So here is the better version, found on this thread. You just have to use MP4Box (which most likely comes with the gpac package of your distro) to fix the video. The command to apply to every video is:

 $ MP4Box -isma -add SCREWED-FILE.MP4 FIXED-FILE.MP4