Using the MediaMVP with Freevo


In my setup I run Freevo to do all my recording, this results in all my media files being on a Linux system - however the MediaMVP server side software needs to run on Windows 2000 or XP. This means that in order for the MVP to play the recorded files it needs to be able to access the files on the Linux system.

Samba provides a mechanism for Linux systems to make their files available to Windows machines. I'm not going to describe how to install Samba here, since if you are a Linux user you can probably figure that out for yourself. However the configuration is a little more complex than might at first seem necessary.

Basic configuration to access files on a Linux samba share

First, you need to create a share for the directory in the Linux system which you are making available for Windows machines to access. Here's an extract from my smb.conf file

[video]
    comment = Video
    path = /home/media/video
    writeable = yes
    guest ok = yes
    mangled names = yes

The default for 'mangled names' is 'yes', but I've included it here to make sure the right value is used by anybody who copies this configuration and also to ensure that it overrides any configuration setting in the [global] section.

You also need to ensure that the folder you are sharing out has global read privileges, so something like

    chmod -R 755 /home/media

would ensure that the /home/media/video folder is globally readable.

The next step is to configure the MVP software on the Win2K or WinXP machine. There are two important rules here

#1 - You must use UNC format (\\hostname\sharename) to access the Samba share on the Linux system, do NOT use a drive map (this is a recommendation from somebody at Hauppauge)

#2 - You must set the login under which the MVP services run to be the same as a login which has privileges to manipulate the desktop and access the files on the Samba share. We are talking Windows privileges here and not Linux privileges. Typically you can set these services to run as an Admin account to achieve the required result.

 

Configuration of MediaMVP Services to access files located on other PC's connected to the network

1. Stop the MediaMVP services.  Click on Start, Programs (or All Programs), Hauppauge MediaMVP, and then Stop.

2. Locate the My Computer icon on your desktop or in your Start menu.  Right mouse button click on the My Computer icon and select Manage from the drop down menu.  Click on the “+” sign next to the Services and Applications listing and then click on the Services sublisting.

3. Locate and right mouse button click on the name MVPMedia and select Properties from the drop down menu.

4. Click on the Log On tab and then select the radio button that says This account.

5. Type in the username that has permissions to access the network and the local desktop, basically the user that has administrator rights to the computer. Once you have entered the username type in the password for that username and then confirm the password.

6.  Click on the Apply button and then the OK button.

7.  You will need to repeat Steps 3 thru 6 for the MVPMediaSvc service.

8.  Once you have completed these steps for both services click on the listing for Local Users and Groups.

9.  Select the Users folder.

10.  Right mouse button click on the username that you used for the MediaMVP services in the above steps and click on Properties from the drop down menu.  Put a check mark in the system next to Password never expires, then click on Apply and then Okay.

11. Restart the MediaMVP services.  Click on Start, Programs (or All Programs), Hauppauge MediaMVP, and then Restart.

12.  Once the services have restarted you can now search for media on other PCs on the network that your username has access to. Click on Start, Programs (or All Programs), Hauppauge MediaMVP, and then Search for Media

The quickest way to get to the samba share is to simply type in the UNC for the share name (\\hostname\sharename).

Alternatively the long-winded process is to Click on the button with the three dots (Browse), then select My Network Places, Entire Network, Microsoft Windows Network, select the required computer name and then the desired share name.

13. You will now be in the Select Directory window in which you can browse to the different directory on your system and other PCs on the network.

At this point any version of MVP software should be capable of  browsing the media files on the Linux system but it may not be possible to play them if they were created by an application running on the Linux system. This is for the reasons discussed below.

 

MediaMVP Compatibility with Freevo Recording Filenames

There was apparently a change made to the manner in which the MVP software passes filenames. In version 21278 long filenames are passed to the MVP services when a file is to be played. This is shown below in a extract of the log file hcwsmslog which is found in the C:\Program Files\Hauppauge MediaMVP\hardware directory.

Mon Jan 19 22:17:24 2004::00::Streaming Server To Play Media: \\wallace\video\Everybody_Loves_Raymond_-_The_Contractor_01-19_2100.mpg
Mon Jan 19 22:17:24 2004::00::_scan_seqhdr: searching Video SeqHdr...
Mon Jan 19 22:17:24 2004::00::Detected Video Sequence Header:
Sequence Startcode = 0x000001B3
Horizon Res.: 640
VerticalRes.: 480
AspectRatio: 1
PicRate: 4
BitRate: 262143
Mon Jan 19 22:17:24 2004::00::_scan_seqhdr: scan SeqHdr OK

And here's a log extract when trying to play the same file running version 22012 which resulted in a 'no media file found' error

Tue Jan 20 18:54:50 2004::00::smdb_flush: 2 records
Tue Jan 20 19:02:21 2004::00::open stream: \\wallace\video\EVERYBODY_LO failed

It appears that anything after 21278 only allows filenames of max 12 chars and that when accessing files local to the Windows server it uses 8.3 filenames such as this

Tue Jan 20 18:54:04 2004::00::Streaming Server To Play Media: C:\MYVIDE~1\LIZZIE~1.MPG
Tue Jan 20 18:54:04 2004::00::_scan_seqhdr: searching Video SeqHdr...

When the 'name mangling' option is set to yes in smb.conf, Samba creates a mangled short filename together with the long filenames for any files which are created via the Samba share. This permits windows applications which need to use the short filename to access the files. A problem arises when an application running on the Linux system creates a native file in the folder which is being shared using Samba. The short filename is not created, hence since the MVP software is tying to use the short filename to access a file on the samba share, it is unable to find the file and a 'no media file found' error is displayed.

Fortunately there is a workaround for this issue. If the application writes the file to a samba share of the required directory and not to the directory directly, then the short filename will be created and MVP will happily play Freevo recordings. This requires a rather 'kluged' configuration, but it does work. The required steps are:-

Create another mountpoint /mnt/kluge on the linux system that runs Freevo and does the recording

    mkdir /mnt/kluge

Mount it as an smb filesystem, using the samba share for the directory which Freevo recordings are made in

     mnt -t smbfs //<hostname>/<sharename>  /mnt/kluge

Modify the Freevo configuration to change the variable DIR_RECORD in /etc/freevo/local_conf.py so that it saves recordings in /mnt/kluge

     DIR_RECORD = '/mnt/kluge'

 

Changing the format of Freevo recording filenames

This is a related topic. The default filename format for Freevo recording places a ":" in the filename which can cause some problems accessing files using a windows machine. The solution is to reformat the filename - I did this to no only eliminate the ":" character but also to change the format to be more like that of recordings done with Beyond TV

The filename format is defined by the variable TV_RECORDFILE_MASK which is found in freevo_config.py, NOT in /etc/freevo/local_conf.py

Here's the default filename definition

    TV_RECORDFILE_MASK = '%%m-%%d %%H:%%M %(progname)s - %(title)s'

And here's the modified version I am using

    TV_RECORDFILE_MASK = '%(progname)s-(%(title)s) %%Y-%%m-%%d'

Now when Freevo writes a file it is given the long filename supplied by Freevo and the samba file name mangling produces the short filename which the later versions of MVP code use.

The time elements can include any of the strftime formatting codes which are listed below:

Code Meaning Code Meaning
%a Abbreviated weekday name %A Full weekday name
%b Abbreviated month name %B Full month name
%c Locale-specific date and time representation %d Day of a month as a decimal number (01 – 31)
%H Hour in the 24-hour format (00 – 23) %I Hour in the 12-hour format (01 – 12)
%j Day of year as decimal number (001 – 366) %m Month as a decimal number (01 – 12)
%M Minute as decimal number (00 – 59) %p Current locale’s A.M./P.M. indicator for the 12-hour clock
%S Second as decimal number (00 – 59) %U Week of the year as decimal number, with Sunday as the first day of the week (00 – 53)
%w Weekday as decimal number (0 – 6; Sunday is 0) %W Week of year as decimal number, with Monday as the first day of the week (00 – 53)
%x Date representation for the current locale %X Time representation for the current locale
%y Year without century, as a decimal number (00 – 99) %Y Year with century, as a decimal number
%z, %Z Time zone name or abbreviation; no characters if the time zone is unknown %% Percent sign

The # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows.

 

Code Meaning
%#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#% # flag is ignored.
%#c Long date and time representation, appropriate for the current locale. For example: “Tuesday, March 14, 1995, 12:41:29”.
%#x Long date representation, appropriate for the current locale. For example: “Tuesday, March 14, 1995”.
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y Remove leading zeros (if any).

All information is presented 'as-is', this worked for me but your mileage may vary..
Last updated 03/06/2005 09:12 PM