ffplay-gtk 1.9

Audio editors, music players, video players, burning software, etc.
Message
Author
plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

ffplay-gtk 1.9

#1 Post by plinej »

Here's a simple gtkdialog app I wrote for basic control of ffplay. It requires xdotool to be installed (removed this dependency as of 0.4). Depending on how your version of ffmpeg is compiled, ffplay will play pretty much any video or audio you throw at it. The only thing it lacks is a good gui to control it.

If you are on a 64 bit system, I recommend installing the version of xdotool (or newer) that I posted below. Also, I recommend installing an updated ffmpeg for any new ffplay commands that may not work on older versions. I have a recent 64 bit version that you can find at:

https://archive.org/download/python3-gi ... -10-x86_64

The ffmpeg version that you can find at the link above is compiled against newer versions of the following: ladspa, libwebp, libcddb, libcdio, protobuf, cunit, flite, & flac. All of which can also be found at the supplied link.

0.2 - added an alternate way of getting the window id of specified pid via xdotool that may work better on older versions. Got rid of the refresh time option since I figured out how to make the timer auto refresh.

0.3 - updated the gui a bit, changed some buttons to menuitems to keep the gui small. Also added an option to edit metadata in fftag if you have that installed. Added a display for chapter names in video if applicable. Added metadata display.

0.4 - Removed the dependency for xdotool. If you are playing video and do have xdotool installed, you will see the full screen button otherwise you won't. You can always just mouse over the video window and hit the f key to toggle full screen if your version of ffplay supports that. The pause feature will close the video window and open a new window when pushed again picking up where you left off. If you have xdotool installed than the pause feature will work like normal and freeze the video. If you are playing audio, no window will open. Changed the timer to actually get the time data from ffplay instead of just counting the elapsed time. This way you can use the on screen commands like right clicking on the video window to change the play position and the timer will reflect the correct time.

0.4a - accidentally deleted some of the xdotool code in 0.4 so the extra features weren't working properly. Put that code back in. Also cleaned up the temp file code.

0.5 - if playing audio and cover art is available it will be displayed at 150x150. Added a file selector button and a list of same file type in directory to play next. Also, next file of same type will automatically start to play when current file ends. Fixed a couple of potential bugs.

0.6 - fixed bug when user pauses video on screen and then uses the gui to resume play
moved select new file button to the options menu drop down
added previous and next file buttons
added a slider to navigate file by percentage
added ability to read a playlist with absolute paths

0.6a - bugfix

0.6b - bugfix

0.8 added the ability to play a mounted DVD, just select the VIDEO_TS folder to play. As long as you have xdotool installed you can pause and toggle full screen. This also requires that vobcopy is installed. You will be able to select the title you would like to play as well as the audio stream and subtitles.

0.8b added French translation and fixed a line that wasn't gettext'd

0.9 added more options that you will see if xdotool is installed.
Added the ability to choose the stream you want to play in case your video file has more than 1 of the following: video stream, audio stream, subtitle stream.

1.0 added the ability to choose different audio outputs

1.1 added the ability to playback video de-interlaced

1.2 added more tool tips and improved the interface.

1.3 improved the interface some more

1.4 I've noticed that some times (very infrequently) while playing a video that the xdotool functions don't work. I can't seem to track down why xdotool would be using the incorrect process to control the window. I implemented a workaround that will allow the user to select the process id from a combo box entry. There may only be one process listed and if that is the case it should control the window but if not you can click the button next to the combo box and the processes will refresh and hopefully the correct process will then be listed. The combo box and button have tool tips that explain this.

1.5 cleaned up the code to not print a bunch of errors, moved some things around in the gui to even everything out, changed the 1.4 update code so you don't have to click the button when selecting the xdotool process to control...

1.6 Added a file attributes selection in the menu that displays the file attributes of the file that is playing. Fixed some bugs that would spawn multiple examples of ffplay and ffplay-gtk-timer.

1.7 Added scrolling artist and title metadata if number of characters exceeds 61. Fixed several bugs.

1.8 added image downloads from discogs if audio metadata for album and artist is found on discogs and artwork not imbedded or found in directory.

1.9 Cleaned up and sped up some code. Change code so you can only click a button once per second since occasionally the buttons seem to get double clicked and that messes everything up.
Attachments
Screenshot_2020-04-24_19-36-14.png
(28.68 KiB) Downloaded 1162 times
ffplay-gtk_1.9.pet
(33.65 KiB) Downloaded 536 times
xdotool-git-2019-11-25-x86_64.pet
(40.11 KiB) Downloaded 263 times
Last edited by plinej on Mon 29 Jun 2020, 22:44, edited 45 times in total.
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#2 Post by MochiMoppel »

Tried in slacko 5.6.
1) filepicker works
2) ffplay window opens and plays file
3) gtkdialog gui opens but none of the ffplay shortcut buttons work
4) "update time" button works
5) "go to specific time" button works strange. Opens another instance of ffplay and both files play at the same time different portions of song.
6) "full screen toggle" button does not work. I don't expect it to work since shortcut 'f' does not work for me in ffplay. Even if everything would work, what would happen to the GUI? Hide behind fullscreen ffplay? How to toggle back?
7) Quit button closes GUI but not ffplay

This command:

Code: Select all

win=`xdotool search --pid $ffplay_pid`
produces error message

Code: Select all

Can't consume 1 args; are only 0 available. This is a bug.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#3 Post by plinej »

Everything is working fine for me in BionicPup64. What version of xdotool do you have installed?

#xdotool version

What is the output of the xdotool command if you manually enter the pid?

#xdotool search --pid "enter the actual pid number of your running ffplay here"

If the full screen toggle actually went over your dock bar then you would have to hit the 'f' key to toggle back to get to the gui. Usually it doesn't go over the dock for me but on occasion it does...
Last edited by plinej on Fri 29 Nov 2019, 12:48, edited 4 times in total.
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#4 Post by plinej »

delete
Last edited by plinej on Fri 29 Nov 2019, 12:39, edited 2 times in total.
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#5 Post by plinej »

Doing a quick internet search, I'd say your version of xdotool is causing the problem. If you can't use the 64 bit version I posted above, try checking out and compiling the latest version on github.

Code: Select all

git clone https://github.com/jordansissel/xdotool.git xdotool
Last edited by plinej on Fri 29 Nov 2019, 12:48, edited 1 time in total.
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#6 Post by plinej »

delete
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#7 Post by MochiMoppel »

plinej wrote:What version of xdotool do you have installed?
2.20110530.1
What is the output of the xdotool command if you manually enter the pid?
Can't consume 1 args; are only 0 available. This is a bug.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#8 Post by plinej »

You can see the xdotool bug here:

https://github.com/jordansissel/xdotool/issues/14

Update to the latest version if possible. Otherwise there is a possible workaround posted in that link with the --name option. I may be able to implement that but am heading out the door in a bit for the weekend. If you do figure it out, post your fix and I will update the code.
Last edited by plinej on Fri 29 Nov 2019, 13:25, edited 2 times in total.
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#9 Post by plinej »

delete
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#10 Post by plinej »

uploaded 0.1a which will give more intuitive error messages when xdotool does not operate correctly. I'll be back in a couple of days to see if we can make it work with an old version of xdotool.
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#11 Post by plinej »

updated to 0.2
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#12 Post by plinej »

updated to 0.3
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#13 Post by jamesbond »

Nice work. Thanks.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#14 Post by plinej »

updated to 0.4
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#15 Post by plinej »

delete
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#16 Post by plinej »

0.4a - small bug fix and code clean up release. I have some more ideas to implement in the near future so will be working on those soon.
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#17 Post by plinej »

0.5 is now up
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#18 Post by plinej »

0.6 is up
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#19 Post by plinej »

0.6a - bugfix release
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#20 Post by plinej »

0.6b bugfix release
You can also download many of my packages at:
[url]https://archive.org/download/python3-git-2019-10-10-x86_64[/url]

Post Reply