Autoplay Videos

Amarok 1.x Scripts

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Description:
This script automatically starts a video player when a video file is played in Amarok.

Details:
Videos are detected by the file extension. For streamed videos, Amarok is paused to avoid double bandwidth use. For local videos, Amarok is also paused, but playback is restarted after 5 seconds with volume set to zero. This way the play is simulated in Amarok to allow scoring (and, for taggable video formats like asf, mkv or mp4, scrobbling...yes, you can add music videos to your collection). Unfortunately it is still not possible to control the video from Amarok, but hey, Amarok is not a video player
When another file is played, the external player will be killed and the volume restored.

By default the script uses mplayer (You have to edit the script to choose another player). To achieve the impression that the video is played in the context browser, you can use kwin's special window settings (enable "No Border" and "Keep Above"... "Remember position" doesn't seem to work...but you can enter a line like "geometry=WxH+x+y" in ~/.mplayer/config).

Also this script only works with files supported by the engine used in Amarok (ironically)...But with xine this should be almost anything.

_____ LATEST CHANGES _____
! the volume got wrongly reset when changed during playback
+ added README

Ratings & Comments

9 Comments

prol

It doesnt work for me. Amarok doesnt load video files into the playlist.Pls help

camico

you are right, m4v files can't be loaded, but that is a limitation in amarok or the xine-engine...the only solution i can think of currently is to rename the file, for example to .mp4 or .mpg

the7erm

I just got done working a script that was almost exactly like this, but you had a better way of approaching it. Good job. I took mine down because I know a better product when I see it. I really should have checked the site before I started working on mine ...

camico

oh thanks (and sorry ;) what was your approach then?

the7erm

Pretty much the same as yours, but I didn't check to see if the track had changed, or set the volume ... Mine stopped the playing track, and then started playing. Yours was a better approach. You might want to consider processing the mplayer thread output and look for === paused === then pause amarok ... just an idea. I'd do it but I don't know ruby, but looking at your script I like the language. Thread{} looks like a really useful function.

Contrast

Nice idea. I'm wondering how feasible/practical it'd be to add functionality to this so that it would look in a user-defined directory for a video for every song played. The video files would obviously have to be properly named - something like "%artist - %title" - for this to work.

camico

you mean like a kind of visualization plugin? so whenever there is a video, pause the audio and take the video instead? yeah, why not, wouldn't be that difficult to do. maybe i'll include it some time. if anyone wants to help, please go ahead.

eeproms

Considering Amarok 2.0 is around the corner and should have video support thanks to phonon this will be a short lived hack.

camico

sure it is only a quick hack...but quoting a recent statement of the amarok founder: "No, 2.0 won't have video support. A later version might integrate rudimentary support for playing music videos and such, but this is not yet decided."

Pling
0 Affiliates
Details
license
version 1
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

More Amarok 1.x Scripts from camico:

conTEXT
camico
last update date: 12 years ago

Score 5.0

Other Amarok 1.x Scripts:

Gnome Play Video in Totem
mwheatland
last update date: 19 years ago

Score 5.0

editLyrics-gnome
ZeeD
last update date: 19 years ago

Score 5.0

amarok Alarm
aroth
last update date: 16 years ago

Score 5.0

amaroK Web Collection V xmms
pti-jean
last update date: 16 years ago

Score 5.0

SongLogger
lucatnt
last update date: 17 years ago

Score 5.0

amaroK Web Collection
pti-jean
last update date: 16 years ago

Score 5.0



System Tags