cclive problems (for me)SOLVED

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
User avatar
rust collector
Motörhead
Posts: 535
Joined: Mon Jan 13, 2014 3:56 pm
Location: no_nb

cclive problems (for me)SOLVED

Unread post by rust collector » Sat Oct 03, 2015 4:29 pm

So, I have tried adipositas, and proof, but I can not get the cclive thing working.

I get an error, saying "clive not found"

I have mplayer, youtube-dl installed

Also, is cclive supposed to work in a plain tty with bash, framebuffer, or ?? (does it work in tmux, or dvtm? or even in X?)

I am sure it is something very simple, that I am missing, but I am not sure where to start?
Last edited by rust collector on Tue Oct 06, 2015 3:02 pm, edited 1 time in total.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: cclive problems (for me)

Unread post by machinebacon » Sat Oct 03, 2015 7:45 pm

To make it work in elinks (pressing o on a link in youtube) you need to

nano ~/.elinks

press Ctrl-\ and then enter clive and change the value to cclive

edit ~/.ccliverc, it should just contain this one line:

exec = /usr/bin/mplayer %f

Sorry about these, the syntax changed when clive changed to cclive in Debian.

It is supposed to work in X and framebuffer (not necessary to go into framebuffer mode in TTY first). In dvtm and tmux it will probably not work.

If you are in X, you need to edit ~/.mplayer/conf to *NOT* use fbdev2.
..gnutella..

User avatar
rust collector
Motörhead
Posts: 535
Joined: Mon Jan 13, 2014 3:56 pm
Location: no_nb

Re: cclive problems (for me)

Unread post by rust collector » Sat Oct 03, 2015 8:05 pm

aha! thank you!

I get a new error now, but it is mpalyer, so I can probably figure that out.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: cclive problems (for me)

Unread post by machinebacon » Sat Oct 03, 2015 8:20 pm

Sure it's an "error"? Might be "exec = /usr/bin/mplayer %I" instead of %f, but mplayer always throws some "warnings" (like LIRC no supported), this needs the --really-quiet option then.
..gnutella..

User avatar
rust collector
Motörhead
Posts: 535
Joined: Mon Jan 13, 2014 3:56 pm
Location: no_nb

Re: cclive problems (for me)

Unread post by rust collector » Sat Oct 03, 2015 8:38 pm

I will tinker, and see what I can figure out.
If I get something useful, I will post it here.

User avatar
rust collector
Motörhead
Posts: 535
Joined: Mon Jan 13, 2014 3:56 pm
Location: no_nb

Re: cclive problems (for me)

Unread post by rust collector » Mon Oct 05, 2015 8:47 pm

Well, I believe the problem is that it downloads the file from the youtube link, which is stored like:

The Sexy Cat Jumps Over A Moving Train .

so mplayer does not see it properly, and believes it is 8 separate files.

If I type mplayer Th[tab] it does not find it.
If I type mv Th[tab] it does, and it replaces the spaces, and I can move back, and replace mv with mplayer, and it works.

So I guess I have to figure out how to sed or awk the file name, to replace the spaces, before running mplayer.

I figure I could run the file renaming thing before the mplayer line in .ccliverc?

Oh well, that is all I have today. I hope I am not completely wrong, lol

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: cclive problems (for me)

Unread post by pidsley » Mon Oct 05, 2015 9:07 pm

Here is a modification of rhowaldt's fclean script that should take care of the spaces.

Code: Select all

#!/bin/bash

#replace spaces and other junk in file names

for OLDNAME in *; do
    NEWNAME=$(echo $OLDNAME | tr ' ' '-' | tr '_' '-' | tr [A-Z] [a-z])
    mv -v "$OLDNAME" "$NEWNAME"
done
Just use the first part of the "tr" line if you only want to clean one filename, and only care about spaces.

What if you use this in .ccliverc? (Or some other way to surround the filename in quotes -- I did not test this.)

Code: Select all

exec = /usr/bin/mplayer \"%f\"

User avatar
rust collector
Motörhead
Posts: 535
Joined: Mon Jan 13, 2014 3:56 pm
Location: no_nb

Re: cclive problems (for me)

Unread post by rust collector » Mon Oct 05, 2015 9:39 pm

Thanks for those.
I tried the second idea, and it is not working yet, but that is a good idea.

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: cclive problems (for me)

Unread post by rhowaldt » Tue Oct 06, 2015 12:16 pm

definitely, fclean the fuck out of all your files. if you want the full script (which cleans a bit more than pidsley's modification) let me know and i will post it (it probably is on the forums somewhere already but can't be fucked to search). oh well, since it is no effort whatsoever, here it is:

Code: Select all

#!/bin/bash
# obtained from paramthegreat @ Arch forums
# replaces spaces with underscores
# removes unwanted characters
# makes everything lowercase
# replaces hyphen after numbers with underscore

ls | while read -r FILE
do
    mv -v -- "$FILE" `echo $FILE | tr ' ' '_' | tr -d '[{}(),\!]' | tr -d "\'" | tr '[A-Z]' '[a-z]' | sed 's/\([0-9][0-9]\)-/\1_/'`
done
exit 0
pidsley's is different i see not only in what it removes but also in how it is executed, doesn't use the ugly ls to while loop pipe etc. this works for me so i use it, a lot. you are old enough to make your own decisions ;)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
rust collector
Motörhead
Posts: 535
Joined: Mon Jan 13, 2014 3:56 pm
Location: no_nb

Re: cclive problems (for me)

Unread post by rust collector » Tue Oct 06, 2015 1:49 pm

Hmm, it also seem like mplayer wants an .mp4, or flv, or whatever at the end?
You can force feed it, and it works, but...

Otoh, if I use youtube-dl the filename is "correct".
I need to learn much more to get cclive working, so I guess I will just use youtube-dl for now.

Thanks for those cleanup tools.

Added later:

So, pidsley was right... again.

I put this in .ccliverc

Code: Select all

 exec = /usr/bin/mplayer "%f" 
and it works (I am still in x, on smoothie. Going to try it on adiposita now.

Oh, and mplayer can be replaced with mpv, if you want. (at least in x)

Added even later

Works on adipositas too, even in (or on top of) dvtm.

Thanks people!

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: cclive problems (for me)SOLVED

Unread post by machinebacon » Wed Oct 07, 2015 2:54 am

clive needs to update their fucking manpage :(
..gnutella..

User avatar
darry1966
CLIt Licker
Posts: 398
Joined: Mon Mar 09, 2015 9:13 am
Location: New Zealand

Re: cclive problems (for me)

Unread post by darry1966 » Wed Oct 07, 2015 6:25 am

Russy wrote:
and it works (I am still in x, on smoothie. Going to try it on adiposita now.

Oh, and mplayer can be replaced with mpv, if you want. (at least in x"

Thanks people!

Yes enjoying Mpv, very low on resources.:)
Last edited by wuxmedia on Wed Oct 07, 2015 6:49 am, edited 2 times in total.
Reason: fixed quote
LinuxBBQ is Sexy. Runs BBQ Stable.

Post Reply