<div dir="ltr"><div>I'm setting up a whole house AV system. Our house has 2 satellite receivers.<br><br>
I'd like to connect an HD-PVR to each receiver and stream the outputs so
 that they can be watched anywhere in the house on a variety of devices 
via our local network.<br><br>
I'm running Fedora 19 these days.<br>
$ uname -a<br>
Linux XPS17.localdomain 3.11.6-200.fc19.x86_64 #1 SMP Fri Oct 18 22:34:18 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux<br><br>
Progress thus far.<br><br>
The HD-PVR device is recognized by the OS and the driver is installed automatically.<br><br>
I get this in dmesg<br><br>
usb 2-1.2: new high-speed USB device number 10 using ehci-pci<br>
[25096.604008] usb 2-1.2: New USB device found, idVendor=2040, idProduct=4903<br>
[25096.604013] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3<br>
[25096.604015] usb 2-1.2: Product: Hauppauge HD PVR<br>
[25096.604017] usb 2-1.2: Manufacturer: AMBA<br>
[25096.604018] usb 2-1.2: SerialNumber: 00A5EB14<br>
[25096.622360] hdpvr 2-1.2:1.0: firmware version 0x1e dated Mar 7 2012 08:25:15<br>
[25097.143552] hdpvr 2-1.2:1.0: device now attached to video1<br><br>
lsmod shows the driver is installed.<br><br>
$ lsmod | grep hdpvr<br>
hdpvr 32518 0<br>
v4l2_common 15138 1 hdpvr<br>
videodev 132348 4 hdpvr,uvcvideo,v4l2_common,videobuf2_core<br>
i2c_core 34242 5 i2c_i801,hdpvr,nvidia,v4l2_common,videodev<br><br><br>
For testing, I started out with this, which creates a file from the HD-PVR output.<br><br>
cat /dev/video1 > stream.ts<br><br><br>
vlc test.ts plays the file correctly and returns the following.<br><br>
$ vlc stream.ts<br>
VLC media player 2.0.8 Twoflower (revision 2.0.7-29-g12aebf9)<br>
[0x1564108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.<br>
[0x7f2b78001b78] ts demux error: MPEG-4 descriptor not found<br>
[0x7f2b78cb1dc8] packetizer_mpeg4audio packetizer: AAC channels: 2 samplerate: 48000<br>
Fontconfig warning: FcPattern object size does not accept value "0"<br>
Fontconfig warning: FcPattern object size does not accept value "0"<br>
[h264 @ 0x7f2b78caaaa0] illegal short term buffer state detected<br>
^C<br><br>
mplayer test.ts plays the file correctly and returns the following.<br><br>
$ mplayer stream.ts<br>
MPlayer SVN-r36171-4.8.1 (C) 2000-2013 MPlayer Team<br>
mplayer: could not connect to socket<br>
mplayer: No such file or directory<br>
Failed to open LIRC support. You will not be able to use your remote control.<br><br>
Playing stream.ts.<br>
libavformat version 54.63.104 (external)<br>
TS file format detected.<br>
VIDEO H264(pid=4113) AUDIO AAC(pid=4352) NO SUBS (yet)! PROGRAM N. 1<br>
FPS seems to be: 30.000000<br>
Load subtitles in ./<br>
==========================================================================<br>
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family<br>
libavcodec version 54.92.100 (external)<br>
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)<br>
==========================================================================<br>
==========================================================================<br>
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders<br>
AUDIO: 48000 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->384000)<br>
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))<br>
==========================================================================<br>
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)<br>
Starting playback...<br>
Movie-Aspect is undefined - no prescaling applied.<br>
VO: [vdpau] 1920x1088 => 1920x1088 Planar YV12<br>
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.<br>
VO: [vdpau] 1920x1080 => 1920x1080 Planar YV12<br>
Dropping frame with size not matching configured size<br>
A: 5.3 V: 5.4 A-V: -0.115 ct: -0.166 297/297 25% 7% 0.2% 10 0<br>
Exiting... (End of file)<br><br><br>
Mplayer will play the live stream correctly after a bit of complaining.<br><br>
$ mplayer /dev/video1<br>
MPlayer SVN-r36171-4.8.1 (C) 2000-2013 MPlayer Team<br>
mplayer: could not connect to socket<br>
mplayer: No such file or directory<br>
Failed to open LIRC support. You will not be able to use your remote control.<br><br>
Playing /dev/video1.<br>
libavformat version 54.63.104 (external)<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
TS file format detected.<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
VIDEO H264(pid=4113) AUDIO AAC(pid=4352) NO SUBS (yet)! PROGRAM N. 1<br>
Cannot seek backward in linear streams!<br>
Seek failed<br>
FPS seems to be: 30.000000<br>
Load subtitles in /dev/<br>
==========================================================================<br>
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family<br>
libavcodec version 54.92.100 (external)<br>
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)<br>
==========================================================================<br>
==========================================================================<br>
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders<br>
AUDIO: 48000 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->384000)<br>
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))<br>
==========================================================================<br>
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)<br>
Starting playback...<br>
Movie-Aspect is undefined - no prescaling applied.<br>
VO: [vdpau] 1920x1088 => 1920x1088 Planar YV12<br>
[h264 @ 0x7fc1ba47d5c0]mmco: unref short failure<br>
[h264 @ 0x7fc1ba47d5c0]mmco: unref short failure<br>
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.<br>
VO: [vdpau] 1920x1080 => 1920x1080 Planar YV12<br>
Dropping frame with size not matching configured size<br>
[h264 @ 0x7fc1ba47d5c0]mmco: unref short failure<br>
[h264 @ 0x7fc1ba47d5c0]mmco: unref short failure<br>
A: 17.1 V: 17.1 A-V: 0.010 ct: -0.526 430/430 24% 8% 5.4% 14 0<br><br>
Exiting... (Quit)<br><br>
VLC will NOT play the live stream directly, at least from the command line using the simple device.<br><br>
$ vlc /dev/video1<br>
VLC media player 2.0.8 Twoflower (revision 2.0.7-29-g12aebf9)<br>
[0x1dca108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.<br>
libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 0) for PID 0<br>
libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 0) for PID 256<br><br>
However, I can get vlc to play the live stream by setting the HDPVR device up as a PVR capture device in the gui.<br><br>
vlc-> media-> capture device<br>
set Capture Mode to PVR<br>
set device name to /dev/video1<br>
press Play<br><br>
The command line output while I do this is:<br><br>
$ vlc<br>
VLC media player 2.0.8 Twoflower (revision 2.0.7-29-g12aebf9)<br>
[0x917108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.<br>
[0x7f9a880020d8] ts demux error: MPEG-4 descriptor not found<br>
[0x7f9a88e6fa08] packetizer_mpeg4audio packetizer: AAC channels: 2 samplerate: 48000<br>
Fontconfig warning: FcPattern object size does not accept value "0"<br>
Fontconfig warning: FcPattern object size does not accept value "0"<br>
[h264 @ 0x7f9a88d3df80] illegal short term buffer state detected<br><br>So basically I can create and view files from the HD-PVR and I can view the live output with mplayer and vlc.<br><br>
What I really want to do is stream the output so that I can watch it on 
devices anywhere in the house, ie devices not directly connected to the 
HDPVRs.<br><br>
*Theoretically* one can do that by selecting Stream rather than Play in the vlc GUI.<br><br>
vlc-> Media -> Open Capture Device<br>
Capture Mode = PVR<br>
Device Name = /dev/video1<br><br>
At this point my "Edit Options" are :pvr-device=/dev/video1 :pvr-radio-device=HDPVR :pvr-norm=0 :live-caching=300<br><br>
I then select Stream instead of Play.<br><br>
In Destination Setup, I add an HTTP destination and set the path to /stream.<br><br>
As far as Transcoding, here is where things get interesting. I'm not 
sure I want to transcode anything. I've already demonstrated that both 
vlc and mplayer will play the stream directly from the HD-PVR itself. 
Why do I need to transcode it ?<br><br>
Nevertheless, I chose Active Transcoding with a Video- H.264+MP3 profile.<br><br>
At the end of all this, my "Generated stream output string" is<br>
:sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mpga,ab=128,channels=2,samplerate=44100}:http{mux=avi,dst=:8080/stream}
 :sout-keep<br><br>
I check that its actually running.<br><br>
$ netstat -nap | grep 8080<br>
(Not all processes could be identified, non-owned process info<br>
will not be shown, you would have to be root to see it all.)<br>
tcp 0 0 <a href="http://0.0.0.0:8080">0.0.0.0:8080</a> 0.0.0.0:* LISTEN 18496/vlc<br>
tcp6 0 0 :::8080 :::* LISTEN 18496/vlc<br><br>
During all this the command line displays the following.<br>
$ vlc<br>
VLC media player 2.0.8 Twoflower (revision 2.0.7-29-g12aebf9)<br>
[0x126f108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.<br>
libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 0) for PID 0<br>
libdvbpsi error (PSI decoder): TS discontinuity (received 2, expected 0) for PID 256<br>
[0x7fc304002c58] ts demux error: MPEG-4 descriptor not found<br>
[0x7fc30517ffc8] packetizer_mpeg4audio decoder: AAC channels: 2 samplerate: 48000<br><br><br>
If I fire up another instance of VLC (via the gui) and use it to view the stream, it displays a black screen and I get this.<br><br>
$ vlc<br>
VLC media player 2.0.8 Twoflower (revision 2.0.7-29-g12aebf9)<br>
[0x1598108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.<br>
libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 0) for PID 0<br>
libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 0) for PID 66<br>
[0x7ff9100024b8] ts demux error: MPEG-4 descriptor not found<br>
[0x7ff910cbdc88] packetizer_mpeg4audio packetizer: AAC channels: 2 samplerate: 48000<br>
Fontconfig warning: FcPattern object size does not accept value "0"<br>
Fontconfig warning: FcPattern object size does not accept value "0"<br>
[h264 @ 0x7ff910d4e7a0] mmco: unref short failure<br>
x 100 times...<br><br>
Netstat shows this<br>
$ netstat -nap | grep 8080<br>
(Not all processes could be identified, non-owned process info<br>
will not be shown, you would have to be root to see it all.)<br>
tcp 0 0 <a href="http://0.0.0.0:8080">0.0.0.0:8080</a> 0.0.0.0:* LISTEN 18496/vlc<br>
tcp 0 0 <a href="http://127.0.0.1:8080">127.0.0.1:8080</a> <a href="http://127.0.0.1:53735">127.0.0.1:53735</a> TIME_WAIT -<br>
tcp6 0 0 :::8080 :::* LISTEN 18496/vlc<br><br><br>
When I run VLC from the command line, I get a different error.<br>
vlc <a href="http://127.0.0.1:8080/stream" target="_blank">http://127.0.0.1:8080/stream</a><br>
VLC media player 2.0.8 Twoflower (revision 2.0.7-29-g12aebf9)<br>
[0x25a3108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.<br>
[0x7ffc4c006558] main stream error: cannot pre fill buffer<br><br>
When run mplayer from the command line, I get this<br><br>
$ mplayer <a href="http://127.0.0.1:8080/stream" target="_blank">http://127.0.0.1:8080/stream</a><br>
MPlayer SVN-r36171-4.8.1 (C) 2000-2013 MPlayer Team<br>
mplayer: could not connect to socket<br>
mplayer: No such file or directory<br>
Failed to open LIRC support. You will not be able to use your remote control.<br><br>
Playing <a href="http://127.0.0.1:8080/stream" target="_blank">http://127.0.0.1:8080/stream</a>.<br>
Resolving 127.0.0.1 for AF_INET6...<br>
Connecting to server 127.0.0.1[7f00:1::]: 8080...<br><br>
Failed to connect to server with AF_INET6<br>
Connecting to server 127.0.0.1[127.0.0.1]: 8080...<br><br>
Cache size set to 320 KBytes<br>
Cache fill: 0.00% (0 bytes) nop_streaming_read error : Resource temporarily unavailable<br>
Stream not seekable!<br>
Cache fill: 0.00% (0 bytes) Stream not seekable!<br>
Cache fill: 0.00% (0 bytes) Stream not seekable!<br>
Cache fill: 0.00% (0 bytes) Stream not seekable!<br>
Cache fill: 0.00% (0 bytes) Stream not seekable!<br>
Cache fill: 0.00% (0 bytes)<br><br>
libavformat version 54.63.104 (external)<br><br>
Exiting... (End of file)<br><br>
And that is as far as I have gotten.<br><br><div class="" id="content_23886952">I forgot to mention that I am not able to connect to the HC-PVR using teh Video for Linux mode.<br><br>
vlc-> Media -> Open Capture Device<br>
Capture Mode = Video for Linux 2<br>
Video Device name = /dev/video1<br>
Press Play.<br><br>
Result is "VLC is unable to open the MRL 'v4l2:///dev/video1"<br><br>
The command line shows the following.<br>
$ vlc<br>
VLC media player 2.0.8 Twoflower (revision 2.0.7-29-g12aebf9)<br>
[0x1407108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.<br>
[0x7f4a2c0010c8] v4l2 demux error: Could not match pixel format<br>
[0x7f4a2c004b78] v4l2 access error: Could not match pixel format<br>
[0x7f4a2c004b78] v4l2 access error: Could not match pixel format<br>
[0x7f4a44000b78] main input error: open of `v4l2:///dev/video1' failed</div>                                  <div id="yui_3_10_0_1_1383072619471_153" class="">
                                                                                                <div id="yui_3_10_0_1_1383072619471_152" class=""><span id="yui_3_10_0_1_1383072619471_151" class=""><form class="" method="POST" action="/reputation/thumb/add_submit">
        
        
</form></span></div>                                  </div>
                                                                        
                                                                                                <br>At this point I am stuck and unsure how to proceed.<br><br>
I am able to view the live output of the HDPVR device in mplayer and vlc.<br><br>
It would seem as though VLC is streaming the output of the HDPVR device, but I am unable to view it.<br><br>
Should I continue to struggle with trying to use VLC as my streamer ? Does anyone see why it isn't working ?<br><br>
Should I try rygel or gstreamer or ffserver ?<br><br>
One thing that keeps me from trying ffserver is that it seems to want to
 user to specify the stream format (codec, height and width) when it is 
invoked. My satellite receiver changes screen resolution as program 
content changes. SD programming, low quality commercials and the guide 
are output in 720i. HD is output in 1080i. It changes output formats 
whenever it needs to, depending on the input programming.<br><br>
I know about and have played with MythTV and XBMC. I am setting my 
system up primarily for live TV viewing. I think what I am doing will 
work (much) better for live viewing than MythTV and XBMC presently do.<br><br>
Any and all insight and advice to getting this working will be greatly appreciated.<br><br></div>Thanks<br></div>