Autoplay Videos

Amarok 1.x Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on git.opendesktop.org

0
Score 50%
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

prol

11 years ago

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

Report

C

camico

11 years ago

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

Report

the7erm

11 years ago

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 ...

Report

C

camico

11 years ago

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

Report

the7erm

11 years ago

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.

Report

Contrast

11 years ago

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.

Report

C

camico

11 years ago

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.

Report

eeproms

11 years ago

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

Report

C

camico

11 years ago

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."

Report

File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
1
updated Jan 02 2008
added Jan 01 2008
downloads today
0
page views today 1
System Tags addon