Home
Welcome, Guest
Please Login or Register.    Lost Password?
Please take a couple of minutes to search previous discussions and documentation for solutions before starting new threads.

Controling the number of keyframes used
(1 viewing) (1) Guest
Go to bottomPage: 123456789
TOPIC: Controling the number of keyframes used
#22362
Controling the number of keyframes used 8 Months ago Karma: 2
First of all, thank you for releasing such fantastic software, it is a joy to work with and very well documented!

I am in the process of building a video site that will allow pseudostreaming of videos from hwdVideoShare using the H264 Streaming Module. This is working well and I can skip to any part of video but it is not precise enough for hwdVideoShare converted videos and can actually start playing upto 12 seconds from the time selected. This seems to be because of the -keyint_min 25 parameter is used which is great for optimisation but not so good for precision seeking.

I have found the parameter is used in both passes in converters__ConvertVideo.php and I have tried various things but cant get it to create a keyframe every second. I have tried -keyint 25 which breaks mencoder and -lavcopts keyint=25 which converts and produces a smaller file(?), but doesn't seems to effect the accuracy of seeking.

I am currently working on the Flow Player plugin to add an option to include the Streaming Plugin in the player output. I would be happy to share my work back to the project.

Any help on my keyframe issue would be greatly appreciated!

Many thanks in advance,

Joe
jap
Joomla web developer
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Gender: Male SoftForge Location: London Birthday: 03/31
The topic has been locked.
 
#22462
Re:Controling the number of keyframes used 8 Months ago Karma: 189
First of all, thank you for releasing such fantastic software, it is a joy to work with and very well documented!Thank you.

I didn't reply immediately to your thread because I wanted to have a bit of a test with the issues you have raised, but I have not have time towards the end of the week. Therefore, I will look into the keyframe parameters as early as possible next week and let you know what I find (I'm afraid I can't help you with this from the top of my head)...

I am currently working on the Flow Player plugin to add an option to include the Streaming Plugin in the player output. I would be happy to share my work back to the project.That would be fantastic!
Davros
Administrator
Posts: 13078
graph
User Online Now Click here to see the profile of this user
If you like hwdVideoShare please consider rating it in the Joomla Extensions Directory
The topic has been locked.
 
#22510
Re:Controling the number of keyframes used 8 Months ago Karma: 2
Hi Davros,

Thank you for your reply. I appreciate that this is not going to be the most common request but any help will be greatly welcome. I have spent some time reading through the documentation but I don't have much experience with MENCODER so cant work out how to force more keyframes. The ultimate result would be a new parameter in hwdVideoShare Conversions Settings that gives you the option to set -keyint (the default is 250) as that would remove the need to re-hack after every upgrade.

I will focus my efforts on further developing the flowplayer plugin to allow the include of its plugins. I'll let you know how it goes...
jap
Joomla web developer
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Gender: Male SoftForge Location: London Birthday: 03/31
The topic has been locked.
 
#22542
Re:Controling the number of keyframes used 8 Months ago Karma: 2
OK, I've have made some progress with the plugin! I have upgraded Flowplayer to the latest version (3.1.5) and included the latest Pseudostreaming and RTMP plugins. There is now a new parameter in the plugin called "Streaming" which allows you to choose Progressive, Pseudostreaming or RTMP. If Pseudostreaming or RTMP is selected, the plugin now outputs the code to include the relevant Flowplayer plugin and seeking works perfectly with the direct URL to the video!

However, hwdVideoShare doesn't provide the direct URL to the player, it passes it through generateAntileechExpiration($fid, $media, $deliver) to mask the URL, which is a great idea, but breaks the seeking ability. So for the moment, I have had to test it by hardcoding the URLs into the plugin.

For pseudostreaming, a start parameter is added to the video URL and you magically start downloading it from that point. An example would be:

http://www.domain.com/hwdvideos/uploads/hr7ubdkmpww2to.mp4?start=10


But hwdVideoShare redirects using header('Location: '.$url) through a URL like this:

http://www.domain.com/index.php?option=com_hwdvideoshare&task=downloadfile&file=28&evp=02e0eb60805ab8da0dcb851cbbc6553d&media=local&deliver=player&tmpl=component


I have tried adding the start parameter to the URL and pulling it all the way through the process but it seems to get stripped out somewhere. The video does play and the seek bar lets you jump to any point, but the video always starts from the beginning.

When using the RTMP streaming plugin, the player wants a URL like this one from the Flowplayer demo:

rtmp://cyzy7r959.rtmphost.com/flowplayer/metacafe


Not surprisingly, header('Location: '.$url) doesn't work at all for RTMP and the player gives the following error:

300: Player initialization failed: TypeError: Error #1009


The simplest solution to this problem would be not to mask the URLs and then everything should work with my modified plugin. Is there an easy way to do this?

It would be nice to keep the Antileech feature so how hard to you think it would be to pull the start parameter through? Is it worth me pursuing this possible solution? As for the RTMP server, I'm not sure where to start.

I'm happy to post my modified Flowplayer plugin here, or send it to you. It might help you test any possible solutions.

Any other suggestions you have would be greatly appreciated!

Many thanks.
jap
Joomla web developer
Senior Boarder
Posts: 62
graphgraph
User Offline Click here to see the profile of this user
Gender: Male SoftForge Location: London Birthday: 03/31
The topic has been locked.
 
#22649
Re:Controling the number of keyframes used 7 Months, 4 Weeks ago Karma: 189
For pseudostreaming, a start parameter is added to the video URL and you magically start downloading it from that point.Nice.

The simplest solution to this problem would be not to mask the URLs and then everything should work with my modified plugin. Is there an easy way to do this?In terms of a long term solution... how about an option to enable/disable the anti-leech system?

It would be nice to keep the Antileech feature so how hard to you think it would be to pull the start parameter through? Is it worth me pursuing this possible solution?Just to clarify, all the features work correctly except the start parameter, which is removed...

Open the file here:
<JoomlaRoot>/components/com_hwdvideoshare/hwdvideoshare.class.php

Around line 2556 you will see the function called generateVideoPlayer(). This function generates the video player code and prepares the URL of the video file:
$dlink = hwd_vs_tools::generateAntileechExpiration($row->id, $row->video_type, 'player');


Around line 2958 you will see the function generateAntileechExpiration(). This function actually generates the URL of the video file. You could tag your start parameter on here....

Then open this file:
<JoomlaRoot>/components/com_hwdvideoshare/models/core.php

Around line 599 you will see the function downloadFile(). This function processes the video file URL and redirects to the real file...

You will need to grab your start parameter:
$start = JRequest::getCmd( 'start', 0 );


You can then (after line 690) tag that onto the end of the real URL:
$url = $url.'?'.$start


Does that make sense?
Davros
Administrator
Posts: 13078
graph
User Online Now Click here to see the profile of this user
If you like hwdVideoShare please consider rating it in the Joomla Extensions Directory
The topic has been locked.
 
Go to topPage: 123456789
get the latest posts directly to your desktop

Copyright © 2007-2010 Highwood Design | Your Details | Terms of Use | About