I am trying to get a stop motion app for my son using a webcam. He has a Hack laptop. I don’t know Linux. I have found a Ubuntu app that I think will work: Boats Animator. I found a post here showing the basics of running Ubuntu using podman. But I think I need more specific steps to get this working. Anybody available to help?
Whats your issue? If the Webcam is connected using USB, you need to give the container access to it - which isn’t a straightforward process as it involves two steps:
- Creating / Starting the necessary Ubuntu Container
- Attaching the USB Device to the Container
I use such a combination for doing embedded programming - to make things easier, i’ve written the following shell script:
How to use it:
Download it and make it accessible
mkdir ~/scripts
wget -O ~/scripts/ubuntu.sh https://gist.githubusercontent.com/egrath/d9aadfd5189a2a3982df82c3789b3684/raw/a895732126f4c3273d53bcb089e8f5a1fd52567d/ubuntu.sh
chmod +x ~/scripts/ubuntu.sh
echo export PATH=~/scripts:$PATH >> ~/.bashrc
Adopt it to your needs
You need to know the device and vendor id of the device you want to make accessible to the Container. Use the following command:
lsusb
This will output something like:
Bus 001 Device 004: ID 072f:2200 Advanced Card Systems, Ltd
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Edit the script file downloaded previously and change the DEVICE
line to match the device id of your choice
The next issue are the permissions of the USB device. In most cases we need raw access to the device, so we need to write a UDEV rule to automatically set the permission for unprivileged use.
Run:
cat << EOF | sudo tee /etc/udev/rules.d/99-usb-perms.rules
SUBSYSTEM=="usb",ATTRS{idProduct}=="072f",ATTRS{idVendor}=="2200",MODE="0666"
EOF
Once again replace the numbers with yours. Now reboot.
Create the Container
ubuntu.sh -create
Start / Join the container
ubuntu.sh
Attach the USB device
Open another Terminal, then:
sudo ~/scripts/ubuntu.sh -usb
Now you are able to access the USB device from within the container directly.
Thank you! that infor will be helpful!
I assume I will be able to try that out once I get the program installed.
How do I install a program? I see ‘apt-get’ stuff sometimes. But the program is listed for download on the website as a ‘tar.gz’. What do I do to use that?
I took a look at the Application. It works directly with Endless OS, no need to use Podman - the Author has packaged every necessary dependency in the distributed package.
Download, Extract and Install
cd ~/Downloads; wget https://github.com/charlielee/boats-animator/releases/download/v0.10.0/boats-animator-0.10.0-linux-x64.tar.gz
mkdir ~/opt
gzip -dc boats-animator-0.10.0-linux-x64.tar.gz | tar -xvf - -C ~/opt
Integrate with Endless OS
mkdir -p ~/.local/share/applications
cat << EOF > ~/.local/share/applications/boats.desktop
[Desktop Entry]
Type=Application
Name=Boats Animator
Exec=bash -c "cd $(dirname ~/opt/boats-animator-0.10.0-linux-x64/boats-animator) && ./boats-animator"
Icon=video
EOF
chmod +x ~/.local/share/applications/boats.desktop
gio set ~/.local/share/applications/boats.desktop metadata::trusted yes
Run it
FANTASTIC! I will try this out tomorrow!
Curious: how did you determine that it would work directly with Endless OS? Maybe I am missing some knowledge that would allow me to identify other apps that will work.
Thus far the only way I know to find apps that will work with Endless OS is to go to Flathub.org
If a application do bring all its dependencies with it, chances are good that it will work - but not sandboxed like Flatpak applications, which is IMHO a selling point of EOS.
I followed your instructions (the second set. I think I can skip the first set as you pointed out I don’t need to use a container for Boats. Thanks!)
The app loads great! And the camera works!
The issue I hit was when I went to export to video. It starts but doesn’t seem to stop. I made a short project of only 13 frames so it should be a quick export process.
Would you mind testing out the export process on your end? Maybe there is some final command line steps I need to take?
Hoping to get further help here. This is part of a Christmas present I am planning.
Holy, this software is really unfinished (but really cool too )
I didn’t found out why the software has issues with exporting, but i found a workaround - once again:
Run:
cd ~/opt/boats-animator-0.10.0-linux-x64
wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
xz -dc ffmpeg-git-amd64-static.tar.xz | tar -xvf -
find -O0 . -name ffmpeg-\* -type d -exec cp {}/ffmpeg . \; -quit
This will install a prebuilt version of ffmpeg
which is also the software component used by boats animator internally. Now, when exporting a Project, press the Export button, but don’t start the export. Copy the parameters from the Window:
Then, open a Terminal and switch to the output directory:
cd ~/tmp
And lastly, run:
~/opt/boats-animator-0.10.0-linux-x64/ffmpeg -y -framerate 15 -start_number 0 -i /sysroot/home/egon/tmp/ba_1607372152_frame_%05d.png -frames:v 5 -c:v libx264 -preset medium -crf 17 -vf format=yuv420p /sysroot/home/egon/tmp/output.mp4 -hide_banner
Everything after the ffmpeg
command are the parameters from the above window. If everything goes smooth, you now have a output.mp4 in this folder.
Hopefully the author improves this Nugget to make it really usable - be aware that you can’t load a saved project either …
ok. I will test this out. Is this a fix? or a work around that he will have to do everytime he wants to export a video?
Unfortunately, it’s only a workaround needed every time …
In case you have a DSLR camera and want to do more professional stop-motion, there is Entangle: https://flathub.org/apps/details/org.entangle_photo.Manager
Thanks! We don’t have a DSLR. Could you recommend a good, entry level one?
If I were to try to bring this to the attention of the creator how would I explain the issue and your current workaround?
I would ask the auhor if he would consider building a Flatpak of his application, as this is the Future of binary deployment on Linux (as the Flatpak runs on every Linux platform which has Flatpak, so almost every)
Thank, again!
I did a quick search on the GitHub for Boats and found this Flatpak request:
Would you be willing to read it and tell me what he means in his reply? Should I ask again?
Unfortunately I’m not a camera expert myself. But any cheap Canon or Nikon from this list should work with Entangle: gPhoto - Doc :: Remote controling cameras
I just looked. MAN! Those are expensive! I think we won’t be able to go the DSLR route. Thanks anyway!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.