video fails to stream from gallery

l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Thu, 2009-09-17 21:59

I have a .mp4 video that I would like to put in my gallery (v2.3). When I put this video into my WWW directory and access it directly from there it streams fine (playing begins almost instantly). When I add it to my gallery and access it from there, the client downloads the entire movie file before playing begins. Renaming the file to a .flv does not solve the problem. Does anyone have any suggestions for a workaround? Thanks.

My system details:
Gallery URL = http://torcanonet.stanford.edu/gallery2/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.10-2ubuntu4 apache2handler
Webserver = Apache/2.2.12 (Ubuntu)
Database = mysqli 5.1.37-1ubuntu4, lock.system=flock
Toolkits = ArchiveUpload, Dcraw, Exif, Ffmpeg, Getid3, ImageMagick, jpegtran, LinkItemToolkit, Thumbnail, Gd, SquareThumb
Acceleration = none, none
Operating system = Linux torcanonet.stanford.edu 2.6.31-10-generic #34-Ubuntu SMP Wed Sep 16 01:09:15 UTC 2009 x86_64
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.212.0 Safari/532.0
Rows in GalleryAccessMap table = 8
Rows in GalleryAccessSubscriberMap table = 388
Rows in GalleryUser table = 3
Rows in GalleryItem table = 386
Rows in GalleryAlbumItem table = 5
Rows in GalleryCacheMap table = 0

phpinfo.php link: http://torcanonet.stanford.edu/phpinfo.php

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-09-18 00:22
 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Fri, 2009-09-18 00:42
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-09-18 01:19

Actually neither play for me. Quicktime pro tries, but does not actually play.

You can try adding the mp4 extension to the video/x-flv mimetype in gallery'2 mime maintenance module.
The flash video module should take over the handling of mp4's

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

 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Fri, 2009-09-18 01:50
suprsidr wrote:
Actually neither play for me. Quicktime pro tries, but does not actually play.

You can try adding the mp4 extension to the video/x-flv mimetype in gallery'2 mime maintenance module.
The flash video module should take over the handling of mp4's

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

strange they're not playing for you. i have tested on 3 different browsers (IE8, chrome, firefox), 2 operating systems (win7, ubuntu) and a few media players (Windows media player 12, quicktime and VLC) they all play and agree with my above conclusions.

i assume the mimetype change you suggest is exactly equivalent to me renaming the file to .flv because it gives the same exact result, download before play, not during.

if you have a minute, can you please repeat the test with the following link? These are the same scenario as above except with the file renamed to .flv I hope this will allow you to at least see what I'm seeing.

full download before play:
http://torcanonet.stanford.edu/gallery2/v/streamTest/2009-09-06at11_11_24.flv.html

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-09-18 02:49

75MB for 27 seconds of video?
Certainly not a very web friendly data rate.

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

 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Fri, 2009-09-18 02:55

yeah, yeah, i know. i'm testing with such a large file so that i can actually tell when it's streaming or downlaod --> play (fast transfers between local machines makes small files look the same either way). regardless of the file size, it should be able to stream.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-09-18 03:04

yeah, yeah, streaming is not streaming without an actual streaming server.

video from an http server are progressive download.

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

 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Fri, 2009-09-18 03:18

i'm missing something important then.
Case A: .mp4 file sits in my WWW directory and streams out correctly (example: http://torcanonet.stanford.edu/2009-09-06at11_11_24_transcode.mp4)

Case B: .mp4 file is in my Gallery and is download-->play (example: http://torcanonet.stanford.edu/gallery2/v/streamTest/2009-09-06at11_11_24_transcode.mp4.html)

case A and B are both running on the same Linux server, doesn't case A prove that this is a streaming capable server?
by the way, these two examples are with a more web friendly 7-8 mb example.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-09-18 03:48
 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Fri, 2009-09-18 03:52

so, at a very high level, I guess what's going on here, is that when my video is inside the Gallery, my (apache2) server is somehow serving it up differently (read incorrectly) from the way it does outside the Gallery. i'm looking for a way around that so that streaming from within Gallery works properly. ideally, this would be a configuration change or a plugin install or something, but i'm also open to re-encoding my videos to a different format if need be so that they can stream out of Gallery. i've seen this funnycats example: http://www.nei.ch/gallery/v/diverses/funny_cats_1.wmv.html and that seems to work well. i'm going to try some videos in MS formats to see if i can emulate that. however, i can see no reason why what i'm using now (x264 video, AAC audio inside an .mp4) should not stream properly.

 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Fri, 2009-09-18 04:10
suprsidr wrote:
if you paste your video's url(http://torcanonet.stanford.edu/gallery2/d/2232-1/2009-09-06at11_11_24_transcode.mp4) into my flv tester it plays immediately.

still progressive download though.
[/url]

that is neat, i guess it plays immediately because that tester is on a fast connection.
what's more interesting is pasting my original examples into your flv tester
http://torcanonet.stanford.edu/2009-09-06at11_11_24.mp4 and http://torcanonet.stanford.edu/gallery2/d/1804-1/2009-09-06at11_11_24.mp4

they both take about 9 seconds to begin to play, not too shabby for transferring a 75.5MB file

so do you have any idea what is preventing my .mp4 from streaming from inside Gallery?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-09-18 04:18

Playing from within the flashvideo module we buffer I believe 10 seconds before playing. but flash is your best bet for cross platform compatibility.
the best throughput I got from your server was ~90KB/s pretty shabby for Stanford.

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

 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Fri, 2009-09-18 04:51

*gets out his stopwatch*
pasting into your flv tester
a 75.5 MB mp4 file begins to play in ~8.8 seconds
a 241.2 MB mp4 file begins to play in ~26.1 seconds

the time to start playing seems to be roughly linearly dependent on the size of the file.
i think this is completely beside the point here, we're not trying to figure out how your flv tester works

you suggest that i use flash, is that not equivalent to renaming to .flv? I can't get .flv files to stream from gallery either (example: http://torcanonet.stanford.edu/gallery2/v/streamTest/2009-09-06at11_11_24.flv.html)

 
l3iggs

Joined: 2009-09-15
Posts: 11
Posted: Sun, 2009-09-20 21:09

so it seems to be the case that it is not possible to stream videos from Gallery. can anyone confirm that?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Sun, 2009-09-20 21:59
 
designerbr

Joined: 2009-09-28
Posts: 4
Posted: Sat, 2009-11-07 01:24

Hey guys,

So converting to SWF file is the best thing I've found. *.mp4's just aren't the way to go here. You can always provide a link to the "full downloadable version for clients", but use your *.swf file as a preview.

Are there any recommendations on extremely simple players so my users can control playback and audio?