Help regarding TV-Server & FreeNAS

Status
Not open for further replies.

Hisma

Explorer
Joined
Mar 23, 2013
Messages
87
By the way, it's also a good idea to set up mythweb to manage recordings. Xbmc sucks for this, and it's also a pain to use x11 forwarding. Mythweb you can manage everything on a Web based front-end.

If anyone needs any help setting up myth backend or mythweb let me know. I've had both working for close to a year now. Recently upgraded mythweb to use latest Apache server.
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
Would appreciate some direction on how to get mythweb working, using X11 forwarding at the moment and it's not a pleasant experience.
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
You select your HDHomerun tuner from the list of capture card options while running mythtv-setup.

See, for example: https://help.ubuntu.com/community/HDHomeRun/MythTV

I have installed it and run the Mythtv-setup, but I keep getting the following error after following the setup guide: E HDHRSH(1319146A-0): DeviceSet(vchannel 1): ERROR: invalid virtual channel

Not sure what to do with this, Mythbackend sees my HDHomerun but gives this error when it starts. I read in another post that it may have something to do with the cable card, any advice?
 

Hisma

Explorer
Joined
Mar 23, 2013
Messages
87
Would appreciate some direction on how to get mythweb working, using X11 forwarding at the moment and it's not a pleasant experience.

Here is what I've got. I recently upgraded mythweb to be compatible with freenas 9.3... hopefully this is complete. if you run into snags let me know.


  1. Install the package
Code:
pkg install mythplugin-mythweb

pkg install apache24

pkg install php56

pkg install php56-extensions

pkg install mod_php5


from /usr/local/etc/ -

Code:
cp php.ini-production php.ini


2. set correct permissions -

* I think the mythweb installs to /usr/local/www/mythweb. If it doesn't, copy mythweb files to that directory.

then, from /usr/local/www

chown -R www mythweb

3. move the apache config file from the mythweb directory to the apache config directory.

Code:
mv /usr/local/www/mythweb/mythweb.conf.apache /usr/local/etc/apache24/extra/mythweb.conf


4.Edit /usr/local/etc/apache24/extra/mythweb.conf and changed the Directory paths to

Code:
"/usr/local/www/mythweb/data"
"/usr/local/www/mythweb"


5. Edit /usr/local/etc/apache24/httpd.conf and


append at end of file:

Code:
<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

DocumentRoot "/usr/local/www/mythweb"
<Directory /usr/local/www/mythweb>
    AllowOverride All
    Require all granted
    php_flag register_globals off
    Options Indexes FollowSymlinks
    <IfModule mod_dir.c>
        DirectoryIndex index.php
    </IfModule>
</Directory>

Include /usr/local/etc/apache24/extra/mythweb.conf

6. Start apache
Code:
# echo 'apache24_enable="YES"' >> /etc/rc.conf

# service apache24 start


Access the mythweb index page by typing the jail IP directly into your web browser.

http://<jail IP>

That's it.
 
Last edited:

Hisma

Explorer
Joined
Mar 23, 2013
Messages
87
Also, minor issue I ran into after getting mythweb working, my backend status link wasn't working. If it's not working for you, follow this -

Can't Check Backend Status in Mythweb

Warning at /usr/local/www/mythweb/modules/status/handler.php, line 32: !!NoTrans: file_get_contents(http://192.168.0.167:6667/Status/GetStatusHTML): failed to open stream: Connection refused!!

It is using the wrong status port. Not sure why it is using the wrong port, but first check the address:

http://<jail IP>:6544/Status/GetStatusHTML

If working, then edit the handler file.

Code:
edit /usr/local/www/mythweb/modules/status/handler.php


Line 15 defines the status port. Change it to

Code:
$statusport = 6544


This is a dirty fix, but it works.
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
Also, minor issue I ran into after getting mythweb working, my backend status link wasn't working. If it's not working for you, follow this -

Can't Check Backend Status in Mythweb

Warning at /usr/local/www/mythweb/modules/status/handler.php, line 32: !!NoTrans: file_get_contents(http://192.168.0.167:6667/Status/GetStatusHTML): failed to open stream: Connection refused!!

It is using the wrong status port. Not sure why it is using the wrong port, but first check the address:

http://<jail IP>:6544/Status/GetStatusHTML

If working, then edit the handler file.

Code:
edit /usr/local/www/mythweb/modules/status/handler.php


Line 15 defines the status port. Change it to

Code:
$statusport = 6544


This is a dirty fix, but it works.

Thanks Hisma for the guide, will try this out shortly...
 

nello

Patron
Joined
Dec 30, 2012
Messages
351

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
I'm getting multiple errors in mythweb.conf when attempting to start the apache server:

First - didn't like line 30 had to remove "-All" following Options command
Second - line 145, invalid command 'RewriteEngine'

any ideas?

Also, instead of mod_php5, I installed mod_php56, not sure if related with above, but given that php56 package is being installed it just made sense to match the versions...
 

Hisma

Explorer
Joined
Mar 23, 2013
Messages
87
Hxall, be careful, I think you need to install mod php 5, because when you try to install version 56, it will auto uninstall other packages without you realizing it. I had the same thinking as you, but after difficulties I was having, I paid attention to the pkg output when I installed the packages, and I guess mod56 is incompatible with some of the other required packages. I would run pkg install step again, make sure nothing important got removed, and then uninstall 56 and install 5.
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
Thanks Hisma, I got it working, all I had to do was uncomment a module referenced in httpd.conf and that allowed mod_rewrite to be active with apache. The mythweb seems to be working just fine, but I'm still testing the functionality.
 

Hisma

Explorer
Joined
Mar 23, 2013
Messages
87
Great! I couldn't remember all the steps honestly since I installed mythweb almost a year ago. The steps I showed are mostly what I followed when I decided to upgrade my mythtv jail to be compatible with freenas 9.3 using the latest apache, php, etc. So I might have done the mod_rewrite previously. I also swore I had issues with mod_php56, but again I did it a while ago, and since I didn't note it I was only guessing.

Anyway, glad you got it working. It's sort of a pain to figure out yourself, but if you know what steps to follow it's maybe a 10 minute process start to finish.
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
Has anyone gotten streaming via Mythweb working? I've played around with it a bit and all I get is:

Not Found
The requested URL /mythweb.pl/pl/stream/1339/1427072400.asx was not found on this server.

When I look in the documents folder (/usr/local/www/mythweb/data) I don't see a recorded video subfolder, there is one for cache and and one for tv_icons, I believe a symlink is needed but not sure where to point it to...

Any suggestions?
 
Last edited:

Hisma

Explorer
Joined
Mar 23, 2013
Messages
87
I could not get it to work either. I am convinced it is a problem with perl, because when you direct your browser to /mythweb.pl, it does not parse the script... it only displays the code.

I tried numerous ways to figure out why perl scripts weren't working with mythweb, but I gave up after a few hours. If anyone manages to get it working, let us know.
 

JR Gonzalez

Explorer
Joined
Aug 29, 2014
Messages
64
You probably need helpers in your config for whatever web server you're using. Although. I believe newer versions of mythtv have an internal web interface nowadays. Not sure though, you'd have to check with the mythtv guys.
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
Made some progress, you need to uncomment the cgi handler in httpd.conf, search for the following and remove the # from LoadModule cgi_module

<IfModule mpm_prefork_module>
LoadModule cgi_module libexec/apache24/mod_cgi.so
</IfModule>

Once you do this, the file will download as an mpg, so downloads are now working. Still working on streaming, I go get the file but the browser asks what to do with the *.asx file... probably have to play with the file type and handlers, but getting closer to fully functioning mythweb functionality.
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
By the way when the *.asx file comes up the browser asks for what app to open to play the video, if I select VLC the recording plays just fine. I guess what's needed is configuring the browser to open VLC automatically when the *.asx file is openned... if this is the case, then probably won't work with apple devices?
 

Hisma

Explorer
Joined
Mar 23, 2013
Messages
87
Nice going dude. I'll try what you said and see if it works for me
 

Nindustries

Patron
Joined
Jun 12, 2013
Messages
269
Do note that the 'safest/easiest' way atm would be running the phpVirtualbox jail and run linux in a VM with the DVR of your choice with a network tuner.
If you really need oscam or a key reader, USB1 passthrough should be possible. (Not USB2, but you don't need the performance anyway, I checked with a tvHeadend dev.)
 

hxall

Dabbler
Joined
Dec 1, 2013
Messages
15
Has anyone experienced some distortion in their recordings in fast moving scenes, I know HDHomerun Prime is working fine as I don't see the distortion when using the hdhomerun_viewer app. Only see the distortion after viewing recordings from mythtv, any suggestions?
 
Status
Not open for further replies.
Top