[Video Module] Tutorial: play mp4 HD video with Gallery video module

maravizzo
maravizzo's picture

Joined: 2005-09-11
Posts: 49
Posted: Mon, 2010-08-09 13:28

It took me a quite a while to discover all this stuff, so I'll share it here hoping that it will be useful for others :-)
If you have ever played with videos you know how ugly are flv compared to mp4... Well, theoretically the Gallery2 video module doesn't support mp4 video, but practically it does, here are tricks and instructions...

1 – Create your mp4 video file: A good free software is Avidemux ( http://avidemux.sourceforge.net/ ).
To be standard compliant and get the best results the video codec should be .264 (MPEG-4 AVC on Avidemux) and the audio codec AAC.
To learn how to get the best quality/compression read this tutorial:
http://gabextreme.googlepages.com/DeathTheSheep_x264_VfW_guide.html
Or this one, more complicated:
http://www.avidemux.org/admWiki/doku.php?id=tutorial:h.264

2 – Make it fast-start: Standard mp4 stores header info at the end of the file, like the avi. But this means that the whole file has to be downloaded before it plays. This isn't what we want: we want the file to play immediately in Gallery!
We will use a tiny piece of free software to move the header of the file at the beginning: MP4-FastStart ( http://www.datagoround.com/lab/ ).
It does exactly and only this: it makes an mp4 fast starting :-)

3 – Cheat the video module: Just change the extension of the file from .mp4 to .flv and upload it on Gallery2.
Now edit the file and insert the width and height: the video will play perfectly!! Here is an example from my site:
http://www.zorring.org/vecchie/australia_2004/Cape_Tribulation/Cape-Tribulation-Trekking.flv.html

3a – Update: It seams that there's an unofficial update to the video module, here:
http://www.flashyourweb.com/filemgmt/index.php?id=22
It may make unnecessary to change the file extension (I haven't tested it yet).

Bye

------------------------------------------
My Gallery sites:
http://www.zorring.org/
http://www.ruraljourney.com/italy_travelguide/

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2010-08-11 15:02

Yup, my update adds mp4 support. No changes other than updating the module.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
gossamer

Joined: 2011-01-07
Posts: 47
Posted: Mon, 2011-02-28 00:27
maravizzo wrote:
It took me a quite a while to discover all this stuff, so I'll share it here hoping that it will be useful for others :-)

After doing quite a bit of searching, I keep coming up with your post on video files for gallery. Where can I find instructions on how to incorporate the ability to upload videos to my gallery site?

Can you tell me how you created the header at the top of your gallery sites? And how did you create the text body above the albums? What template are you using? Is it embedded in another application like wordpress?

Thanks,
Alex

 
maravizzo
maravizzo's picture

Joined: 2005-09-11
Posts: 49
Posted: Mon, 2011-02-28 09:33
gossamer wrote:
Where can I find instructions on how to incorporate the ability to upload videos to my gallery site?

I can't understand your question... When a video is standard compliant and you have updated the video module, then for Galley it is an "object", like a photo. So you can allow anybody to upload it.
Maybe you can have problems with the upload limits on your server... Try the fantastic Uploadify:
http://codex.gallery2.org/Gallery2:Modules:uploadify

gossamer wrote:

Can you tell me how you created the header at the top of your gallery sites? And how did you create the text body above the albums? What template are you using? Is it embedded in another application like wordpress?

No, it is not embedded, it's standalone Gallery2, just my personal modification of the Matrix Theme.
The text body above the albums it is just the album description, nothing more :-)
The header is an image called randomly by a javascript... I can provide you with my theme for G2, if you like... But I must say that when I made it, it was not intended for being used in other sites: you'll surely find some parts hardcoded that you need to edit manually.
Actually I was creating a public version of my theme for G3, but it is still work-in-progress and not updated: I've postponed the idea to migrate my sites to G3 until there is a good Google Maps module... And the theme creating was postponed consequently.

Bye

------------------------------------------
My Gallery sites:
http://www.zorring.org/
http://tracks.vagabondo.net/

 
gossamer

Joined: 2011-01-07
Posts: 47
Posted: Mon, 2011-02-28 22:37

Hi, thanks for the info. I didn't realize the "Add photo" was also a way to "add video."

I'm using G3 now, but I would otherwise love to hack on the theme you've built for my site :-)

Thanks again,
Alex