Below is the contents of a .bat file I use on my PC with VLC installed to set up streaming. You can open up VLC and choose the stream option and do all this using the GUI, but it is a real PITA each time. You could split the below example into separate .bat files for the tuner and VLC part. I set up my PC with a scheduled task to run a bat file that starts streaming,. You can later stop the tuner but there is no way to stop VLC via command line, only manually. There is a way to tell VLC to stream for a set time, I have not tried it yet but it would just add parameters to the VLC command.
Sorry for posting like this, could not figure out a way to upload this file separately. Also, apologies for maybe not being on topic for this thread, just trying to help answer a question. Very timely as I just got this to work a couple days ago,.
This for a DUAL, I am pretty sure a prime works the same way. It works for un-flagged channels only of course. The OS is Win7 64bit.
Blue fields are the ones you need to update for your setup.
i can now place-shift with this poor man's slingbox
____________________________________________________________
cd C:\Program Files\Silicondust\HDHomeRun
hdhomerun_config 1036DA23 set /tuner1/channel auto:117000000
hdhomerun_config 1036DA23 set /tuner1/program 6
hdhomerun_config 1036DA23 set /tuner1/target 192.168.15.111:5000
:: The above commands tell your HDHR to send its UDP signal to the Computer with the IP address
:: listed and using port 5000. You have to know the channel and program number. You can test if
:: it works by opening VLC, choose Open Network Stream, and enter udp://@:5000. VLC should begin
:: playing the video.
:: Since this is a DOS command line approach, I started by changing to the directory that houses
:: the hdhomerun_config.exe file.so it is in the command path.
:: '1036DA23' is my tuner ID. This example uses tuner1, you could choose another.
:: IMPORTANT: your HDHR will keep streaming unless you stop it. Do that by using the channel command
:: above and set channel to none.. I use a separate .bat file with the following and run it when I am done.
:: ::::::::: cd C:\Program Files\Silicondust\HDHomeRun
:: ::::::::: hdhomerun_config 1036DA23 set /tuner1/channel none
:: BELOW are the commands for VLC to open, transcode and stream, so first I change to the directory
:: that VLC.exe resides in before entering the VLC commands.
cd C:\Program Files (x86)\VideoLAN\VLC\
vlc -vvv "udp://@:5000" --sout "#transcode{vcodec=h264,scale=0.30,vb=0,acodec=mp3,ab=128,channels=2,samplerate=22050
}:standard{access=http,mux=ts,ttl=15,dst=:8989/}"
:: -vvv "udp://@:5000" sets the source to be the udp stream from the HDHR (FYI you could stream a video file or webcam by making that the input instead)
:: --sout sets the transcoded output. In this case I scaled to 0.30, or 30% original resolution. This is
:: a must to get bandwidth down below my upload limit. I will play around with this to see how high I can go.
:: A lower scaling also helps ease the burden on the transcoding CPU, which could be a bottleneck depending on your PC.
:: I chose the mp3 audio codec to also reduce bandwidth with bitrate set to 128 kbps
:: and lowered the sampling rate to 1/2 of normal
:: "standard" is where we state the serving parameters, in this case we want http protocol and a "TS" wrapper
:: (other wrappers, like AVI and MKV do not work well with HTTP protocol, from what I have come to understand)
:: ttl is the "time to live" which is set higher depending on the number of routers your stream might need to
:: go through. I just set to 15 to be safe, have not tried to lower it yet. May need to be higher in some cases.
:: finally 8989 is the port I am streaming to/from. This must be port-forwarded on your router.
:: Once streaming, to access over internet, open VLC on the remote client, choose open network stream
:: and enter http://###.###.###:8989, putting in your "external" or WAN IP address (google "my ip") This changes
:: on occasion for most ISPs, so you need to check or set up a DNS service. Also, you may want to change the caching
:: delay from the default 1200 ms to more like 5000 ms. Seems to help. Other software besides VLC could be used as a client.
:: You can stream to a client on your LAN by using your LAN IP address. This is a good way to test also. (hint, click tools->codec info->statistics in VLC
:: to see your streaming bitrate.
:: Below are some program and channel numbers I was able to get from my
:: HDHR quick TV XML file. These are different for every cable provider or location.
:: I set up a separate "tune and stream" .bat file for each one I might want.
:: WJZY SD 579000000 55
:: WJZY DT 579000000 53
:: WJZY 573000000 9
:: WBTV DT 561000000 152
::
Edited by DanPackMan - 9/2/12 at 5:53am