Skip to content

Instantly share code, notes, and snippets.

@malarzm
Last active February 9, 2017 14:38
Show Gist options
  • Save malarzm/571037ae1ee6bffabade6770376ba035 to your computer and use it in GitHub Desktop.
Save malarzm/571037ae1ee6bffabade6770376ba035 to your computer and use it in GitHub Desktop.
Raspberry Pi: VLC and Samba

Background

After finding amazing VLC Remote app (and being sick) I decided to build a "Movie Center" out of Raspberry Pi. Main objectives were:

  • Make my laptop usable while watching movies on TV
  • Usable by a non-tech person (even after unexpected reboot one can turn on mobile app and play a movie)
  • Serves as a shared network disk (for Windows computers)

Configure PI

Used PIXEL image. Beside setting hostname and password turn on SSH (and VNC) for remote access.

Install VLC

The most painful thing to do as VLC installed with apt-get install vlc will choke on basically anything.

https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=59814&hilit=vlc

Additionally adjust following settings (NSIN = not sure if needed):

  • [Audio] Output device: bcm2835 ALSA Direct hardware device without any conversions
  • Demux module: Avformat demuxer
  • Stream output muxer caching: 10000 [NSIN]
  • File caching: 5000

[Audio] Output device works for me as Pi is plugged in to Denon AVR, guess it may differ when plugged to TV directly.

Settings not mentioned in the original tutorial are to make rewind/forward work (otherwise they were freezing on a frame with audio going on). Worked fine for me with 1080p movie, file cache may be increased further if pixelated-few-colours frames are showing up too often.

Autostart VLC

~/.config/autostart/autovlc.desktop :

[Desktop Entry]
Type=Application
Exec=vlc

Samba

For NTFS rw: apt-get install ntfs-3g and remount disk.

In [global] section change:

  • workgroup = WORKGROUP
  • wins support = yes

Some of settings in my share config may be superfluous, haven't tidied up after experimenting and trying to make it work

[Movies]
   comment=Movies
   path=/media/pi/movies
   browseable=Yes
   read only=no
   writeable=Yes
   only guest=no
   guest ok=Yes
   create mask=0777
   directory mask=0777
   public=Yes
   force user=pi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment