Aspect ratio problem when playing videos in fullscreen

d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Sun, 2010-05-16 07:24

After trying several other galleries I found that Gallery 3 is the closest to my needs and I uploaded it to my server.
My hosting provider doesn't have FFMPEG by default, so I tried both suggestions from here:

Quote:
Try one of the pre-compiled ffmpeg binaries. Several available on flash your web. One that may work on 1and1 can be downloaded here

I'm not sure what and where to modify (other than replacing the FFMPEG file) in order to fix the following 3 issues:
- I can only upload .FLV and .MP4 files - I'd like to be able to upload other filetypes too instead of re-encoding everything
- the uploaded movies were not showing video, so I had to use the workaround to manually set their size for each clip
- all the clips have the default thumbnail - I'd like it to be automatically created from the clip contents
But the main problem (as the posting subject suggests) is that even though the clips play fine in the normal player window they stretch horizontally when I play them in fullscreen (the clips are 4:3 and my monitor is 16:10).
I upgraded to the latest FlowPlayer (just replaced flowplayer.controls.swf , flowplayer.js and flowplayer.swf in /lib) and the problem is still present.
I've read several topics that suggest to fix the PAR (Pixel Aspect Ratio) to 1:1 (make sure the video is set to use square pixels).
I tried several encoding tools and made sure I set that properly.
I even downloaded some test files - check this one.
But everything still stretches when played in fullscreen.
On the FlowPlayer forums I found a suggested solution (to configure the "fit" value for the clip's scaling parameter) but I am not sure where and how to implement it in the gallery source code.

I really need help with these issues...

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sun, 2010-05-16 07:39
Quote:
- I can only upload .FLV and .MP4 files - I'd like to be able to upload other filetypes too instead of re-encoding everything

That's not an ffmpeg limitation. That's a G3 limitation. Those are the only 2 supported video formats at this time.

Quote:
- the uploaded movies were not showing video, so I had to use the workaround to manually set their size for each clip

With a properly working ffmpeg installation, you wouldn't need to do that.

Quote:
- all the clips have the default thumbnail - I'd like it to be automatically created from the clip contents

Again, with a properly working ffmpeg install, that wouldn't be the case.

If static, 3rd party binaries don't work, then I see 3 choices:

- Ask your host to install ffmpeg
- Find a new host
- Manually edit the dimensions and until a facility is put into place for adding custom thumbnails (no plans for this) you can manually create thumbnails and replace the necessary files under your /var/thumbs directory.

I'm assuming you're using the Video dimensions module to edit dimensions:
http://codex.gallery2.org/Gallery3:Modules:videodimensions
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Mon, 2010-05-17 03:39

Thanks for the response, nivekiam!
As for the 3 choices - I am with Globat - I spoke to them and they basically told me to help myself, which I tried but it seems the 2 FFMPEG versions I tried don't work for me, and I have no idea where to get other once that might do it right.
I am satisfied with Globat (acceptable price and good speed) but I could switch to another provider if there's a better offer (the annoying thing with Globat is that they charge a lot for sub-domains where others give you that for free).
So, for the moment it seems that I will have to set each video clip manually - it's not terrible as I mostly post pictures and I can handle the extra adjustments for the videos.

But my main problem still remains - what to do, where and how exactly to do it, so when I play videos in full screen they don't get stretched out horizontally?
I am not sure which source file of G3 to modify in order to specify the "fit" value for the clip's scaling parameter.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2010-05-17 04:00

Have you looked at this yet?
http://codex.gallery2.org/Gallery3:Modules:videodimensions

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Mon, 2010-05-17 05:25

Yes, I forgot to confirm that in my previous reply - that workaround was the only way for me to play the videos - otherwise I was only getting the audio...
That far I got - when I upload a file I edit it (its dimensions) and it plays fine in the player (in the original size) but looks stretched when played in full screen.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25948
Posted: Mon, 2010-05-17 14:17
Quote:
On the FlowPlayer forums I found a suggested solution (to configure the "fit" value for the clip's scaling parameter) but I am not sure where and how to implement it in the gallery source code.

If you can find more documentation for this fix other than the one supplied please create a ticket on the tracker and discrible your situation so it does not get lost in the forums.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25948
Posted: Wed, 2010-05-19 01:22

d1nn0,
Please provide a link to a small .flv file that has some exaggerated aspect ratio / noticeable distortion issue so I can test a fix.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Wed, 2010-05-19 02:44

Dave, thank you for trying to help me.
Here is a small .FLV file - it plays fine in normal player size but stretches in full screen mode.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25948
Posted: Wed, 2010-05-19 02:53

Is this the correct behavior you want?
http://www.langleycom.com/gallery3/index.php/barsandtone

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Wed, 2010-05-19 03:56

No, Dave - the .FLV file is with aspect ratio 4:3 and if played correctly on a widescreen monitor (aspect ratio 16:10) it should have 2 vertical black lines on each side.
And if another .FLV file has an aspect ratio of 16:9 it should get 2 horizontal black lines at the top an at the bottom when played on a "square" monitor (aspect ratio 4:3).
Or, to put it simple - if you have an HDTV and an HDTV cable box you would see the 1st described behavior when you switch on a SD channel (that's if you didn't set your TV to stretch the picture and people's head look like pumpkins).
Here is a demo - a "square" player shows a "square" clip and when played in full screen on a widescreen monitor it adds those 2 vertical black lines on each side.
And for the other case - try to play a widescreen video from Youtube full screen on a "square" monitor...

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 7887
Posted: Wed, 2010-05-19 04:13

its not quite 4:3
my tester reveals:
flvUrl = http://www.mediacollege.com/video-gallery/testclips/barsandtone.flv
Your Flash Version = WIN 10,0,45,2
canSeekToEnd = true
audiocodecid = 2
audiodelay = 0.038
audiodatarate = 96
videocodecid = 4
framerate = 10
videodatarate = 400
height = 288
width = 360
duration = 6

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

 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Wed, 2010-05-19 05:00

Yes, you are right - it is actually 5:4 which is even more "square" than 4:3 and there should be even thicker vertical bars on each side...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25948
Posted: Wed, 2010-05-19 06:17

can you show me an example of a FlowPlayer embedded player that havs the behavior. I tried to add the code your post suggests but I guess it does not work or I am doing it wrong.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Wed, 2010-05-19 06:32

Yes, Dave - in my first posting of this thread I mentioned the suggested solution and on that page there's a demo clip.
If you play this clip full screen on resolution 1680x1050 (aspect ratio 16:10) it almost fits to the screen (just a tiny horizontal bar is shown at the top.
If you play this same clip full screen on resolution 1024x768 (aspect ratio 4:3) the bar at the top becomes thicker and you also see a bar at the bottom.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25948
Posted: Sun, 2010-05-23 02:51

Replace the file below movieplayer.html.php
in modules/gallery/views

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

AttachmentSize
movieplayer.html_.php_.txt612 bytes
 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Mon, 2010-05-24 20:39

Dave, thank you for the reply and the efforts you put to help me with this issue.
I tested with the provided file but the situation got worse - now I can't play any video clip.
In the player area I get a black rectangle with the following error message (I masked my real website):

Quote:
202, The provider specified in this clip is not loaded,
Provider 'pseudostreaming' , clip: '[Clip]
'http://www.mywebsite.com/myphotos/var/albums/myalbum/barsandtone.flv?m=1273992796''

The player looks like it's buffering but it never starts playing the video clip.

 
d1nn0

Joined: 2010-05-16
Posts: 9
Posted: Tue, 2010-05-25 04:02

Dave,
After looking the contents of the file you provided I fixed it.
I went HERE and downloaded the missing plugin - now my clips play the way I wanted.
Thank you once again for your assistance!
Now I just need to find out how to make FFMPEG working properly, so it can generate the video clip thumbnails automatically.
Also, figure out how to make my gallery fully bilingual (both navigation text and photo/clip titles/descriptions).

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25948
Posted: Tue, 2010-05-25 05:05

All I changed was

      clip: {
      scaling: 'fit'
    },

So there must have been something else you have done......Glad you got is working anyway.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team