Author Topic: Cubian Video Kiosk with Mplayer on CB2  (Read 36245 times)

Offline classdroogies

  • Newbie
  • *
  • Posts: 6
  • Karma: +4/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #15 on: December 01, 2013, 05:09:53 pm »
I got some time to try this out and I'm not getting it to work. I'm trying this on a CB1 and using the latest Cubian release. What's odd at this point is that when I try to debug what is going on I can no longer issue a sudo command. It comes back and says
Quote
cubie is not in the sudoers file
. I can ssh in with cubie/cubie but can't do any sudo commands.


Hi,

You must add user cubie in sudo group with root user.

I've modified my tutorial....


Add your user to the video and audio groups :
Code: [Select]
sudo usermod -G sudo,video,audio cubie
« Last Edit: December 01, 2013, 05:17:17 pm by classdroogies »

Offline GeorgeIoak

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +1/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #16 on: December 01, 2013, 06:52:20 pm »
But since I've already rebooted I'm not able to issue any sudo commands. Do you happen to know a way in?

I took the SD Card out and on another system issued
Code: [Select]
sudo visudo -f /media/cubieboard/etc/sudoers
and added
Code: [Select]
cubie   ALL=(ALL:ALL) ALL
Probably not the safest thing to do but I just wanted to get the system up so I could do some testing.

For those new to slim the file you need to change is
Code: [Select]
sudo nano /etc/slim.conf
and don't forget to remove the # in front of default user and auto_login

Next up is to try and trim things to speed up the boot. Any helpful advice would be appreciated.

 
« Last Edit: December 01, 2013, 08:10:29 pm by GeorgeIoak »

Offline patwood

  • Linux geek
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1660
  • Karma: +129/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #17 on: December 01, 2013, 10:44:53 pm »
Next up is to try and trim things to speed up the boot. Any helpful advice would be appreciated.

I know that for ubuntu/lubuntu, the boot sequence waits a long time for the network to come up before bailing and continuing booting without it.  I was able to speed up the boot time when no network was connected from over 2 minutes to a few seconds by removing this.

Offline GeorgeIoak

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +1/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #18 on: December 02, 2013, 12:10:39 am »
I have seen that and plan on the final version not loading and checking the network connection. I see a fair amount of kernel messages so turning those off will help. I haven't messed with this stuff in over 6 months and even then I wasn't a programmer!

If "we're" crating a kiosk type platform my goal is make a super fast boot with a system that doesn't look like it's booting a computer.

Offline classdroogies

  • Newbie
  • *
  • Posts: 6
  • Karma: +4/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #19 on: December 02, 2013, 01:37:19 am »
But since I've already rebooted I'm not able to issue any sudo commands. Do you happen to know a way in?

I took the SD Card out and on another system issued
Code: [Select]
sudo visudo -f /media/cubieboard/etc/sudoers
and added
Code: [Select]
cubie   ALL=(ALL:ALL) ALL
Probably not the safest thing to do but I just wanted to get the system up so I could do some testing.


Have you enable root user ?

https://github.com/cubieplayer/Cubian/wiki/Get-started-with-Cubian

You must have this line in sudoers :

Code: [Select]
%sudo ALL=(ALL) ALL
And with root user :

Code: [Select]
usermod -G sudo,video,audio cubie

Offline alexvf

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #20 on: December 20, 2013, 09:12:06 am »
Very nice tutorial. But it's strange that I can play Video and no Audio. Any notes I may have missed in this? I'm using Gnome install GUI over my Cubian.

cat /proc/asound/cards

Modify the alsa:device setting to use your HDMI alsa card.

I think that
Code: [Select]
-ao alsa:device=default is the safer bet according to what aplay -L reports

EDIT: Actually, this is only true if you have your HDMI alsa card as default device for pulseaudio. You can find out with
Code: [Select]
pacmd list-sinksDefault is marked * and you can set it as default modifying these two lines in /etc/pulse/default.pa:

Code: [Select]
load-module module-stream-restore restore_device=false
set-default-sink 1 # or the sink index wou want
« Last Edit: January 09, 2014, 08:18:24 am by alexvf »

Offline alexvf

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #21 on: January 09, 2014, 08:31:56 am »
Hi all,

I've been testing mplayer functionality for a small project where i want to use it in slave mode and i found two issues:

* It crashes when using ffh264vdpau decoder to play an HD video and trying to modify aspect ratio.
* It doesn't seem capable of showing subtitles (nor osd) over the video.

Can anyone here confirm the same behaviour, so i can discard any issue related to my environment?
I haven't found instructions on how to compile mplayer myself to investigate further the issues. Has anyone done it?

Thanks,

PD: I start mplayer with this command:
Code: [Select]
mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau,ffodivxvdpau,-ffwmv3vdpau,-ffvc1vdpau, -slave -input nodefault-bindings -noconfig all /mnt/medios/Godzilla_2014_Trailer_1_5.1-1080p-HDTN.mp4

5P9i0s8y19Z

  • Guest
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #22 on: January 09, 2014, 09:30:32 am »
* It doesn't seem capable of showing subtitles (nor osd) over the video.

I think they are working on the 'osd' issue

https://github.com/linux-sunxi/libvdpau-sunxi/tree/osd

botond

  • Guest
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #23 on: January 11, 2014, 02:33:33 pm »
Hi,
A tutorial for create a basic video kiosk on CB2 with mplayer, for fun  :)
...

Reboot and  8)

Nice tutorial!
mplayer can play back fullHD videos even from an SMB share. Thank you!

maruprez

  • Guest
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #24 on: February 11, 2014, 10:54:16 am »
Hi,

Very nice tutorial !! Thank You.

I'm trying to use mplayer2 / cedar with Cubietruck.

I' ve followed all steps.  but i'm getting the following error

Code: [Select]
[vdpau] Error when calling vdp_presentation_queue_target_create_x11: A catch-all error, used when no other error code applies.
FATAL: Cannot initialize video driver.

Any help will be appreciate !!

Thank You

Maruprez


SOLVED !!!.

It was a /dev/disp permissions issue.

It works!

Maruprez
« Last Edit: February 11, 2014, 11:02:40 am by maruprez »

filly86

  • Guest
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #25 on: March 31, 2014, 03:04:04 pm »
Is it possible to pause, move forward and backward the video?

Offline Tar

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #26 on: April 02, 2014, 01:28:27 pm »
@filly:
Try the spacebar and "man mplayer" for a comprehensive list of keystrokes for the control of mplayer: 8)
Code: [Select]
      keyboard control
              LEFT and RIGHT
                   Seek backward/forward 10 seconds.
              UP and DOWN
                   Seek forward/backward 1 minute.
              PGUP and PGDWN
                   Seek forward/backward 10 minutes.
              [ and ]
                   Decrease/increase current playback speed by 10%.
              { and }
                   Halve/double current playback speed.
              BACKSPACE
                   Reset playback speed to normal.
              < and >
                   Go backward/forward in the playlist.
              ENTER
                   Go forward in the playlist, even over the end.
              HOME and END
                   next/previous playtree entry in the parent list
              INS and DEL (ASX playlist only)
                   next/previous alternative source.
              p / SPACE
                   Pause (pressing again unpauses).
              .
                   Step forward.  Pressing once will pause movie, every  consecutive  press  will  play  one
                   frame and then go into pause mode again (any other key unpauses).
              q / ESC
                   Stop playing and quit.
              U
                   Stop playing (and quit if -idle is not used).
              + and -

My actual problem is more severey - as well mplayer as vlc crashes, when i stop the video and try to resume. Only a reboot saves the system! My UART Cable is still on its way, so the chances to debug are small for me now. Up to now, i did not find anything about this. Is this a known issue?

Regards,

Tar
CT Rev.B|Cubian@Nand/ 3.4.79
A20Olinuxino|Debian/ 3.4.79

Offline null

  • Full Member
  • ***
  • Posts: 154
  • Karma: +5/-11
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #27 on: April 03, 2014, 11:05:50 am »
mplayer as vlc crashes, when i stop the video and try to resume
pause and resume ?
or stop and run again with resume from previous position ?

Offline Tar

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #28 on: April 05, 2014, 07:25:27 am »
Resume is the problem.

If i just shutdown vlc or mplayer and later restart it, no problem.

Pause works but on resume, the kernel crashes immediatly. If i am lucky, i may use sysrq to shutdown the system, sometimes hard reset is the only way. i am afraid of my NAND...
CT Rev.B|Cubian@Nand/ 3.4.79
A20Olinuxino|Debian/ 3.4.79

Offline null

  • Full Member
  • ***
  • Posts: 154
  • Karma: +5/-11
    • View Profile
Re: Cubian Video Kiosk with Mplayer on CB2
« Reply #29 on: April 18, 2014, 04:09:10 pm »
Try Arch or Gentoo.
binary distributions(Cubian & others) - can cause unpredictable errors.