You are not logged in.

#1 2010-12-29 17:49:30

puma-altway
Member
Registered: 2007-01-21
Posts: 11

VLC via CRON - no image

I try to run VLC via CRON.

this is in cron.txt :


0 0 * * * cd /home/vychod/public_html ; killall -9 vlc &> /dev/null; DISPLAY=:0.0 vlc --fullscreen --volume 300 --loop --extraintf http --http-host 12.345.678.00:8080 -I dummy playlist/playlist1.m3u

In scheduled time the process starts, but I have no image, I just hear the sound.

If I try run the command in terminal, everything goes fine, but via CRONE I have no image to see..

Can anyone help?

Offline

#2 2010-12-29 18:39:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

https://bbs.archlinux.org/viewtopic.php … 63#p870263
I think it should be 'export DISPLAY=:0.0'.

Last edited by karol (2010-12-29 18:40:10)

Offline

#3 2010-12-29 19:03:03

puma-altway
Member
Registered: 2007-01-21
Posts: 11

Re: VLC via CRON - no image

0 0 * * * cd /home/vychod/public_html ; killall -9 vlc &> /dev/null; export DISPLAY=:0.0 vlc --fullscreen --volume 300 --loop --extraintf http --http-host 12.345.678.00:8080 -I dummy playlist/playlist1.m3u

doesn't work...

Offline

#4 2010-12-29 19:48:14

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

Are you running this cronjob as root or as your user?

Offline

#5 2010-12-29 19:52:43

puma-altway
Member
Registered: 2007-01-21
Posts: 11

Re: VLC via CRON - no image

as user...

Offline

#6 2010-12-29 20:50:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

I don't know what the http options do, but I can run both audio and video from cron:

*/2 * * * * cd /home/karol/media && DISPLAY=:0.0 vlc --fullscreen --volume 300 -I dummy *

Offline

#7 2010-12-29 21:19:37

puma-altway
Member
Registered: 2007-01-21
Posts: 11

Re: VLC via CRON - no image

which version of VLC are you using?

Offline

#8 2010-12-29 21:21:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

vlc 1.1.5-2

Offline

#9 2010-12-29 21:30:54

puma-altway
Member
Registered: 2007-01-21
Posts: 11

Re: VLC via CRON - no image

I use that VLC too...

I tried your command, but it won't work... Just started VLC as process, I heard sound from videos and that's all...

What can influence it? xorg.conf or nvidia driver?

I really don't know how to fix it...

Offline

#10 2010-12-29 21:40:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

Use another xorg.conf - as simple as you can - and tell cron to run vlc on :1 display. Start X with

xinit /path/to/wm -- :1 -xf86config xorg-vlc.conf

Offline

#11 2010-12-30 15:18:13

Daniel_F
Member
From: Brazil
Registered: 2010-12-28
Posts: 69

Re: VLC via CRON - no image

I'm curious: what do you guys use that for ??

Offline

#12 2010-12-30 15:22:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

Daniel_F wrote:

I'm curious: what do you guys use that for ??

I don't use vlc at all, I just installed it to help puma-altway.

Offline

#13 2010-12-30 19:29:22

puma-altway
Member
Registered: 2007-01-21
Posts: 11

Re: VLC via CRON - no image

so...
at first, karol - thank you for your time...

Can you find the problem?

I did log from cron:

VLC media player 0.8.6i Janus
[00000263] dummy interface: using the dummy interface module...
Invalid MIT-MAGIC-COOKIE-1 key[00000322] xvideo video output error: cannot open display :0.0
Invalid MIT-MAGIC-COOKIE-1 key[00000322] x11 video output error: cannot open display :0.0
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key[00000322] vout_sdl video output error: cannot initialize SDL (Unable to open a console terminal)
[00000322] fb video output error: tcgetattr failed
[00000322] fb video output error: tcgetattr failed
[00000322] fb video output error: tcsetattr failed
[00000322] fb video output error: cannot get terminal mode (Inappropriate ioctl for device)

and here is my xorg.conf :


# /.../
# SaX generated X11 config file
# Created on: 2008-06-03T13:30:12-0400.
#
# Version: 8.1
# Contact: Marcus Schaefer <sax@suse.de>, 2005
# Contact: SaX-User list <https://lists.berlios.de/mailman/listinfo/sax-users>
#
# Automatically generated by [ISaX] (8.1)
# PLEASE DO NOT EDIT THIS FILE!
#

Section "Files"
  FontPath     "/usr/share/fonts/misc:unscaled"
  FontPath     "/usr/share/fonts/local"
  FontPath     "/usr/share/fonts/75dpi:unscaled"
  FontPath     "/usr/share/fonts/100dpi:unscaled"
  FontPath     "/usr/share/fonts/Type1"
  FontPath     "/usr/share/fonts/URW"
  FontPath     "/usr/share/fonts/Speedo"
  FontPath     "/usr/share/fonts/PEX"
  FontPath     "/usr/share/fonts/cyrillic"
  FontPath     "/usr/share/fonts/latin2/misc:unscaled"
  FontPath     "/usr/share/fonts/latin2/75dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/100dpi:unscaled"
  FontPath     "/usr/share/fonts/latin2/Type1"
  FontPath     "/usr/share/fonts/latin7/75dpi:unscaled"
  FontPath     "/usr/share/fonts/baekmuk:unscaled"
  FontPath     "/usr/share/fonts/japanese:unscaled"
  FontPath     "/usr/share/fonts/kwintv"
  FontPath     "/usr/share/fonts/truetype"
  FontPath     "/usr/share/fonts/uni:unscaled"
  FontPath     "/usr/share/fonts/CID"
  FontPath     "/usr/share/fonts/ucs/misc:unscaled"
  FontPath     "/usr/share/fonts/ucs/75dpi:unscaled"
  FontPath     "/usr/share/fonts/ucs/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/misc:unscaled"
  FontPath     "/usr/share/fonts/hellas/75dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/100dpi:unscaled"
  FontPath     "/usr/share/fonts/hellas/Type1"
  FontPath     "/usr/share/fonts/misc/sgi:unscaled"
  FontPath     "/usr/share/fonts/xtest"
  FontPath     "/opt/kde3/share/fonts"
  InputDevices "/dev/gpmdata"
  InputDevices "/dev/input/mice"
EndSection

Section "ServerFlags"
  Option       "AllowMouseOpenFail" "on"
EndSection

Section "Module"
  Load         "dbe"
  Load         "type1"
  Load         "freetype"
  Load         "extmod"
  Load         "glx"
EndSection

Section "InputDevice"
  Driver       "kbd"
  Identifier   "Keyboard[0]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "us"
  Option       "XkbModel" "microsoftpro"
  Option       "XkbRules" "xfree86"
EndSection


Section "InputDevice"
  Driver       "mouse"
  Identifier   "Mouse[1]"
  Option       "Buttons" "9"
  Option       "Device" "/dev/input/mice"
  Option       "Name" "ImExPS/2 Generic Explorer Mouse"
  Option       "Protocol" "explorerps/2"
  Option       "Vendor" "Sysp"
  Option       "ZAxisMapping" "4 5"
EndSection


Section "Monitor"
  Option       "CalcAlgorithm" "XServerPool"
  DisplaySize  310 230
  HorizSync    30-98
  Identifier   "Monitor[0]"
  ModelName    "AOC 9K+"
  Option       "DPMS"
  VendorName   "AOC"
  VertRefresh  43-160
  UseModes     "Modes[0]"
EndSection


Section "Modes"
  Identifier   "Modes[0]"
  Modeline     "1280x1024" 157 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync
EndSection


Section "Screen"
  DefaultDepth 16
  SubSection "Display"
    Depth      15
    Modes      "1280x1024" "1280x960" "1024x768" "800x600"
  EndSubSection
  SubSection "Display"
    Depth      16
    Modes      "1280x1024" "1280x960" "1024x768" "800x600"
  EndSubSection
  SubSection "Display"
    Depth      24
    Modes      "1280x1024" "1280x960" "1024x768" "800x600"
  EndSubSection
  SubSection "Display"
    Depth      8
    Modes      "1280x1024" "1280x960" "1024x768" "800x600"
  EndSubSection
  Device       "Device[0]"
  Identifier   "Screen[0]"
  Monitor      "Monitor[0]"
EndSection


Section "Device"
  BoardName    "GeForce Go 7300"
  BusID        "1:0:0"
  Driver       "nouveau"
  Identifier   "Device[0]"
  Option       "SaXDualHead"
  Option       "TwinView"
  Option       "TVOverScan" "0.55"
  Option       "TVStandard" "PAL-I"
  Option       "SaXDualHSync" "30-67"
  Option       "SaXDualMonitorModel" "LG ELECTRONICS 32LC55"
  Option       "SaXDualVSync" "50-75"
  Option       "TVOutFormat" "composite"
  Option       "SaXDualMonitorVendor" "GSM"
  Option       "SaXDualOrientation" "RightOf"
  Option       "MetaModes" "1024x768,1024x768;800x600,800x600"
  Option       "SaXDualResolution" "1024x768"
  Option       "TwinViewOrientation" "Clone"
  Option       "SaXDualMode" "Clone"
  Option       "SecondMonitorVertRefresh" "50-75"
  Screen       0
  VendorName   "NVIDIA"
EndSection



Section "ServerLayout"
  Identifier   "Layout[all]"
  InputDevice  "Keyboard[0]" "CoreKeyboard"
  InputDevice  "Mouse[1]" "CorePointer"
  Option       "Clone" "off"
  Option       "Xinerama" "off"
  Screen       "Screen[0]"
EndSection


Section "DRI"
    Group      "video"
    Mode       0660
EndSection

Section "Extensions"
EndSection

Offline

#14 2010-12-30 19:36:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

Please edit your post using [ code ] tags https://bbs.archlinux.org/help.php#bbcode

How exactly do you run that cronjob? Do you have the X server running at that time?

Offline

#15 2010-12-30 20:32:56

Daniel_F
Member
From: Brazil
Registered: 2010-12-28
Posts: 69

Re: VLC via CRON - no image

Just to clarify: are you running Arch or SUSE ??

as a troubleshooting measure (not to be used all the time) try running this on a terminal:

xhost +

and see if your cron job works.

If it does then get a little more restrictive (read: secure) and try with:

xhost local:your_user_name

If that works you can add it to your rc.local

Offline

#16 2010-12-30 21:17:23

puma-altway
Member
Registered: 2007-01-21
Posts: 11

Re: VLC via CRON - no image

cronjob works...

I did a little progress a while ago!!

I tried to edit my xorg.conf and after reboot the X server won't work. Than I corrected the errors in xorg.conf. As user I started X server via command startx. And the VLC via CRON worked!!!!
But after reboot it doesn't work... How is that possible? I do no changes in rc.conf before reboot....

The output is the same: cannot open display :0.0

Can anyone explain me what's happening?

Offline

#17 2010-12-30 21:19:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

I always start X via 'startx' as a user.

Offline

#18 2010-12-30 21:22:23

puma-altway
Member
Registered: 2007-01-21
Posts: 11

Re: VLC via CRON - no image

yes me too.
in this computer i have gnome with autologin... so everything starts automatically with no password... but I suppose it have no connection with the mentioned error...

Offline

#19 2010-12-30 21:24:54

Daniel_F
Member
From: Brazil
Registered: 2010-12-28
Posts: 69

Re: VLC via CRON - no image

Have you tried with xhost +  ??

Again: The xorg.conf you posted seems to be from a SUSE system. Is this an Arch or a SUSE ?

Offline

#20 2010-12-30 22:18:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: VLC via CRON - no image

You need to have X server running to see the video.

*/2 * * * * cd /home/karol/media && xinit /home/karol/.xinitrc2 -- :1
[karol@black ~]$ cat .xinitrc2
#!/bin/sh

/usr/bin/vlc --fullscreen --volume 300 -I dummy * &
dwm

If I omit my window manager - dwm - the video doesn't start fullscreen.

Offline

Board footer

Powered by FluxBB