Active Topics

 



Notices


Reply
Thread Tools
briand's Avatar
Posts: 566 | Thanked: 145 times | Joined on Feb 2008 @ Tallahassee, FL
#181
hmm. makes me wonder where I went wrong.

I downloaded the script above, put it in /usr/bin, replacing the one I had there, ran chmod +x on it, and added the -x to the prefs in mytube. ...wouldn't download or play any video until I took the -x out of the myytube preferences...
__________________
N800 / OS2008
Now running Canola-free (by invitation) since 2215 UTC 21 May 2008.
 
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#182
Originally Posted by briand View Post
hmm. makes me wonder where I went wrong.

I downloaded the script above, put it in /usr/bin, replacing the one I had there, ran chmod +x on it, and added the -x to the prefs in mytube. ...wouldn't download or play any video until I took the -x out of the myytube preferences...
Try running mytube from a terminal and see if you get any error messages.
 
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#183
Oh and for my next trick.. auto crop and scale of widescreen clips. It's a hack, but once it's ready it should be a simple drop in.
 

The Following User Says Thank You to brontide For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#184
There you go again, brontide. Taking a perfectly good, working application...

...and making it better. Thanks.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#185
Ok, here is the deal with the hack...

auto crop and scale imposes a long ( 8 seconds if downloaded, longer for streaming ) the first time a video gets played. It's the best I can do without rewriting this app to handle the post processing.

There is no delays after it gets played the first time.
 
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#186
What imposes this delay?
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#187
Originally Posted by Bundyo View Post
What imposes this delay?
mplayer's cropdetect has to scan the video and spits out a stream of possible cropping suggestions. So I take and run mplayer on 1000 frames ( -benchmark -nosound so it goes full speed ) and then pick the proper crop for the video.

It's a one time penalty because I cache the results in a sqlite3 db for later retrieval.

I can probably get the time down for saved videos, but for streamed videos I'm not sure. I could also apply a new algorithm to try and deal with the edge cases with fewer frames. But for now that's the price of glorious full and widescreen mytube.
 

The Following User Says Thank You to brontide For This Useful Post:
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#188
Thinking about the problem... yes i have another algorithm that I can apply. It's pretty easy in fact to get the time down and still have fewer edge cases. The new alogrithm will only detect no crop or proper letterboxing ( roughly equal top and bottom ). I will have to rewrite the code, but I think it should detect properly with much fewer frames ( and fewer frames = less latency on first play ).

Last edited by brontide; 2008-09-09 at 15:33.
 
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#189
100 frames... yep, that's less than a second delay for saved, and probably 3 seconds streaming. There are still misses, but this actually hits better than the last one with 1/10th the frames.
 

The Following 2 Users Say Thank You to brontide For This Useful Post:
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#190
Of course, this leads me to think about using your cropdetect / aspect ratio algorithm in other situations...

For instance, I would love to see you work your magic with josiahg777's mplayer-opt script...
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:15.