Implemented by : Hastur, Cyclops

Back end

  • Record and playback on DVB-T
  • DVB-T (Freeview)
  • Simultaneous record and playback
  • Media sharing

Hardware

Back-end


Operating Systems


Data Partitioning

  • Separate metadata and library trees allows some clients to collect metadata

Single Volume

  • Each MEDIATYPE has separate library and metadata trees
  • Data trees are grouped for export using "bind" mounts
  • Matches nfs export concept

Logical Volumes Option

  • Each MEDIATYPE has a logical volume, lv-MEDIATYPE
  • Each lv-MEDIATYPE has separate library and metadata trees
  • Trees are grouped for export using normal mounts
  • Requires a resizeable filesystem (i.e. not XFS)

File Permissions

  • Requires ACLs

Users

| media-centre | Default owner | rw all media | ||

Groups

Group Role Permissions
mc-music Plays music ro music lib
mc-videos Plays videos ro video lib
mc-movies Plays movies ro movies lib
mc-photos Shows photos ro photos lib
mc-tv Plays recordings ro recordings
mc-games Plays games ro game roms lib
mcadm-music Manages music rw music library
mcadm-videos Manages videos rw video library
mcadm-movies Manages movies rw movie library
mcadm-photos Manages photos rw photo library
mcadm-tv Manages recordings rw recordings
mcadm-games Manages games rw game roms lib
  • All media files have owner permissions "rwx"
  • All media files have group (ACL mask) permissions "rwx"
  • All media files have other permissions "---|"
  • All MEDIATYPE files have named group "mcadm-MEDIATYPE" permissions "rw-"
  • All MEDIATYPE files have named group "mc-MEDIATYPE" permissions "r--"
  • All MEDIATYPE directories have default ACLs reflecting the above permissions

Example Configuration

/etc/passwd

media-centrex3000:3000:Media Centre:/nonexistent:/usr/sbin/nologin

Example /etc/group

mc-moviesx3003:mythtv,mediatomb,admin1,user1
mc-musicx3001:mythtv,mediatomb,mpd,admin1,user1
mc-photosx3007:mythtv,admin1,user1
mc-tvx3009:mythtv,mediatomb,admin1,user1
mc-videosx3002:mediatomb,admin1,user1
mcadm-moviesx3006:,admin1
mcadm-musicx3004:mpd,admin1
mcadm-photosx3008:,admin1
mcadm-tvx3010:,admin1
mcadm-videosx3005:,admin1
mc-usersx3011:admin1,user1

Example ACL (getfacl /mnt/media/movies)

# file: library
# owner: media-centre
# group: mcadm-movies
user::rwx
group::---
group:mc-movies:r-x
group:mcadm-movies:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:mc-movies:r-x
default:group:mcadm-movies:rwx
defaultmask:rwx
default:other::---

User Contributed Files

  • All users have a $user/shared-media directory with write permission
  • $user/shared-media ACLs allow access by mediasys groups
  • mediasys/users/$user is a symlink to $user/shared-media
  • CIFS requires wide links = yes for the mediasys share.
  • Not compatible with NFS.

Data Export

  • A single shared tree for mediasys
  • Each MEDIATYPE library and metadata directory is mapped into the single tree.
  • Shares per MEDIATYPE writeable by the admin group for that MEDIATYPE.

Example fstab

/etc/fstab

# Media mounts
/dev/vg-media/home        /home   ext4    defaults,noatime,nosuid,noauto,acl      0       0
/dev/vg-media/media       /mnt/media  ext4    defaults,noatime,nosuid,noauto,acl      0       0
# Export mounts
/mnt/media/movies/library /export/mediasys/movies/library none bind,noauto    0       0
/mnt/media/movies/metadata /export/mediasys/movies/meta none bind,noauto      0       0
/mnt/media/music/library /export/mediasys/music/library none bind,noauto      0       0
/mnt/media/music/metadata /export/mediasys/music/meta none bind,noauto        0       0
/mnt/media/tvshows/library /export/mediasys/tvshows/library none bind,noauto  0       0
/mnt/media/tvshows/metadata /export/mediasys/tvshows/meta none bind,noauto    0       0
/mnt/media/recordings /export/mediasys/recordings none bind,noauto    0       0
/mnt/media/photos/library /export/mediasys/photos/library none bind,noauto    0       0
/mnt/media/photos/metadata /export/mediasys/photos/meta none bind,noauto      0       0

Samba/CIFS

  • Requires username/password

Example Configuration

/etc/smb.conf

[mediasys]
   path=/export/mediasys
   browseable = yes
   writable = yes
   mangled names = no
   follow symlinks = yes # for per-user shared-media
   wide links = yes  # for per-user shared-media
   valid users = mythtv,@mc-users

[homes]
   path=/home/%S
   comment = Home Directories
   browseable = no
   writable = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S
   mangled names = no

# Administrative shares - not browseable by default
[movies]
   path=/mnt/media/movies
   browseable = no
   writable = yes
   mangled names = no
   valid users = @mcadm-movies

...

NFS

Read-only Exports (without security)

/etc/exports

/export/mediasys  192.168.0.0/24(ro,fsid=0,sync,no_subtree_check)
/export/mediasys/movies/library   192.168.0.0/24(ro,nohide,sync,no_subtree_check)
/export/mediasys/movies/meta      192.168.0.0/24(ro,nohide,sync,no_subtree_check)
/export/mediasys/tvshows/library  192.168.0.0/24(ro,nohide,sync,no_subtree_check)
/export/mediasys/tvshows/meta     192.168.0.0/24(ro,nohide,sync,no_subtree_check)
/export/mediasys/music/library    192.168.0.0/24(ro,nohide,sync,no_subtree_check)
/export/mediasys/music/meta       192.168.0.0/24(ro,nohide,sync,no_subtree_check)
/export/mediasys/photos/library   192.168.0.0/24(ro,nohide,sync,no_subtree_check)
/export/mediasys/photos/meta      192.168.0.0/24(ro,nohide,sync,no_subtree_check)

Permissions fixes for NFSv3

/export/mediasys 192.168.0.0/24(ro,fsid=0,sync,no_subtree_check,all_squash,anongid=3000)
/export/mediasys/movies/library 192.168.0.0/24(ro,nohide,sync,no_subtree_check,anongid=3003)
...

mount -t nfs4 -o ro media: /mnt/media

$[Get Code]9


Capture Cards

Linux Chipset Support

ivtv Driver supported hardware

  • CX23415
  • CX23416

DVB-T

| Card | HD | SD tuners | DVB-T tuners | Price | Notes | || | Nova-T-PCI | Yes | | 1 | £28 Ebuyer | Supported | | Nova-T-500 | Yes | | 2 | £55 Ebuyer | USB bridge device; not fully supported | | Pinnacle PCTV DVB-T Pro PCI | No | | 2 | £56 scan | No support | | DViCO FusionHDTV Dual Digital | Yes | | 2 |   |   | | AverTV DVB-T A771 |   |   |   | £35 SpecialTech |   | | AverTV DVB-T A777 | Yes | | 1 | Supplier?? | Replaces A771 | | TerraTec Cinergy 2400i PCI-E |   | | 2 |   | No support yet | | Compro VideoMate DVB-T200 PCI | Yes | | 1 |   |   |


CAMs


DVD Encoding

Profiles

High Quality Compressed

  • H.264 video
  • AC3 audio
  • mp4 container
  • ~2GB

High Quality Raw

  • MPEG2
  • AC3 audio
  • VOB
  • ~9GB

Notes

  • Hardware or software encoding?
    • Hard enc more expensive, Soft enc needs more powerful CPU
      • No encoder needed, DVB-T is MPEG2. MPEG2->MPEG4 needed anyway
  • Does a software encoder require encoding to MPEG2?
    • Yes, or some other codec
  • Can a software encoder encode to something else in Realtime?
    • DivX, Xvid, H.264 check processor requirements
  • MPEG-4 encoders
    • Hauppauge HVR-4000 does H.264
  • Front end may need up to 1GB RAM to store MythTV UI elements for 1080p displays
  • VIA UniChromePro graphics may eventually be capable of H.264 acceleration with XvMC
  • VIA & nVidia cards can accelerate decoding of MPEG2