boot up straight into an application -VLC

Moderators: mdrjr, odroid

boot up straight into an application -VLC

Unread postby richard-g8jvm » Tue Mar 13, 2018 1:14 am

Hi
found a use for my redundant C1+
But it requires booting up straight in to VLC and running a capture device, a USB camera,

It wont have a keyboard or mouse attached
For my sins I'm also a bit of a model railway geek, and the camera is used to see an area , where access is difficult and used for a storage area.

I'll be using the latest image in the repos, which from memory is ubuntu 16.04

Whats the easiest way to auto login and start VLC to run a captured video device ????? from boot up

thanks
BR
Richard G8JVM
richard-g8jvm
 
Posts: 283
Joined: Sun Jan 18, 2015 1:27 am
Location: Telford UK
languages_spoken: english
ODROIDs: C1+ C2, XU4

Re: boot up straight into an application -VLC

Unread postby joerg » Tue Mar 13, 2018 2:36 am

edit: deleted my answer. I didn't saw that you are asking for ubuntu, not android.
joerg
 
Posts: 801
Joined: Tue Apr 01, 2014 2:14 am
Location: Germany
languages_spoken: german, english, espaƱol
ODROIDs: C1, C1+, C2

Re: boot up straight into an application -VLC

Unread postby richard-g8jvm » Tue Mar 13, 2018 3:19 am

no problem

just wonder if this will work, the last line works from the CLI OK
Code: Select all
[Seat:*]
greeter-session=lightdm-gtk-greeter
autologin-user=odroid
cvlc v4l2:// :v4l2-vdev="/dev/video0" --fullscreen
BR
Richard G8JVM
richard-g8jvm
 
Posts: 283
Joined: Sun Jan 18, 2015 1:27 am
Location: Telford UK
languages_spoken: english
ODROIDs: C1+ C2, XU4

Re: boot up straight into an application -VLC

Unread postby richard-g8jvm » Tue Mar 13, 2018 6:56 am

and that didn't work either

I've tried starting from ~/.config/autostart/test.desktop

Code: Select all
[Desktop Entry]
Type=Application
Exec=/usr/bin/cvlc v4l2:// :v4l2-vdev="/dev/video0" --fullscreen
Hidden=false
NoDisplay=false



I've tried both /usr/bin/vlc and /usr/bin/cvlc and neither play ball :(

Code: Select all
/usr/bin/cvlc v4l2:// :v4l2-vdev="/dev/video0" --fullscreen

works fine from CLI, but not within startup scripts

Where am I going wrong ?????
BR
Richard G8JVM
richard-g8jvm
 
Posts: 283
Joined: Sun Jan 18, 2015 1:27 am
Location: Telford UK
languages_spoken: english
ODROIDs: C1+ C2, XU4

Re: boot up straight into an application -VLC

Unread postby crashoverride » Tue Mar 13, 2018 9:57 am

richard-g8jvm wrote:Whats the easiest way to auto login and start VLC

viewtopic.php?f=52&t=15320
crashoverride
 
Posts: 3918
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1

Re: boot up straight into an application -VLC

Unread postby richard-g8jvm » Tue Mar 13, 2018 6:40 pm

thanks

but sorry to say not very helpful

I've tried using a .desktop file to start and it fails
I'm trying to use the start up application
but here is a BIG problem with the C1, that requires a keyboard /mouse connected and the C1 crashes repeatedly at boot up if the Logitech USB dongle is used for the remote
Logitech keyboard/mouse is inserted.
So the keyboard has to be hot plugged to work,
and on the startup menu if you browse for the executable /usr/bin/vlc its not shown, but from CLI its clearly there

Furthermore on the topic pointed to to, VNC use, the excutable is listed in usr/lib ?????????????
why call a lib fill to start an application
BR
Richard G8JVM
richard-g8jvm
 
Posts: 283
Joined: Sun Jan 18, 2015 1:27 am
Location: Telford UK
languages_spoken: english
ODROIDs: C1+ C2, XU4

Re: boot up straight into an application -VLC

Unread postby richard-g8jvm » Tue Mar 13, 2018 7:13 pm

A bit more info

you can get VLC to start from the startup applications
BUT it wont accept any added commands, either as /usr/bin/cvlc or /usr/bin/vlc it just ignores the v4l2 switches

and AS THE DAFT THING WONT BOOT UP WITH THE LOGITECH DONGLE INSERTED AND IT DOES THE SAME WITH THE USB CAMERA CONNECTED ITS A WASTE OF SPACE.

maybe a XU4 may work
BR
Richard G8JVM
richard-g8jvm
 
Posts: 283
Joined: Sun Jan 18, 2015 1:27 am
Location: Telford UK
languages_spoken: english
ODROIDs: C1+ C2, XU4

Re: boot up straight into an application -VLC

Unread postby meveric » Tue Mar 13, 2018 9:45 pm

If you use a .desktop file, don't pass command line options.. run a shell script within the .desktop file and the shell scripts calls the program with command line options.
Code: Select all
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/start_cam.sh
Hidden=false
NoDisplay=false


/usr/local/bin/start_cam.sh:
Code: Select all
#!/bin/bash
/usr/bin/cvlc v4l2:// :v4l2-vdev="/dev/video0" --fullscreen
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.
User avatar
meveric
 
Posts: 9067
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1

Re: boot up straight into an application -VLC

Unread postby richard-g8jvm » Tue Mar 13, 2018 10:38 pm

Many thanks Meveric

I found similar by adding from the startup applications a link to a shell script, and got it to work that way.
Major problem is that the C1+ will not boot up with a USB camera attached, it also wont boot up with the LOGITECH USB keyboard dongle plugged in
So for the application I wanted to use it for the C1+ is not usable.

I have got it running OK on the XU4, but a strange boot up problem with that, its not rebooting if the HDMI input on the TV is selected to connect to the XU4.
Only happening if rebooted from the CLI on a SSH connection.. weird !!!
BR
Richard G8JVM
richard-g8jvm
 
Posts: 283
Joined: Sun Jan 18, 2015 1:27 am
Location: Telford UK
languages_spoken: english
ODROIDs: C1+ C2, XU4

Re: boot up straight into an application -VLC

Unread postby jit-010101 » Wed Mar 14, 2018 10:37 pm

richard-g8jvm wrote:Major problem is that the C1+ will not boot up with a USB camera attached, it also wont boot up with the LOGITECH USB keyboard dongle plugged in
So for the application I wanted to use it for the C1+ is not usable.


That sounds like they take to much power.

How are you powering your C1+ and how much devices are you using there ?
jit-010101
 
Posts: 18
Joined: Tue Mar 13, 2018 9:40 pm
languages_spoken: english

Re: boot up straight into an application -VLC

Unread postby richard-g8jvm » Thu Mar 15, 2018 7:39 am

Hi
with an odroid PSU, identical to that used on my C2 which has multiple USB devices connected
I did after a lot of playing get it to boot up with the keyboard dongle connected , then added the USB camera, but even using guvcview, there was tearing with any video movement.

So C1 does not have enough umph for the job and I'll be using my XU4 , which is an overkill
BR
Richard G8JVM
richard-g8jvm
 
Posts: 283
Joined: Sun Jan 18, 2015 1:27 am
Location: Telford UK
languages_spoken: english
ODROIDs: C1+ C2, XU4


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 2 guests