Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Linux, Mac OS X, & Co
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th September 2009, 16:09   #1  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Crop Preview PyGtk App

Don't know if it will very useful to anyone but me... but i cobbled up a very simple PyGtk App to help me with cropping, that let's you change the crop values "on the fly". Apart from the python libraries the app only needs mplayer.




Installing:
Just unzip the contents of croppreview.zip;
Give "croppreview.py" execution permission either by using your file manager or by typing in the console "chmod +x croppreview.py";
Type in the terminal ./croppreview.py or just double click on the croppreview.py file

Notes:
I'm not a python programmer, so don't expect much;
There's no seeking;
Pause/Play sometimes fails;
Did i mention that i cobbled up the app ?;
If you give it a file mplayer can't open the app borks;
This is my first python app, so once again don't expect much.


http://rapidshare.com/files/27787547...eview.zip.html

EDIT: Made a few changes, nothing major, just some tweaks. To install and run, unzip pycrop.zip and run the bash script (pycrop.sh).
And i think i'll leave it like this. Can't really think of any features to add... and to really perfect the app i suspect another approach would have to be used.
Attached Files
File Type: zip pycrop.zip (9.3 KB, 16 views)

Last edited by Major_Kong; 21st October 2009 at 00:54.
Major_Kong is offline   Reply With Quote
Old 10th September 2009, 10:04   #2  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
You can already preview crop area with mplayer itself, if you use -vf rectangle with the crop values. How is this different?
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 10th September 2009, 13:14   #3  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Quote:
Originally Posted by froggy1 View Post
You can already preview crop area with mplayer itself, if you use -vf rectangle with the crop values. How is this different?
There's a way to change crop values while just running mplayer ?
Major_Kong is offline   Reply With Quote
Old 10th September 2009, 13:20   #4  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
Quote:
Originally Posted by Major_Kong View Post
There's a way to change crop values while just running mplayer ?
Not afaik, but from your description I gathered it just displays the crop area and that's all which is really the same as running mplayer with rectangle

(though in a bash script it can be done with a while loop, though this is not changing crop values while mplayer runs but asking for new ones and previewing and doing so until satisfied)
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 10th September 2009, 13:50   #5  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Quote:
Originally Posted by froggy1 View Post
Not afaik, but from your description I gathered it just displays the crop area and that's all which is really the same as running mplayer with rectangle

(though in a bash script it can be done with a while loop, though this is not changing crop values while mplayer runs but asking for new ones and previewing and doing so until satisfied)
Hmm... i'll add some more notes to the description.

(it can also be done in a more 'elegant' fashion by using mplayer's -input file=<filename> switch and a pipe, which is what the app relies on, but that's not 'just running mplayer')

Last edited by Major_Kong; 10th September 2009 at 14:44.
Major_Kong is offline   Reply With Quote
Old 13th September 2009, 15:54   #6  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Any feedback ?
Major_Kong is offline   Reply With Quote
Old 13th September 2009, 16:09   #7  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
not very useful to me personally, but for others it may be

Note; this is not to discourage you or something
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 13th September 2009, 21:11   #8  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Don't worry, i'm not deluded to the point of thinking that something i cobbled up in a hurry, would make a script guy (or a large number of people for that matter) use a crop previewing gui.

But did you try the app ?
Major_Kong is offline   Reply With Quote
Old 14th September 2009, 12:22   #9  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 1,844
Yes I did but like I said, not very useful for me
__________________
ffx264 || ffhevc || ffxvid || microenc
microchip8 is offline   Reply With Quote
Old 15th September 2009, 21:52   #10  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
On a related note, you may have noticed that when adjusting the size of the rectangle the video will unpause and pause again. This is the mplayer behaviour when opening it with -slave -idle and -input filename=<PIPE> and sending thru the pipe first a pause command and then a change rectangle size command, is there a way to make mplayer keep the video paused ?
Major_Kong is offline   Reply With Quote
Old 25th September 2009, 22:35   #11  |  Link
Major_Kong
Registered User
 
Major_Kong's Avatar
 
Join Date: Jun 2007
Location: Earth
Posts: 51
Quote:
Originally Posted by Major_Kong View Post
On a related note, you may have noticed that when adjusting the size of the rectangle the video will unpause and pause again. This is the mplayer behaviour when opening it with -slave -idle and -input filename=<PIPE> and sending thru the pipe first a pause command and then a change rectangle size command, is there a way to make mplayer keep the video paused ?
Couldn't find any mplayer command or setting to solve this problem, so i'll leave it like this.


PS: Made a few changes to the app, just some tweaks mostly.

Last edited by Major_Kong; 25th September 2009 at 22:40.
Major_Kong is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.