Embedded Video Improvement
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
if you get gallery2 (current svn/2.2), upload some flvs and then install/activate flashvideo, it will work for those. flv's uploaded on 2.1.x or older don't get used (G2 only knows them as GalleryUnknownItem). |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
How cool am I? See it in action here. If anyone is interested, or if we want to update the exsisting player let me know. Also, ffmpeg does work with the older sorenson spark codec on windows, so for now I will just have to encode my gallery items with that. I do get an error in thumbnail manager while trying to change the default thumb though: Quote:
Fatal error: Call to undefined function: getrenderer() in d:\inetpub\wwwroot\wiseguys_setup\public_html\gallery2\modules\core\classes\GalleryTemplateAdapter.class on line 337 But I'm sure someone is already working on that. Mindless, -Wayne |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
nope, hadn't caught that yet.. now fixed, thanks. (and "module" is correct.. in G2 terminology modules and themes are all "plugins") |
|
Banta
Joined: 2006-04-18
Posts: 35 |
![]() |
Wayne, Love it! Can we just replace the player we have now with this one and it will work? or is there something that needs to be coded for it to function? Post it ! I want to try. The files I encode using ffmpeg, as describes earlier in this thread, produce thumbnails when uploading them to Gallery. Also, you can add code to tell which frame you want. For instance, I have mine set to 35, so, everytime I upload a movie, it makes the thumbnail from frame 35. It is not an all around sollution but, it is better than a blank that I got most of the time from frame 1. If anyone is interested, let me know and I'll find the code that does that. Good job ! __________ |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Here's the newest version. You need to replace the one you have, or rename it in the code: Quote:
$pw = "100%"; Notice I changed the cab version for flash to 8, my players use code that only works in v.8. But some of it does work in 7, so users should be able to at least view the movies. Linux users are not so lucky though still stuck at v.7 can only hope v.8 comes out soon for them. -Wayne |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Hey Banta, I just noticed I forgot to add the </div> after </object>. -W |
|
Banta
Joined: 2006-04-18
Posts: 35 |
![]() |
OK, The wat I was doing it was to add to the file GalleryAnimationItem.class code that started with..
But now the code you state to adjust above looks different and I am confused on where this is to go. What do I have to do and where should I put the new code. Sorry, I musta got lost, somewhere down the line. Thanks for your help..... Again! |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
This work has been integrated into Gallery. That means you should undo all local modifications you made (GalleryAnimationItem, etc) and update to current svn or nightly snapshot. If you want the full-screen change from above you can then apply it to modules/flashvideo/classes/FlashVideoRenderer.class. |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
Unfortunately, upgrading is out of the question if you are using an integration. Pretty please |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
why is upgrading out of the question? there are the usual risks of pre-release code, but I don't see why it wouldn't work with existing 2.1 integration modules. |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
I lost the use of the sidebar when I upgraded. |
|
Eka_Mei
Joined: 2006-01-03
Posts: 132 |
![]() |
spankee wrote:
I lost the use of the sidebar when I upgraded. Lost the use of side bar? What are you intergating? |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
It's integrated into Xoops. |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
I just upgraded to last nights nightly, and in IE i get a thumb, and firefox i get 'download movie'.... scanned the forums and not coming up with much help. can someone point me into the right direction? sure would love to use flvs. i dont have any other movie types already uploaded. Gallery version = 2.2-svn core 1.1.4 |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Here's the deal. Your movie has no dimensions. FFmpeg is supposed to handle movies with .mov,.wmv,.flv...... extensions, but on windows it does not opperate properly.(I have many ffmpeg builds to test) Although if your movie uses a codec that ffmpeg does not recognise, you will still get an unkown error. I'm in close contact with the ffmpeg boyz' and we are working to resolve this. I'm hoping to have a new build shortly. |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
sweet, thanks suprsidr, i will test that out asap. im sure it goes without saying but, remember to post a link for us all to get the new build. |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
ok. i did what you said, but my flv movie already had 480x360 as the movie dimensions. now what? |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
hmm, i am using url rewrite....?? |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
From what I see on your site, It looks like none of the necessary changes have been made. Did you update to 2.2-svn or the latest nighly? |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
Gallery version = 2.2-svn core 1.1.4............got last nights 'nightly build' off jesse's page....... flv WAS registered in my mime types. so i know i got somewhat of your progress. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
G2 shows the thumbnail when you don't have "view original" permission and you don't have "view resize" permission or there are no resizes (movies won't have any resizes..).. |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
ok under the mime type, viewable was off, i tried it on as well and didnt see any change in the thumbnail behavior. also, the thumb only shows in IE, firefox displays the download link. |
|
Banta
Joined: 2006-04-18
Posts: 35 |
![]() |
OK, I installed the nightly snapshot and everything is working nicely. I have a couple of questions. 1). Using thumbnail manager, should I be able to select the time offset of which I would like the thumbnail to be? Right now, I get ' Seconds (Max = 0.000) ' for my movie clips. Selecting an offset time produces this error... 'There was a problem processing your request.' 2). What is the trick to get this to work with existing uploads in the Gallery? For instance, I have 20 movie clips. Upon installing the new Snapshot, the clips only had a 'Download' link. When I add a new clip or, delete and re-upload an old clip, it works as expected. I though I read that it can be done, but, it perhaps I was mistaken. suprsidr |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Doomdead, Banta, -Wayne |
|
Banta
Joined: 2006-04-18
Posts: 35 |
![]() |
OK, Thanks. To get around the first frame as thumbnail issue, I modify the file \modules\ffmpeg\classes\FfmpegToolkit.class find the code.. case 'convert-to-image/jpeg': $args = array('-f', 'mjpeg', '-t', '0.001', '-y', $tmpFilename); if (isset($context['ffmpeg.offset'])) { array_unshift($args, '-ss', $context['ffmpeg.offset']); unset($context['ffmpeg.offset']); } and chage it to... case 'convert-to-image/jpeg': $args = array('-f', 'mjpeg', '-t', '0.001', '-y', $tmpFilename); if (isset($context['ffmpeg.offset'])) { array_unshift($args, '-ss', $context['ffmpeg.offset']); unset($context['ffmpeg.offset']); }else { array_unshift($args, '-ss', '26.5'); } This will create a thumb approx. 26 seconds into the movie upon initial upload. Change the number to whatever is appropriate HTH |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
I am using 2.1 and when you play short clips of say 4 seconds the gallery2 animation does not stop until the video ends. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
The player buffers 10 seconds of the movie before playing. So it starts playing as soon as the buffer is full, in your case never. -s |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
have it play at 10 seconds or if buffer length => movie length.... |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
I have also noticed in Firefox the status bar continues to show "transferring data from..." I have a lot of .flv's transcoded from .mov that are real short from a digital camera. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Spankee, try this one, and let me know if it works, I have no small clips to test with. Quote:
if(obj.code == "Play") { Hope this does the trick oh yeah, as long as there are listeners active, ff shows data activity. -s |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
No, that did not work. It still shows through the whole clip. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Spankee, if its not too personal, could you post one of your short clips for me to test with. -s |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
I did not have a short one available, but I was able to create one. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
See if this does the trick for you. Its hard to tell as my server is on my lan, and everything loads instantly. -s |
|
spankee
Joined: 2004-06-12
Posts: 51 |
![]() |
It seems to working for me--large and short clips. Thanks |
|
unknownserv
Joined: 2006-05-27
Posts: 1 |
![]() |
Where can I download this entire module? |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Its available in the nightly snapshots, or svn. But it will not work with 2.1 or lesser. You would have to upgrade to the latest core(which is not considered a stable release). |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Thought those that are following this thread may be interested in the MP3Audio module for inline play of mp3s. -s |
|
rl
Joined: 2006-06-05
Posts: 11 |
![]() |
This post is in regards to adding video/x-flv mime type support to G2. I tried all this up until this point and I got some sort of version error. When I bumped the version number I went from 1.1.0.1 to 1.1.0.2. One of the errors I got was related to the fact that there was no case statement for 1.1.0.1. I backed out the changes and I guess I will wait for native suppport in some future release. Thanks for all your efforts getting this to work. I just had trouble with the version that I have. Rich |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
just get a current nightly snapshot.. you don't need any of the patches/code listed in this topic anymore. |
|
rl
Joined: 2006-06-05
Posts: 11 |
![]() |
I got the latest G2 cvs release (dated 6-5-2006) and upgraded. It must be pilot error because when I upload a .flv file, I am not able to view it. I just have the save or open with option when I click on the hypertext. I have a mime type of video/x-flv enabled. Any other thoughts as to why I cannot view the flv file? Thanks. Rich |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Your flv probably has no dimensions, navigate to your flv in gallery -> edite movie -> give it some dimensions ->save. If you used the On2 codec to create your flv, ffmpeg does not know how to read it, or maybe you don't have ffmpeg installed/configured. Have fun with Gallery |
|
Banta
Joined: 2006-04-18
Posts: 35 |
![]() |
I'm curious why we cannot play FLV's encoded using On2's encoder? I tried but, I too get the results described by rl. FLV's encoded with other methods work fine. Thanks in advance for any explaination you might be able to offer. Banta |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
You can play em, but ffmpeg does not support that codec yet, so it cannot detect size, durration and dimensions so no thumbnail either. -s |
|
rl
Joined: 2006-06-05
Posts: 11 |
![]() |
For some reason my configuration must be different. When I "edit" the uloaded flv file, I am not provided an option to change "dimensions" of the file. I do not have ffmpeg. I host with siteground.com (very reasonable, but no ffmpeg or shell access). Is it possible that it could be the file. Does anyone have an .flv file that I could try to see if that is it? Thanks for the support. Rich |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Try this one here. |
|
doomdead
Joined: 2003-04-06
Posts: 174 |
![]() |
Just FYI, for whatever its worth, I encoded numerous files using Riva FLV Encoder, and uploaded them. (earlier i was having problems because no one told me there was an FLV module to activate, and i couldnt see my plugins page due to some error, once activated flv files played fine). However, the dimensions were in gallery, I did not put them there. Riva uses ffmpeg. |
|
Morbus Iff
Joined: 2006-06-09
Posts: 6 |
![]() |
suprsidr: I was wondering if I could request a feature. I collect videos, and have a veritable smorgasbord of different video formats (divx, xvid, mpeg, avi, quicktime, flv, etc.). I was wondering if, now that we have a Flash player in svn, if there was some way we could hook that into streaming any sort of video via native conversion to FLV. The featureset in my head: * Original video is untouched and still available for direct download. To some degree, I want something like Google Video - all their videos are streamed as Flash, but you have the ability to download the original source (which is an mpeg file). If this is a healthy amount of time, I'd be willing to support development financially. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
We actually discussed this earlier in this thread. You could however schedule a watch folder for conversion with cron/scheduler although some kind of auto-upload would have to take place. It is something I've been thinking about though. I recently saw this tool, which looks promising. -s |
|
Morbus Iff
Joined: 2006-06-09
Posts: 6 |
![]() |
Yeah, processing on my end doesn't really help me out. I need to continue to offer the original format of the video (the "original source") as well as a "viewable online" version. It's easy for me to convert to FLV here using FFMPEG, but uploading into Gallery loses the "original source" entirely, and just isn't ideal for me. The croning, I guess, would be interesting (though, I'd still have to hunt down the perfect command line for a number of various formats - any tips for that?), but it's still the same problem as doing it locally: the FLV should be a viewable format, but the "real" media should remain downloadable. Perhaps the FLV streamer needs some sort of logic to associate the streaming version with the original source file. Something like "if $sourcefile exists and $sourcefile.flv exists { show flash player with flv video, but keep everything else the same } else { show $sourcefile as normal }". I'd be willing to settle for something like that. (Though, to be truly useful, I'd still need some sort of automatable conversion, be it through cron, locally, or what have you). |
|