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
It doesnt work for me. Amarok doesnt load video files into the playlist.Pls help
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
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 ...
oh thanks (and sorry ;) what was your approach then?
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.
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.
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.
Considering Amarok 2.0 is around the corner and should have video support thanks to phonon this will be a short lived hack.
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."