Windows Watching Recordings in Windows with MythTv Player

From MythTV Official Wiki
Jump to: navigation, search

Time.png Outdated: This program does not support any recent versions of mythtv

Website

http://www.sudu.dk/mythtvplayer/ Link is broken

http://sourceforge.net/projects/mythtvplayer/ Only very old versions.

Author

Mikkel Bystrup Stensgaard

Contact at mythtvplayer at sudu.dk

Introduction

There are many ways to watch MythTV recordings on Windows (See also Play_Recordings_On_Windows). MythTv Player is the easiest so far to set up and use for streaming recordings over a local network. Over my home wireless 802.11g network, I am able to watch in progress recording from my Windows laptop in a different room.

MythTV Player also has its own forums, which are linked from its main page. Any feedback, bug/crash reports and feature requests should probably be directed there instead of the MythTV Mailing List.

Features

  • Connects to at MythTV backend and play recordings.
  • Plays MPEG-2,MPEG-4, transcoded recordings and High Definition (stereo and 5.1).
  • Support for MythTv version 0.18 to 0.25 (Protocol 15 to 69).
  • Fully independent, including all needed codecs.
  • Network buffering, including prebuffering and rebuffering on buffer underruns.
  • Simple GUI.
  • Fast startup and operation.
  • Commercials can be skipped, using the commercial marks from the backend. Including automatic skipping.
  • Bookmark support using MythTv bookmarks.
  • Deletion of recordings can be done directly from the player.
  • Download recordings and play recordings in external play if samba share's are configured

Prerequisites

If you have not already altered MYSQL on the Myth backend to allow for remote connections to the Myth DB, you will need to follow these simple instructions:

Troubleshooting:Unable to connect to the master backend server

Installing MythTV Player

[Download MythTv Player ] by selecting one of the version links on this page. I recommend the latest testing version (or the latest stable version 0.7). The link opens a zip file, so save it to your machine and open it with Winzip or use the windows option to open it with "compressed folder". You should extract the contents somewhere you can run it from, such as c:\mythtvplayer.

Edit Config file

When MythTV Player first starts it will ask you the IP address or hostname of your Myth backend machine. This is all the configuration you should need to use MythTV Player, and you can skip ahead to "Using MythTV Player". However if you have an older version, before 0.3.3, you will need to manually edit the config.xml file to set the IP address of the Myth backend machine.

Prior to version 0.3.3 you have to run the program once to generate the config file. Run MythTv Player and you will receive an error that the config file does not exist. Close the application and look in the install directory. You should now find config.xml. There is a readme here with complete instructions, you might want to look at that too.

Edit the config.xml with notepad and find the line

<HostName></HostName>

Change this line to include the name or IP of your MythTV backend. For example:

<HostName>192.168.1.123</HostName>

Other Options that are available in the config.xml file are as follows:

<AutoBookmark>: '1' and a bookmark is automatically set when recording is stopped.

<UseWindowsShare>: '1' and recordings are opened from windows share. '0' they are streamed using the MythTv protocol. Windows shares seems to be much faster.

<WindowsShare>: Point this to the windows share that contains the recordings.

<StreamBufferEnabled> '1' to enable stream buffer. The streambuffer is really only needed when streaming on wireless.

<DeleteRecordingsEnabled> '1' and recordings can be deleted from GUI. '0' to disable.

<SDLAdvancedVideoWindow>: Set to 1 to remove titlebar from window. It does not work on all graphics hardware.

<PreBufferingPercent>: Percentage of buffers to fill before starting to play when starting new recording or seeking.

<ReBufferingPercent>: Percentage of buffers to fill after a buffer underrun.

<NetbookGuiEnabled>: Set to 1 to enable a gui designed for netbook screens.

<CustomToken>: Set to 0 to disable. Get the corresponding token for your MythTV version from http://www.mythtv.org/wiki/Category:Myth_Protocol

<CustomProtocolVersion>:Set to 0 to disable. The protocol version that corresponds to the custom token.

Save the file and restart MythTV Player to accept any changes made.

Warning.png Warning: If defining a custom protocol version and token to use with unsupported, developmental versions of MythTV, make sure to check the above link to make sure the changes are sufficiently benign to not cause problems.

Using MythTV Player

When you open MythTv Player, you initially have two windows, one is for controlling, and the other is the resizable viewing window. I usually watch it in slightly less than full screen.

MythTvPlayer1a.jpg

To choose a recording, click the R button. This opens a 3rd window, showing your recordings on the Myth Backend so you can choose one to view.

MythTvPlayer2aa.jpg

When you click or select a recording a description, length, and other information about the recording is displayed. To play the selected recoding click the Play button. A dialog box will ask you if you want to Auto Skip commercials, you can answer yes or no. If you answer No, you can skip commercials manually (see below).

Resize the view window to your liking.

As of version 0.3.4, the delete button is now available. If pressed, it will delete the highlighted recording from the backend server.

The Status button on the control screen is helpful. It is the S button. There you can see the frames per second, dropped frames, and the buffer size and levels. The control has Play, Pause, forward and backward. The control window also shows the current position in the stream and the total recording length, and your throughput.


From Version 0.5.0 you can watch Live TV.

Screenshot mythtv 0 5 0.jpg

Supported MythTV Versions

Works With
0.21 0.22 0.23 0.24 0.25 0.26
Yes Yes Yes Yes Yes SVN

Keys

You can use several hotkeys while a recording is playing back:

  • (esc) quit
  • (P) to Play or Pause the recording
  • (F) to toggle between fullscreen/window
  • (A) Sets playback window to "Always on Top" mode
  • (Q) to go back to the prior commercial cut point
  • (Z) to go forward to the next commercial cut point
  • (L/R arrows) to navigate the recording (forward or back 2 minutes)
  • (spacebar) to set a bookmark at the current position
  • (W) Zooms in to a different Aspect Ratio
  • (1) Resize to 50%
  • (2) Resize to 100%
  • (3) Resize to 200%

If you saved a position in MythTV Player the Myth Frontend will also use that saved position and vice-versa.


Compiling from SVN

Manually

  • Install TortoiseSVN
  • Get the source using SVN - svn co https://mythtvplayer.svn.sourceforge.net/svnroot/mythtvplayer mythtvplayer
  • Download and install wxdevcpp_7.3.1_full_setup.exe, not newer versions and install with default settings. Do not change the default packages.
  • Navigate to your MythTv Player source directory and unzip the libs.zip folder in the same directory.
  • Open project libspark\Spark.dev. Compile it (Ctrl+F9)
  • Open project dev-cpp\MythTV Player.dev. Compile it (Ctrl+F9)
  • You now have a compiled version of MythTV Player in the releases folder.

Auto Builder Script

If you get stuck compiling, you can try this auto builder script. Just save all the text below in a .bat file and run. Hopefully 15 minutes later you will have MythTV Player compiled. This script presses keys on a timer, so remember not to move the mouse or press a key on the keyboard, even if it looks like it’s doing nothing or it may fail.


Script.png MythTV Player auto builder.bat

rem COMMENT gpl3
rem COMMENT mythtv player auto builder 1.0
rem COMMENT downloads and configures the ide and then compiles mythtv player
rem COMMENT tested on win7 32 and 64 bit, xp not supported
rem COMMENT http://www.mythtv.org/wiki?title=Windows_Watching_Recordings_in_Windows_with_MythTv_Player

echo off 

rem COMMENT  get admin rights if win 7
if exist "C:\Users\All Users\ntuser.dat" goto win7 (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo get admin privileges
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
    "%temp%\getadmin.vbs"
    exit /B
)
    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
)

rem COMMENT tell the user not to touch there computer
cls
echo "VERY IMPORTANT. This will take about 15 minutes, do NOT move the mouse or press any keys for 20 minutes even if you see messages pop up and stay on the screen for ages. Mythtv player WILL run when finished along with a finished message"
pause

rem COMMENT delete files from previous times

RMDIR /S /Q C:\mythtv_player\trunk
RMDIR /S /Q C:\mythtv_player\ide
RMDIR /S /Q  %USERPROFILE%\AppData\Roaming\Dev-Cpp\
DEL C:\mythtv_player\mythtvplayer-trunk.tar

cd C:/

md mythtv_player
cd mythtv_player

rem COMMENT download and install wget
if exist wget.exe (
    rem file exists
) else (
:dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
:dim bStrm: Set bStrm = createobject("Adodb.Stream")
:xHttp.Open "GET", "http://users.ugent.be/~bpuype/cgi-bin/fetch.pl?dl=wget/wget.exe", False
:xHttp.Send
:with bStrm
:    .type = 1 '//binary
:    .open
:    .write xHttp.responseBody
:    .savetofile "C:\mythtv_player\wget.exe", 2 '//overwrite
:end with


findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs 

)


if exist wget.exe (
    rem file exists
) else (
    cls
    echo "you did not download the file wget.exe into C:/mythtv_player"
    pause
    exit
)

rem COMMENT download wxdevcpp_7.3
if exist wxdevcpp_7.3.1_full_setup.exe (
    rem file exists
) else (
     wget.exe "http://sourceforge.net/projects/wxdsgn/files/wxDev-C++/Version 7/wxdevcpp_7.3.1_full_setup.exe?r=http%3A%2F%2Fwww.7-zip.org%2F&ts=1353925789&use_mirror=iweb"
)


rem COMMENT download and install 7zip
if exist 7z920.exe  (
    rem file exists
) else (
   wget "http://downloads.sourceforge.net/project/sevenzip/7-Zip/9.20/7z920.exe?r=http%3A%2F%2Fwww.7-zip.org%2F&ts=1353925789&use_mirror=iweb"
)

if exist 7z920.exe  (
    rem file exists
) else (
    cls
    echo "Failed: no file  7z920.exe  in C:/mythtv_player"
    pause
    exit
)

7z920.exe /S /D


rem COMMENT install wxdevcpp_7.3
if exist wxdevcpp_7.3.1_full_setup.exe (
    rem file exists
) else (
    cls
    echo "Failed: no file wxdevcpp_7.3.1_full_setup.exe in C:/mythtv_player"
    pause
    exit
)


rem COMMENT download and install 7zip
if exist "C:\Program Files (x86)\7-Zip\7z.exe" (
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\wxdevcpp_7.3.1_full_setup.exe -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\binutils.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\binutils -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\gcc-core.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\gcc-core -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\gcc-g++.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\gcc-g++ -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\binutils.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\binutils -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\make.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\make -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\mingw-runtime.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\mingw-runtime -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\wxdevcpp.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\wxdevcpp -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\win32api.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\ide\win32api -oC:\mythtv_player\ide -aoa
 ) else (
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\wxdevcpp_7.3.1_full_setup.exe -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\binutils.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\binutils -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\gcc-core.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\gcc-core -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\gcc-g++.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\gcc-g++ -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\binutils.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\binutils -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\make.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\make -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\mingw-runtime.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\mingw-runtime -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\wxdevcpp.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\wxdevcpp -oC:\mythtv_player\ide -aoa  
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\Packages\win32api.DevPak -oC:\mythtv_player\ide -aoa
  "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\ide\win32api -oC:\mythtv_player\ide -aoa 
 )

rem COMMENT clean up wxdevcpp install files
DEL C:\mythtv_player\ide\binutils
DEL C:\mythtv_player\ide\gcc-core
DEL C:\mythtv_player\ide\gcc-g++
DEL C:\mythtv_player\ide\make
DEL C:\mythtv_player\ide\mingw-runtime
DEL C:\mythtv_player\ide\wxdevcpp
DEL C:\mythtv_player\ide\win32api
p
RMDIR /S /Q C:\mythtv_player\ide\Packages


rem COMMENT download mythtv player source
if exist mythtvplayer-trunk.tar.gz (
    rem file exists
) else (
    wget -O "C:\mythtv_player\mythtvplayer-trunk.tar.gz" "http://mythtvplayer.svn.sourceforge.net/viewvc/mythtvplayer/trunk/?view=tar"
)

if exist mythtvplayer-trunk.tar.gz  (
    rem file exists
) else (
    cls
    echo "Failed: no file mythtvplayer-trunk.tar.gz  in C:/mythtv_player"
    pause
    exit
)

rem COMMENT unzip mythtv player source and libs
if exist "C:\Program Files (x86)\7-Zip\7z.exe" (
   "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\mythtvplayer-trunk.tar.gz -oc:\mythtv_player -aoa
   "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\mythtvplayer-trunk.tar -oc:\mythtv_player\trunk -aoa
   "C:\Program Files (x86)\7-Zip\7z.exe" x C:\mythtv_player\trunk\trunk\libs.zip -oc:\mythtv_player\trunk\trunk -aoa
 ) else (
   "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\mythtvplayer-trunk.tar.gz -oc:\mythtv_player -aoa
   "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\mythtvplayer-trunk.tar -oc:\mythtv_player\trunk -aoa
   "C:\Program Files\7-Zip\7z.exe" x C:\mythtv_player\trunk\trunk\libs.zip -oc:\mythtv_player\trunk\trunk -aoa
 )


rem COMMENT compile libspark
cls
echo "ide set up, compiling libspark"
start /B /MAX C:\mythtv_player\ide\devcpp.exe "C:\mythtv_player\trunk\trunk\libspark\Spark.dev"


PING 1.1.1.1 -n 1 -w 6000 >NUL

:Set WshShell = WScript.CreateObject("WScript.Shell")
:WshShell.Sendkeys "{ENTER}"
findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs

PING 1.1.1.1 -n 1 -w 1000 >NUL

:Set WshShell = WScript.CreateObject("WScript.Shell")
:WshShell.Sendkeys "{ENTER}"
findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs

PING 1.1.1.1 -n 1 -w 1000 >NUL

:Set WshShell = WScript.CreateObject("WScript.Shell")
:WshShell.Sendkeys "{ENTER}"
findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs

PING 1.1.1.1 -n 1 -w 230000 >NUL

:Set WshShell = WScript.CreateObject("WScript.Shell")
:WshShell.Sendkeys "{ENTER}"
findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs
echo "1"
PING 1.1.1.1 -n 1 -w 70000 >NUL
echo "2"
:Set WshShell = WScript.CreateObject("WScript.Shell")
:WshShell.Sendkeys "^{F11}"
findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs
echo "3"

PING 1.1.1.1 -n 1 -w 70000 >NUL
echo "4"
TASKKILL /F /IM devcpp.exe


rem COMMENT compile mythtv player
echo "compile mythtv player"
start /B /MAX C:\mythtv_player\ide\devcpp.exe "C:\mythtv_player\trunk\trunk\dev-cpp\MythTv Player.dev"


PING 1.1.1.1 -n 1 -w 70000 >NUL
:Set WshShell = WScript.CreateObject("WScript.Shell")
:WshShell.Sendkeys "^{F11}"
findstr "^:" "%~sf0">temp.vbs & cscript //nologo temp.vbs & del temp.vbs
PING 1.1.1.1 -n 1 -w 200000 >NUL
TASKKILL /F /IM devcpp.exe


rem COMMENT run mythtv player
start /B /MAX C:\mythtv_player\trunk\trunk\release\"MythTv Player.exe"
cls
echo "done! run mythtv player form C:\mythtv_player\trunk\trunk\release"
pause

Libraries

Package.png The player could not have been created without the following amazing libraries. A big applause goes to the developers of these.

  • Ffmpeg: http://ffmpeg.mplayerhq.hu/ Fmpeg is used for demuxing, audio and video decoding. It is included under the terms of the LGPL license. See 'lgpl.txt' in MythTV Player downloaded file.
  • Fltk: http://www.fltk.org/ Fast Light ToolKit 2 is used for the Graphical User Interface. It is included under the terms of the LGPL license. See 'lgpl.txt' in MythTV Player downloaded file.
  • SDL: http://www.libsdl.org/ Simple Directmedia Layer is used for image and audio handling. It is included under the terms of the LGPL license. See 'lgpl.txt' in MythTV Player downloaded file.
  • TinyXml: http://tinyxml.sourceforge.net/ The TinyXml library is used for the XML config file.
  • LibIntl: http://gnuwin32.sourceforge.net/packages/libintl.htm. Provides native language support