News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Thumbnails for home movies

Started by kyfalcon, December 30, 2011, 10:41:42 PM

Previous topic - Next topic

kyfalcon

What is the best way to create thumbnails for home movies? 00012.m2ts gives me no idea what I'm about to watch and I now have hundreds of these finally working.

Thanks,
Kevin

Marie.O

Watch the movie, and click snapshot.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

kyfalcon

Posde I watched the movie and clicked thumbnail answered the question, did regen/reload but nothing. My movies are m2ts files, is this going to be an issue?

tschak909

Any time you click the thumbnail button on orbiter, it will take a snapshot of what is currently playing, and the result is instantly passed into the media database, the moment you press one of the items in the datagrid.

-Thom

kyfalcon

Thom that worked for my avi files but not my .m2ts files. Is there another way to do this for those?

tschak909

hm looks like Get Video Frame needs to be implemented for MPlayer_Player. Perhaps a call to scrot could handle this? (I do this in Game Player and MythTV Player).

-Thom

Marie.O

#6
kyfalcon,

if you want to be able to use MPlayer to create these snapshots as well, feel free to open a trac ticket feature request. Thanks.

EDIT: Make it a bug. Get Videoframe is implemented in MPlayer_Player, so it must be a bug, why it does not work.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

kyfalcon

#7
Created a ticket. Noticed in MPlayer log that the call to screenshot times out and is aborted.

05   01/02/12 16:08:44.567      MPlayer_Player::Log MPlayerEngine::GetScreenshot - timeout waiting for screenshot maker, aborting <0xb6dcab70>

l3mce

I think it might have something to do with converting the grab to a jpg.

I have no idea what I am doing, just looking around.
I never quit... I just ping out.

tschak909

A quick fix would be to call scrot, to make the screenshot. Example code for this is in src/MythTV_Player/MythTV_Player.cpp .. ::CMD_Get_Video_Frame().

-Thom

l3mce

I will take a stab at this.

Starting to make sense... need to start dealing in real code anyway. I know this is simple, but it will take me a little while. I need to look up the things I do not think I understand... and some I do. Got to start somewhere. Here I have a working example, so I just need to create similar sizing variables being called under PLUTO_SAFETY_LOCK.
I never quit... I just ping out.

Marie.O

Quote from: tschak909 on January 03, 2012, 02:24:57 AM
A quick fix would be to call scrot, to make the screenshot. Example code for this is in src/MythTV_Player/MythTV_Player.cpp .. ::CMD_Get_Video_Frame().

why should one use scrot, when the snapshot facility is already implented in Mplayer_player?
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

tschak909

Because I am not sure with niz's changes that there is a screenshot command in the engine that he wrote.

-Thom

l3mce

I can tell you that Xine_Player has its own
JpegEncoderDecoder.cpp/h and MPlayerPlayer does not.

If you will tell me how you want it done, it feels like a great place to start for me... esp as it involves X params. I can try and implement the same practices used by Xine_Player.
I never quit... I just ping out.

tschak909

in the end, Get Video Frame expects two output parameters, the string containing the thumbnail to send to the caller, and an integer specifying the format.

In the case of Xine Player, xine-lib is linked, and the xine-lib API has facilities to take a picture of the displayed surface, and return it.

I merely suggested scrot because you can run scrot, it writes a file of the exact size specified by the width and height parameters, and you can use PlutoUtils::ReadFileIntoBuffer to send the resulting file to a buffer, for which a pointer can be returned.

-Thom