SageTV Community

SageTV Community (http://forums.sagetv.com/forums/index.php)
-   Hardware Support (http://forums.sagetv.com/forums/forumdisplay.php?f=9)
-   -   PrimeNetEncoder - HDHomeRun Prime Network Encoder (http://forums.sagetv.com/forums/showthread.php?t=62055)

Fuzzy 11-28-2015 01:30 PM

PNE does launch other programs. ffmpeg and hdhomerun_config both are used for the recording. You really should not be ( or have to be) running either sage or pne as superuser.

SageWizdom 11-28-2015 05:56 PM

Instructions Question
 
Hi,
I've been working on repeatably setting up Sage 9 on Linux. As I'm working through using PNE, I have identified something that is in the original documentation, but not in the current.

Instructions Update:
In the original v1.0.0 instructions, you had text to copy into the sage.properties file, that helped sage find and use the network encoder. Without this text, I could not find a way to get sage to find PNE. I could not find anything in the PNE install guide other than a statement to install network tuners. If there are other instructions somewhere, a link would be great, but after multiple searches and tries, I could not find another way. Thoughts, suggestions appreciated.

SageWizdom 11-28-2015 06:05 PM

sudo vs chmod
 
Quote:

Originally Posted by dranockcir (Post 581082)
I have tried with mediaserver enabled and disabled. Looks like both ways the file is owned by root. Have to run sage with sudo, sagecore won't start if I don't so I ran PNE with sudo, still no luck. I do notice that when I use system monitor (like windows task manager) it shows a Java process that is being run by my user, if I kill it it closes PNE, that's strange since I started it with sudo, is it possible that PNE is starting something, after it starts, as the current user and that's what doesn't have permission?

I've been running sage using sudo as well. I just spent a few minutes chasing this down. Since you mentioned sudo, I'm going to assume your at least semi-comfortable in unix. I did a recursive chown in the sagetv directory for my user and group ( sudo chown -R user:group *).

When I re-ran startsage, I got an error related to startsagecore line 47: /var/run/sagetv.pid. On my system this directory is owned by root and so startsagecore can not create the sagetv.pid file unless a) run with sudo or b) if I chmod the directory to allow everyone read/write access. (sudo chmod a+w /var/run)

Are there any thoughts from the crowd on the recommended option? I did the chmod and sage is now running as non sudo.

SageWizdom 11-28-2015 06:23 PM

I should clarify... I may not be triggering network detection correctly. I could not find any clear process of steps that would allow me to find the hardware other than adding the commands. If there are some steps someone could share, I am definitely on board.

Thanks.

SageWizdom 11-28-2015 07:03 PM

Possible Bug Report
 
Possible Bug Report
While I may have managed to get the network detection to work (no idea what I did differently), it keeps configuring the "encoder_host=172.0.1.1" which is not a valid ip. should this be 172.0.0.1. Also the logs for PrimeNetEncoder (PNE) show

Code:

11/27/2015 22:40:09 - Setting local IP address to: 127.0.1.1
11/27/2015 22:40:09 - Starting encoder thread: 192.168.1.176-0

Sniffing the connection between PNE and the HDHomeRun, it sets the encoder target as 127.0.1.1, which I believe means PNE is telling the HDHomeRun to send the video stream to this non valid address. Is there any way to set/change this? It does not appear to be in the PrimeNetEncoder.properties file or anywhere else I can find. If this is pulled from my local machine (possibly a mis-configuration somewhere else) can you tell me which file it is pulling from, or what command it is running to look for this?

Thanks.

Fuzzy 11-28-2015 11:25 PM

Quote:

Originally Posted by SageWizdom (Post 581113)
I should clarify... I may not be triggering network detection correctly. I could not find any clear process of steps that would allow me to find the hardware other than adding the commands. If there are some steps someone could share, I am definitely on board.

Thanks.

All you should have to do is have discovery turned on in the sage.properties, and have PNE running when sage starts. It will send out a broadcast packet, and PNE will respond. Sage will then ask PNE for it's PROPERTIES, and PNE will respond, and sage will store those properties in the sage.properties file. If it is not working, then either:
1 - Sage's network encoder discovery is not enabled in sage.properties, so it never sends out the broadcast
2 - PNE is not running when sage is started, so it doesn't respond to the broadcast.
3 - There is a firewall preventing the broadcasts and/or responses from getting between the two services.

SageWizdom 11-29-2015 07:33 PM

Quote:

Originally Posted by SageWizdom (Post 581114)
Possible Bug Report - FIXED
Code:

11/27/2015 22:40:09 - Setting local IP address to: 127.0.1.1

So I was chasing this log entry further, and looking through the code, it appears that the following code is being used to set the local host ip address.

Code:

InetAddress.getLocalHost().getHostAddress();
In Java on Linux, this appears to simply look in the /etc/hosts file for the local host name, and return the associated IP. In Ubuntu, the installer apparently adds an entry that is 127.0.1.1 which is a loop back but a unique entry, if it thinks your computer does not have a static ip address (my box originally loaded as DHCP). Per the below link, the static IP should appear here, but this is apparently some magic you just have to know (and I will have to add to the install walkthrough). I will change this and go back and try again and post my results. I don't know if it would be worth your while in a future version to pull this IP and set it in the PrimeNetworkEncoder.properties file as he default, but allow a user to change it if desired.

Thanks!

Some reference as to why:
http://www.debian.org/doc/manuals/de...ame_resolution

Related Bug Report:
https://bugs.debian.org/cgi-bin/bugr...cgi?bug=719621

dranockcir 11-30-2015 10:44 AM

Quote:

Originally Posted by SageWizdom (Post 581112)
I've been running sage using sudo as well. I just spent a few minutes chasing this down. Since you mentioned sudo, I'm going to assume your at least semi-comfortable in unix. I did a recursive chown in the sagetv directory for my user and group ( sudo chown -R user:group *).

When I re-ran startsage, I got an error related to startsagecore line 47: /var/run/sagetv.pid. On my system this directory is owned by root and so startsagecore can not create the sagetv.pid file unless a) run with sudo or b) if I chmod the directory to allow everyone read/write access. (sudo chmod a+w /var/run)

Are there any thoughts from the crowd on the recommended option? I did the chmod and sage is now running as non sudo.

I've tried everything I can think of and read about. I've even reloaded the server from scratch. I have gotten Sage to run as my user and the .ts file it writes belongs to me instead of root but I still can't get PNE to work with my Prime and Sage setup. :) Thanks for all the suggestions everybody. I'll keep an eye here to see what develops. :)

SageWizdom 12-01-2015 08:23 PM

Quote:

Originally Posted by dranockcir (Post 581174)
I've tried everything I can think of and read about. I've even reloaded the server from scratch. I have gotten Sage to run as my user and the .ts file it writes belongs to me instead of root but I still can't get PNE to work with my Prime and Sage setup. :) Thanks for all the suggestions everybody. I'll keep an eye here to see what develops. :)

I dont know if I saw your whole thread, but feel free to hit me up and I'll see if I can help you troubleshoot. Feel free to pm me with what your problem is and what you've tried. I've now gotten the whole install to work, and I'm in the middle of writing it up. There will hopefully be a (draft) post up some time tonight. See if any of those make sense. I've had to do a lot of firewall port opening.

dranockcir 12-01-2015 09:00 PM

Quote:

Originally Posted by SageWizdom (Post 581259)
I dont know if I saw your whole thread, but feel free to hit me up and I'll see if I can help you troubleshoot. Feel free to pm me with what your problem is and what you've tried. I've now gotten the whole install to work, and I'm in the middle of writing it up. There will hopefully be a (draft) post up some time tonight. See if any of those make sense. I've had to do a lot of firewall port opening.


Awesome, I'll try your write up and let ya know how it goes. Thanks for the docs you’ve already done too. :)

weeber 12-03-2015 07:17 PM

Comcast H264
 
The past week or so, I've finally noticed Comcast starting to broadcast in h264 like they promised to do several months ago (Atlanta area). Good news... PNE 1.2.5 and HDHR Prime both seem to handle the streams without issue.

I've seen it being used on Comedy Central, FXX, and AMC. And Comcast is really making use h264. 1-hr episodes of the Walking Dead were 5.2 GB w/MPEG-2 are now 1.9 GB w/h264. I'm a little concerned Comcast may be taking things a little too far with the compression, but quality seems pretty good (maybe a little softer).

Anyways, no need to worry about capturing h264 streams on Comcast.

Fuzzy 12-03-2015 07:45 PM

Wish Charter would do the same. I miss the direct h.264 streams I used to get from Dish Network.

uberpixel 12-04-2015 09:23 AM

Quote:

Originally Posted by weeber (Post 581362)
The past week or so, I've finally noticed Comcast starting to broadcast in h264 like they promised to do several months ago (Atlanta area). Good news... PNE 1.2.5 and HDHR Prime both seem to handle the streams without issue.

I've seen it being used on Comedy Central, FXX, and AMC. And Comcast is really making use h264. 1-hr episodes of the Walking Dead were 5.2 GB w/MPEG-2 are now 1.9 GB w/h264. I'm a little concerned Comcast may be taking things a little too far with the compression, but quality seems pretty good (maybe a little softer).

Anyways, no need to worry about capturing h264 streams on Comcast.

How can you tell which format is being broadcast? Do you need to check the Recording Info page one at a time for the format of each channel or is there some way to scan all the channels quickly? I know Comcast was planning the same changeover here (Portland, OR) and I'm curious to see if they've started.

-uberpixel

weeber 12-04-2015 12:06 PM

The only way I've seen is to check the Recording Info page for recording. When it's converted you'll see:

Format: MPEG2-TS[H.264 16:9 1080i@29.97fps...]

I guess the container format is still mpeg2-ts but it has a H.264 video stream instead of the standard MPEG2-Video. I think Comcast is slowly switching over channels, so far I've only seen it on the above mentioned channels and Palladia. Other cable channels like TNT, USA, ESPN are still MPEG2.

Quote:

Originally Posted by uberpixel (Post 581387)
How can you tell which format is being broadcast? Do you need to check the Recording Info page one at a time for the format of each channel or is there some way to scan all the channels quickly? I know Comcast was planning the same changeover here (Portland, OR) and I'm curious to see if they've started.

-uberpixel


Tiki 12-04-2015 12:13 PM

Quote:

Originally Posted by weeber (Post 581393)
The only way I've seen is to check the Recording Info page for recording. When it's converted you'll see:

Format: MPEG2-TS[H.264 16:9 1080i@29.97fps...]

I guess the container format is still mpeg2-ts but it has a H.264 video stream instead of the standard MPEG2-Video

Right - the container and file extension (.ts or whatever) is determined by your capture device or network encoder (PNE or whatever), as that's what's creating the file on your computer.

dranockcir 12-04-2015 09:19 PM

Quote:

Originally Posted by SageWizdom (Post 581259)
I dont know if I saw your whole thread, but feel free to hit me up and I'll see if I can help you troubleshoot. Feel free to pm me with what your problem is and what you've tried. I've now gotten the whole install to work, and I'm in the middle of writing it up. There will hopefully be a (draft) post up some time tonight. See if any of those make sense. I've had to do a lot of firewall port opening.

Ok I got it working, I used SageWisdom's guides (thank you) and I do believe why I had problems and what was relevant in SageWisdom's docs was the setting of a static IP on the Sage server and putting it in the /etc/hosts file. I tried stepping along to see what fixed it, yep I got it working then reloaded and did it again, this time I have Ubuntu 15.10 64 bit.

The only problem I have now is no audio, video only, on computer clients, I do have video and audio on stuckless's Android Mini Client though but not the computer clients, both running Ubuntu and both able to connect and play files fine from my Windows Sage (ver 7) server but not my new Ubuntu Sage (ver 9) server with PNE and the HDHR Prime.

SageWizdom 12-05-2015 08:16 AM

Quote:

Originally Posted by dranockcir (Post 581411)
The only problem I have now is no audio, video only, on computer clients,

I have this same problem on the new client and I've found some log info I think is related, but I'm not sure where to fix it.



When I play the video directly with mplayer (included in the sageclient directory), I get this in the output...
Code:

Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
When I play the same video in the sage client, mplayer outputs
Code:

Forced video codec: ffmpeg12
...
Selected video codec: [ffmpeg12] vfm: ffmpeg (FFmpeg MPEG-1/2)
...
(afm=liba52) not available.
...
(afm=libac3) not available.
...
(afm=hwac3) not available.

stuckless:
Do you know if the sageclient is forcing any sort of codec use when it calls mplayer? the key difference to me appears to be the use of the ffmpeg12 codec instead of the ffmpeg2 codec. If I can find some free time, I may try and take a look.... any suggestions of where to start are of course welcome.




mplayer full output
Code:

libavformat version 54.20.4 (external)
Mismatching header version 54.20.3
TS file format detected.
VIDEO MPEG2(pid=256) AUDIO A52(pid=257) NO SUBS (yet)!  PROGRAM N. 1
VIDEO:  MPEG2  528x480  (aspect 3)  29.970 fps  3170.0 kbps (396.2 kbyte/s)
Load subtitles in /var/media/tv/
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.35.0 (external)
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 192.0 kbit/6.25% (ratio: 24000->384000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.


Sage Client full mplayer output
Code:

Thu 12/3 16:36:30.510 stderr:DEBUG - active_file=1 circFileSize=0
Thu 12/3 16:36:30.511 stderr:CACHE THREAD STARTING
Thu 12/3 16:36:30.864 Ignoring resize command because it exceeds video dimensions rect=java.awt.Rectangle[x=0,y=0,width=720,height=480] videoDim=java.awt.Dimension[width=0,heigh
t=0]
Thu 12/3 16:36:30.962 stdout:FAILURE 237 err=2 newfd=3
Thu 12/3 16:36:30.962 stdout:
Thu 12/3 16:36:30.963 stdout:TS file format detected.
Thu 12/3 16:36:30.975 stdout:VIDEO MPEG2(pid=256) AUDIO A52(pid=257) NO SUBS (yet)!  PROGRAM N. 0
Thu 12/3 16:36:30.975 stdout:ID_VIDEO_ID=256
Thu 12/3 16:36:30.975 stdout:ID_AUDIO_ID=257
Thu 12/3 16:36:31.139 stdout:TS_PARSE: COULDN'T SYNC
Thu 12/3 16:36:31.190 stdout:VIDEO:  MPEG2  528x480  (aspect 3)  29.970 fps  3170.0 kbps (396.2 kbyte/s)
Thu 12/3 16:36:31.190 Got connection on fd: 22
Thu 12/3 16:36:31.190 stdout:ID_FILENAME=stv://sagebox//var/media/tv/DrSeussHowtheGrinchStoleChristmas-84225-1.ts
Thu 12/3 16:36:31.190 stdout:ID_DEMUXER=mpegts
Thu 12/3 16:36:31.190 stdout:ID_VIDEO_FORMAT=0x10000002
Thu 12/3 16:36:31.190 stdout:ID_VIDEO_BITRATE=3170000
Thu 12/3 16:36:31.190 stdout:ID_VIDEO_FPS=29.970
Thu 12/3 16:36:31.190 stdout:ID_VIDEO_ASPECT=0.0000
Thu 12/3 16:36:31.190 stdout:ID_AUDIO_FORMAT=8192
Thu 12/3 16:36:31.190 stdout:ID_AUDIO_BITRATE=0
Thu 12/3 16:36:31.190 stdout:ID_AUDIO_RATE=0
Thu 12/3 16:36:31.190 stdout:ID_AUDIO_NCH=0
Thu 12/3 16:36:31.191 stdout:ID_LENGTH=995.98
Thu 12/3 16:36:31.191 stdout:socket : /tmp/sagevideo2077265182859698370.socket
Thu 12/3 16:36:31.191 stdout:Opening video filter: [pp=fd]
Thu 12/3 16:36:31.191 stdout:==========================================================================
Thu 12/3 16:36:31.191 stdout:Forced video codec: ffmpeg12
Thu 12/3 16:36:31.191 stdout:Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Thu 12/3 16:36:31.191 stdout:Selected video codec: [ffmpeg12] vfm: ffmpeg (FFmpeg MPEG-1/2)
Thu 12/3 16:36:31.191 stdout:==========================================================================
Thu 12/3 16:36:31.191 stdout:ID_VIDEO_CODEC=ffmpeg12
Thu 12/3 16:36:31.191 stdout:==========================================================================
Thu 12/3 16:36:31.192 stderr:Requested audio codec family [a52] (afm=liba52) not available.
Thu 12/3 16:36:31.192 stderr:Enable it at compilation.
Thu 12/3 16:36:31.192 stderr:Requested audio codec family [ac3] (afm=libac3) not available.
Thu 12/3 16:36:31.192 stderr:Enable it at compilation.
Thu 12/3 16:36:31.192 stderr:Requested audio codec family [hwac3] (afm=hwac3) not available.
Thu 12/3 16:36:31.192 stderr:Enable it at compilation.
Thu 12/3 16:36:31.192 stdout:Read DOCS/HTML/en/codecs.html!
Thu 12/3 16:36:31.192 stdout:Audio: no sound


SageWizdom 12-05-2015 09:43 AM

Moved troubleshooting and progress to the "No audio from Linux sageclient" thread

http://forums.sagetv.com/forums/showthread.php?p=581420

http://forums.sagetv.com/forums/show...20&postcount=5

gordyp 12-05-2015 08:14 PM

http://forums.sagetv.com/forums/show...&postcount=569
I have removed the 'load_at_startup' lines from the sage.properties file (although I was pretty sure that wasn't the issue, as I was running the .bat file to start PNE for testing from the command line before starting the SageTV service anyway), but am still only seeing my Colossus card. I have also rolled back PNE to 1.2.4 as others have done so to resolve their issues, but still no luck... any other ideas?

nyplayer 12-06-2015 07:27 AM

Quote:

Originally Posted by gordyp (Post 581429)
http://forums.sagetv.com/forums/show...&postcount=569
I have removed the 'load_at_startup' lines from the sage.properties file (although I was pretty sure that wasn't the issue, as I was running the .bat file to start PNE for testing from the command line before starting the SageTV service anyway), but am still only seeing my Colossus card. I have also rolled back PNE to 1.2.4 as others have done so to resolve their issues, but still no luck... any other ideas?

If you tried 1.2.4 you need to post the logs and properties ... the logs you pointed to on that thread are old and the primencoder.properties are incorrect for 1.2.4.


All times are GMT -6. The time now is 01:09 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.