Jack Audio and Flash

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Jack Audio and Flash

Post by Aleks »

Hello! I've installed flashsupport-jack so that I can use YouTube and Guitarix/Rakarrack at the same time, and is working great. However, whenever I play YouTube without starting Jack, it automatically starts it, and when I stop Jack, the video freezes. Is it possible to make flash play both with and without Jack?
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Jack Audio and Flash

Post by Aleks »

Well, I guess I have a problem here and a help would be appreciated. For a while everything worked fine. But then I logged out from the 2D into 3D session (I'm running Ubuntu 12.04 Unity) and it all went down hill. First there was no sound at all. Then I reinstalled alsa pulseaudio and the sound came back, but the indicator-sound was missing. I installed it again, but it's not functional! It's all grayed out, and I can't adjust neither output or input volume, nor I can set the input from line in to mic in as I could previously! When I enter system settings, in the output tab under "Play sound through" nothing is listed, and same in the input tab under "Record sound from".
DepreTux
Established Member
Posts: 135
Joined: Tue Jul 23, 2013 9:36 am

Re: Jack Audio and Flash

Post by DepreTux »

I don't know if this is the way you wanna go, but have you checked youtube-dl out?

This script will take a url you copied from youtube and start playing the video right away in mplayer (saving you flash player's cpu load).

Code: Select all

#!/bin/sh

URL=`xclip -o`

RAWURL=`youtube-dl -gf 43/18/34 --cookies /tmp/ytdl-cookie.txt "$URL"`

mplayer -cache-min 50 -cookies -cookies-file /tmp/ytdl-cookie.txt "$RAWURL"

rm /tmp/ytdl-cookie.txt

exit 0
I have that bind to alt+y in dwm.

Here is a version of the former with a dirty if statement looking for jackd. Improvements welcomed.

Code: Select all

#!/bin/sh

URL=`xclip -o`

RAWURL=`youtube-dl -gf 43/18/34 --cookies /tmp/ytdl-cookie.txt "$URL"`

if [ $(ps ax | grep -c jackd) -gt 1 ]; then
mplayer -ao=jack:name=mplayer:noconnect -cache-min 50 -cookies -cookies-file /tmp/ytdl-cookie.txt "$RAWURL"
else
mplayer -cache-min 50 -cookies -cookies-file /tmp/ytdl-cookie.txt "$RAWURL"
fi

rm /tmp/ytdl-cookie.txt

exit 0
And that's it.

ps.: I use the "noconnect" option of mplayer's jack output because I have my own patchbay and I pass every audio signal through a calf's multiband compressor, and parametric eq to get decent sound out of terrible sources/speakers.
varpa
Established Member
Posts: 512
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 14 times

Re: Jack Audio and Flash

Post by varpa »

I do not have a immediate answer for you except to say that it is possible to have youtube with/without Jack to work perfectly. Works out of the box like this in AVLinux, and I also installed jack/flash on kxstudio and it also works perfectly (after removing the default .asoundrc and disabling the jackconnect daemon). Though I have no proof in your case, it is frequently the problem that pulse audio is frequently the culprit with jack problems.
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Jack Audio and Flash

Post by Aleks »

Well, thanks, but I had to reinstall the whole system and decided to stick with vlc-jack plugin. Then youtube videos can be streamed through vlc player to jack.
Post Reply