View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000083 | Cinelerra-GG | Feature | public | 2018-12-28 21:04 | 2019-03-01 04:25 |
| Reporter | WPFilmmaker | Assigned To | goodguy | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Fixed in Version | 2019-01 | ||||
| Summary | 0000083: Support for jog-wheels CONTOUR DESIGN ShuttlePRO V.2 and ShuttleXpress | ||||
| Description | My original thread on the forum: https://www.cinelerra-gg.org/forum/forum-hardware/contour-jog-wheel-for-cingg/ ShuttlePRO V.2 and ShuttleXpress are two affordable jog wheels for video editors. I opened the above thread on the forum asking for info as I wanted to buy one o use with Cinelera and it turns out that the user pierre has a ShuttleXpress which sits to collects dusts as it doesn't work with Cin. ShuttlePRO V.2 is (was?) very popular because another video editor available for linux, released a branded version of it. ShuttleXpress is cheaper and seems less popular, but that's the model GG could get feedback from as pierre has it. It seems that there is (could be?) potential useful code for ShuttlePRO V.2 and pierre pasted some commands in his answer to my post, they make no sense to a nontechie but I think GG can understand them. Could we support these two devices? I think @pierre would be very happy to have his jog working so maybe this is possible if GG helps him and he tests what GG writes? It could be a great combo if used with Cinelerra for all low-budget/indie artists who could have a pro set-up for editing with less than $100. Pierre could finally used his jog he bought years ago and we could also add on the "features" page of the site, that Cin works with such hardware, which I think would look very professional. Furthermore these jogs are sold on amazon, which means that if they are supported, they could be "featured" in Cin page. With a referral link one that buys one on amazon, would generate a small revenue for Cinelerra, which could help to buy "some pizzas for the servers" :) Of course there should be a warning "we can't guarantee it will wok at 100% though"...to avoid issues with litigious people... but if given the choice to support a project when buying a compatible hardware, why not? Regarding ShuttlePRO V.2 I found: - https://github.com/abourget/shuttle-go - https://github.com/nanosyzygy/ShuttlePRO I am unable (I am no dev) to tell whether they can be useful or not. Maybe V.2 is the updated version of the express? If so, maybe they share similar (identical?) code? | ||||
| Tags | HELP needed | ||||
| Attached Files | |||||
|
|
+1 I seem to remember that the Jog-Shuttle was mentioned in Manual-cv; but I can't find it anymore. Am I wrong? |
|
|
Andrea: you are right! Here is the quote and the post: "It is possible to use a hardware JogShuttle 1 1 Refer to David Arendt's message posted on the Cinelerra CV mailing-list on the 2003-11-11 for more information" https://lists.skolelinux.org/pipermail/cinelerra/2003-November/000695.html The post includes the source code. GG can glance at the code, but without a Shuttle, probably can not do much. Might be able to get code working well enough and send to someone who has a shuttle, BUT NO COMMITMENTS here. |
|
|
Wow cool! @PhyllisSmith of course no commitment! I am sure there are more important stuff to do which keep GG busy and this is free software so anyone is welcome to contribute and no one can demand. |
|
|
Someone wrote a lightroom plugin to use Shuttlepro https://github.com/abrilevskiy/LightroomShuttlePro the page is quite detailed, hopefully it can be helpful :) |
|
|
A "Youtuber" examines the operation of the "SHUTTLEPRO V2" under Kdenlive and it seems to work very well: https://www.youtube.com/watch?v=b5D-kuR4hqQ One of the commentators gives a link to a GIT that seems to concern the "ShuttlePRO" as well as the "ShuttleXpress". https://github.com/Shamanon/ShuttlePRO This page on the CONTOUR website gives a lot of informations: http://forums.contourdesign.com/viewtopic.php?f=9&t=3881 This link on the LIGHTWORKS forum seems to give the recipe for their success with these shuttles. https://www.lwks.com/index.php?option=com_kunena&func=view&catid=25&id=72223&Itemid=81 |
|
|
The guy in this youtube video looks like he just came out of a cave after years. :D |
|
|
Or... beginner goalie, he stopped Hokey's puck in the wrong way.... But his analysis is interesting. |
|
|
It is indeed very interesting what you can do with the controller. |
|
|
https://www.youtube.com/watch?v=CNXk01YM1XY this guy in his review says they both work on linux as he tried them on his system76 linux laptop, with some tinkering though. He mentions some forum posts links (with the instructions??) but I couldn't find them... |
|
|
Pierre: The code was compiled by gg. The file "joggle" is the binary file for Mint18 so you can skip the compile part but you have to install the libxtst-dev. Here is the note he wrote: "First: I added a few system includes to get it to compile, and the new source is joggle.c ... to compile: apt install libxtst-dev cc -o joggle joggle.c -lX11 -lXtst which creates an executable binary: joggle to run this (according to the blurb at the top), I suspect you have to be root to get access to the /dev/input/event device file, and you need to know which /dev/input device file corresponds to the shuttle. One easy way is to: ls -1 /dev/input/* then, unplug the device and look again, one will appear/disapper when you plug/unplug the device. Then, as root run: /path/joggle /dev/input/eventx & (where x is the device number you discovered above) which will launch the background input daemon If the key remapping is still good, it should work at least for play/stop/... There is a much more elaborate version that remaps the keypad based on the window name of the window that currently has pointer input focus. https://github.com/Shamanon/ShuttlePRO/blob/master/example.shuttlerc I do not have any way to test any of this. gg" WARN: I would make sure you do not have anything important going on in case of crashing or hanging your computer. The keys you use are as you noted in the Forum for row 1 ... row 4. We do not know if the ShuttleXpress is the same as the ShuttlePro which is what the email states this code is for. joggle.c (3,520 bytes)
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <error.h>
#define DELAY 10
#define KEY 1
#define KEY1 256
#define KEY2 257
#define KEY3 258
#define KEY4 259
#define KEY5 260
#define KEY6 261
#define KEY7 262
#define KEY8 263
#define KEY9 264
#define KEY10 265
#define KEY11 266
#define KEY12 267
#define KEY13 268
#define JOGSHUTTLE 2
#define JOG 7
#define SHUTTLE 8
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <linux/input.h>
#include <X11/Xlib.h>
#include <X11/extensions/XTest.h>
#include <X11/keysym.h>
typedef struct input_event EV;
unsigned short jogvalue = 0xffff;
int shuttlevalue = 0xffff;
Display *display;
void initdisplay()
{
int event, error, major, minor;
display = XOpenDisplay(0);
if (!display)
{
fprintf(stderr, "unable to open X display\n");
exit(1);
}
if (!XTestQueryExtension(display, &event, &error, &major, &minor))
{
fprintf(stderr, "Xtest extensions not supported\n");
XCloseDisplay(display);
exit(1);
}
}
void sendkey(KeySym modifier, KeySym key)
{
KeyCode modifiercode;
KeyCode keycode;
if (modifier != 0)
{
modifiercode = XKeysymToKeycode(display, modifier);
XTestFakeKeyEvent(display, modifiercode, True, DELAY);
}
keycode = XKeysymToKeycode(display, key);
XTestFakeKeyEvent(display, keycode, True, DELAY);
XTestFakeKeyEvent(display, keycode, False, DELAY);
if (modifier != 0)
XTestFakeKeyEvent(display, modifiercode, False, DELAY);
XFlush(display);
}
void key(unsigned short code, unsigned int value)
{
if (value == 0)
return;
switch (code)
{
case KEY1 : sendkey(0, XK_KP_3); break;
case KEY2 : sendkey(0, XK_KP_0); break;
case KEY3 : sendkey(0, XK_KP_Add); break;
case KEY4 : sendkey(0, XK_KP_Enter); break;
case KEY5 : sendkey(XK_Mode_switch, '['); break;
case KEY6 : sendkey(XK_Mode_switch, ']'); break;
case KEY7 : sendkey(0, 'v'); break;
case KEY8 : sendkey(0, XK_KP_4); break;
case KEY9 : sendkey(0, XK_KP_1); break;
}
}
void jog(unsigned int value)
{
if (jogvalue != 0xffff)
{
if (value < jogvalue)
sendkey(0, XK_KP_4);
else if (value > jogvalue)
sendkey(0, XK_KP_1);
}
jogvalue = value;
}
void shuttle(int value)
{
int i = value/2;
if (i == shuttlevalue)
return;
switch(i)
{
case -2 : sendkey(0, XK_KP_Add); break;
case -1 : sendkey(0, XK_KP_6); break;
case 0 : sendkey(0, XK_KP_0); break;
case 1 : sendkey(0, XK_KP_3); break;
case 2 : sendkey(0, XK_KP_Enter); break;
}
shuttlevalue = i;
}
void jogshuttle(unsigned short code, unsigned int value)
{
switch (code)
{
case JOG : jog(value); break;
case SHUTTLE : shuttle(value); break;
}
}
void handle_event(EV ev)
{
switch (ev.type)
{
case KEY : key(ev.code, ev.value);
case JOGSHUTTLE : jogshuttle(ev.code, ev.value);
}
}
int main(int argc, char **argv)
{
int fd;
char name[256] = "unknown";
EV ev;
if (argc < 2)
{
fprintf(stderr, "syntax: cshuttle <device>\n");
return 1;
}
printf("cshuttle 0.1beta written by Arendt David (admin@prnet.org)\n");
fd = open(argv[1], O_RDONLY);
if (fd < 0)
{
fprintf(stderr, "unable to open %s\n", argv[1]);
return 1;
}
if (ioctl(fd, EVIOCGNAME(sizeof(name)), name) < 0)
{
perror("evdev ioctl");
}
printf("device name: %s\n", name);
initdisplay();
while (1)
{
read(fd, &ev, sizeof(ev));
handle_event(ev);
}
close(fd);
return 0;
}
|
|
|
The binary file is at: https://www.datafilehost.com/d/22d48b05 If that does not work for you, let us know and gg can put it in cinelerra-gg.org/download/testing |
|
|
Update: both the ShuttleXpress and ShuttlePROv2 work from a user account with Cinelerra-GG. It looks like by the end of the month, gg will be able to better integrate the required software into cin, but you can already use it by: 1) install your Operating System's version of libXtst-devel or libxtst-dev (whatever the X library development exact name is) 2) download and install: https://github.com/nanosyzygy/ShuttlePRO Either Shuttle when plugged in is like a mouse and automatically shows up in /dev. One line in the user's $HOME directory, .shuttlerc file had to be changed from/to: #[Cinelerra] ^Cinelerra: [^[:space:]]*$ [Cinelerra] ^Cinelerra I have tested both in the main menu of Cin but yet to test in Viewer and Compositor. Also, it is fairly easy to redefine the keys yourself for your own preferences. I will get a short document ready by the end of the month for more details. |
|
|
@PhyllisSmith That's awesome! |
|
|
I have also seen pen tablets like Wacom being used. Does that require special support too, or are they kind of mouse-like? |
|
|
MatN: from the little bit I read, it looks like Wacom uses bluetooth whereas the Shuttle connects via usb like a mouse. Wacom does not look like a possibility for use with Cin. |
|
|
Wacom tables have always USB I believe, optional Bluetooth too. E.g. see https://www.wacom.com/en-nl/products/pen-tablets/wacom-intuos#Specifications . That said, even though Wacom support is in most distros, if seems to be running behind somewhat. My Mint 18.3 has libwacom2 version 0.22, for the current Intuos tablets apparently you need version 0.39 . On the LinuxMint forums was a thread where this was actually fixed by compiling a driver. But until there is a demand for it, why spend time on it? Unless it was really useful and an big advantage / "selling" point. |
|
|
Ordinarily I would have marked this "Resolved" but sometimes after that no notes can be added. Anyway, gg fully incorporated the ShuttlePROv2 and ShuttleXpress into cinelerra. So now there is only 1 thing a user has to do 1 time to use this and that is to make sure that this hot plug device has ordinary user permissions. It is described fully in the attached file in the NEXT note. |
|
|
How to use the Shuttle with Cin pdf file is attached. |
|
|
1. Could the content of this file not be added (e.g. as appendix, it being a additional hardware device) to the ¨features5" manual (whatever it will be called). It may be too late for this release, but a next one? 2. I was given a demo of the use of a Wacom pen tablet with Adobe Premiere Pro on Windows10. No Wacom-specific drivers/utilities were installed, it worked like a mouse, except due to the absolute positioning, it was very much easier and quicker to use. Not just with Premiere, but also other Windows10 programs. I hope Linux will get/have the same support. |
|
|
Hi Phyllis, That's great news, I now (since yesterday) have a brand new ShuttlePROv2 in addition to the ShuttleXpress I had for a long time, so I will be able to confirm that all this is working well following the next update. I looked at the.pdf, it seems simple but I don't understand what to do with it: ATTRS{name}=="Contour Design ShuttlePRO v2" MODE="0644" ATTRS{name}=="Contour Design ShuttleXpress" MODE="0644" What to write in "(name)" An example with would be useful I am someone who works well with buttons and mice, not code... |
|
|
@Pierre: we did test the ShuttleXpress on Mint18 as a non-root user (and also on Leap 15). If you look at the directory /etc/udev/rules.d right now on your system, you may already have a couple of files there for other devices, like maybe an Epson printer. After the monthly builds are done on Thursday, there will be a file called -- {wherever your cinelerra path is}/doc/99-ShuttlePRO.rules . All you have to do is copy that file to /etc/udev/rules.d directory with that same name, as root, of course. It's only purpose is to retain the correct permissions on the Shuttle in case you unplug it. I will try to clarify the short documentation. @MatN: I pretty much always add the new features of the month to Features5.pdf that gg includes in the builds. I will be glad when a complete manual is done so I only have to update 1 manual. Also, I will have to look at Wacom again as apparently I did not quite understand it. |
|
|
Wow great results! Now I know what to get for my birthday :D @PhyllisSmith is your warning "WARN: I would make sure you do not have anything important going on in case of crashing or hanging your computer. The keys you use are as you noted in the Forum for row 1 ... row 4. We do not know if the ShuttleXpress is the same as the ShuttlePro which is what the email states this code is for." still relevant? I think if everything works fine adding on the website this new feature would be really good, especially for pro users. |
|
|
@PhyllisSmith I think a small improvement could be spcifying what ShuttlePROv2 and ShuttleXpress are, especially in the title, so that everyone can understand what they are. Maybe something like "ShuttlePROv2 and ShuttleXpress jog wheels" And in the section below something like "ShuttlePROv2 and ShuttleXpress are affordable jog wheels which can be used to speed up you work etc. etc...." Also I see there are credits for a photo but I can't see any photo in the pdf...is it me or it will be added later? |
|
|
@WPFilmaker: "Now I know what to get for my birthday :D" - yes, that would make an easy to purchase birthday present. BUT I would wait to hear from Pierre about his testing and which shuttle he thinks is best, as our testing is not "real life". I will put some commentary in the forum about my usage experience. No, the previous crash warning is no longer relevant as GG has rewritten the code and carefully inspected it. And we tested with both the PRO and the Xpress. Also, I will use your suggestions to improve the documentation and probably a picture of the actual devices would be useful to. The credit was for the program code and that was his contact (FixedImagePhoto.com is his contact). |
|
|
@PhyllisSmith Thanks for the clarification. I will definitively wait for more tests. I saw your post on the forum I will continue there :) |
|
|
Initial setup was completed. Pierre logged at least 3 bugs but they are fixed in the GIT repository. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2018-12-28 21:04 | WPFilmmaker | New Issue | |
| 2018-12-28 21:21 | Andrea_Paz | Note Added: 0000403 | |
| 2018-12-28 21:51 | PhyllisSmith | Tag Attached: HELP needed | |
| 2018-12-28 21:53 | PhyllisSmith | Note Added: 0000406 | |
| 2018-12-28 21:59 | PhyllisSmith | Note Edited: 0000406 | |
| 2018-12-28 22:42 | WPFilmmaker | Note Added: 0000408 | |
| 2018-12-28 22:51 | WPFilmmaker | Note Added: 0000409 | |
| 2018-12-28 23:02 | Pierre | Note Added: 0000410 | |
| 2018-12-28 23:07 | Sam | Note Added: 0000411 | |
| 2018-12-28 23:13 | Pierre | Note Added: 0000412 | |
| 2018-12-28 23:16 | Sam | Note Added: 0000413 | |
| 2018-12-28 23:16 | WPFilmmaker | Note Added: 0000414 | |
| 2018-12-29 01:55 | PhyllisSmith | File Added: joggle.c | |
| 2018-12-29 01:55 | PhyllisSmith | Note Added: 0000415 | |
| 2018-12-29 01:58 | PhyllisSmith | Note Added: 0000416 | |
| 2018-12-29 20:11 | PhyllisSmith | Assigned To | => goodguy |
| 2018-12-29 20:11 | PhyllisSmith | Status | new => assigned |
| 2019-01-23 18:05 | PhyllisSmith | Note Added: 0000662 | |
| 2019-01-23 18:37 | Sam | Note Added: 0000663 | |
| 2019-01-27 16:11 | MatN | Note Added: 0000679 | |
| 2019-01-27 16:29 | PhyllisSmith | Note Added: 0000680 | |
| 2019-01-28 20:52 | MatN | Note Added: 0000691 | |
| 2019-01-29 22:50 | PhyllisSmith | Status | assigned => confirmed |
| 2019-01-29 22:50 | PhyllisSmith | Note Added: 0000702 | |
| 2019-01-29 22:51 | PhyllisSmith | Note Edited: 0000702 | |
| 2019-01-29 22:52 | PhyllisSmith | File Added: shuttle.pdf | |
| 2019-01-29 22:52 | PhyllisSmith | Note Added: 0000703 | |
| 2019-01-29 23:38 | MatN | Note Added: 0000704 | |
| 2019-01-29 23:43 | Pierre | Note Added: 0000706 | |
| 2019-01-30 01:40 | PhyllisSmith | Note Added: 0000709 | |
| 2019-01-30 14:14 | WPFilmmaker | Note Added: 0000711 | |
| 2019-01-30 14:19 | WPFilmmaker | Note Added: 0000712 | |
| 2019-01-30 17:12 | PhyllisSmith | Note Added: 0000715 | |
| 2019-02-03 15:05 | WPFilmmaker | Note Added: 0000743 | |
| 2019-02-03 20:21 | PhyllisSmith | Status | confirmed => resolved |
| 2019-02-03 20:21 | PhyllisSmith | Resolution | open => fixed |
| 2019-02-03 20:21 | PhyllisSmith | Fixed in Version | => 2019-01 |
| 2019-02-03 20:21 | PhyllisSmith | Note Added: 0000745 | |
| 2019-03-01 04:25 | PhyllisSmith | Status | resolved => closed |