VideoLAN VLC

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
nickk
Silicondust
Posts: 14931
Joined: Tue Jan 13, 2004 9:39 am

VideoLAN VLC

Postby nickk » Wed Jan 22, 2014 9:19 am

The HDHomeRun EXTEND will work with VideoLAN VLC.

Browser Plugin:
If you have the VLC browser plugin installed for your browser of choice it can be used by HDHomeRun webpages - the device channel page and my.hdhomerun.com

UPnP:
Launch VLC and select View, Playlist to bring up the Playlist folders on the left hand side.
Click Universal Plug'n'Play from the folder list on the left hand side.

Open Netowrk Stream
The URL format for transcoded video is as follows:

Up to 720p30:
http://<device ip>:5004/auto/v<channel number>?transcode=mobile

Up to 1080i60 / 720p60:
http://<device ip>:5004/auto/v<channel number>?transcode=heavy

High compression video:
http://<device ip>:5004/auto/v<channel number>?transcode=internet540
http://<device ip>:5004/auto/v<channel number>?transcode=internet480
http://<device ip>:5004/auto/v<channel number>?transcode=internet360
http://<device ip>:5004/auto/v<channel number>?transcode=internet240

Native stream (no transcode):
http://<device ip>:5004/auto/v<channel number>?transcode=native

dgalvan
Posts: 82
Joined: Wed Mar 27, 2013 9:15 am

Re: VideoLAN VLC

Postby dgalvan » Wed Jan 22, 2014 12:51 pm

Is there a way to record the stream?

karog
Posts: 529
Joined: Wed Sep 23, 2009 12:54 pm

Re: VideoLAN VLC

Postby karog » Wed Jan 22, 2014 1:00 pm

Is there a way to record the stream?
Use curl or wget with the http url and the duration option.

uspino
Posts: 33
Joined: Thu Feb 05, 2009 11:49 am

Re: VideoLAN VLC

Postby uspino » Thu Jan 23, 2014 12:34 am

Can I access the stream outside of LAN with proper port forwarding on router? With the new transcoding rates, that's definitely the feature many of us are looking for.

cmh716
Posts: 59
Joined: Wed Oct 30, 2013 3:01 am

Re: VideoLAN VLC

Postby cmh716 » Thu Jan 23, 2014 5:11 pm

Looks like the stream that this method (wget) uses is not iTunes compatible. Does anyone know if this device will be able to save to an iTunes compatible format that will play on AppleTV without transcoding?

nickk
Silicondust
Posts: 14931
Joined: Tue Jan 13, 2004 9:39 am

Re: VideoLAN VLC

Postby nickk » Thu Jan 23, 2014 5:40 pm

Looks like the stream that this method (wget) uses is not iTunes compatible. Does anyone know if this device will be able to save to an iTunes compatible format that will play on AppleTV without transcoding?
The AppleTV does not support AC3 audio unfortunately.

You could try using a transcoding app and telling it to pass through the video, transcode only the audio.

Nick

ilkhan4
Posts: 4
Joined: Sat Nov 18, 2006 8:26 pm

Re: VideoLAN VLC

Postby ilkhan4 » Thu Jan 23, 2014 9:50 pm

Looks like the stream that this method (wget) uses is not iTunes compatible. Does anyone know if this device will be able to save to an iTunes compatible format that will play on AppleTV without transcoding?
The AppleTV does not support AC3 audio unfortunately.

You could try using a transcoding app and telling it to pass through the video, transcode only the audio.

Nick
That's HUGELY disappointing since that's actually the reason I (waited for!) and bought the HDTC. If it won't work with Apple TV or iTunes, that implies that it won't work with iOS devices either which kind of seems pointless given that the marketing all mentions it working with tablets and phones. Doesn't the transcoder chip in the HDTC support doing AC3->AAC conversion as well?

dgalvan
Posts: 82
Joined: Wed Mar 27, 2013 9:15 am

Re: VideoLAN VLC

Postby dgalvan » Thu Jan 23, 2014 11:33 pm

Looks like the stream that this method (wget) uses is not iTunes compatible. Does anyone know if this device will be able to save to an iTunes compatible format that will play on AppleTV without transcoding?
The AppleTV does not support AC3 audio unfortunately.

You could try using a transcoding app and telling it to pass through the video, transcode only the audio.
:cry:. Ugh. Seriously?

I've been waiting for this device on the (naive?) assumption that it would be saving me the hassle of transcoding on the computer before I watch the videos via iTunes home sharing on my Apple TVs. Now it seems like I've been on a fools errand, because I will have to transcode again on the computer anyway, making the onboard transcoding of the device pointless (for my purposes).

*deep breath*

Actual question:
I wonder if the AC3 audio issue is a limitation of the Apple TV hardware, or just iTunes?
If the latter, maybe I could use the Plex Connect solution on the Apple TV 3, which supposedly lets you organize your videos in Plex on your computer, and then access those videos (which don't have to be in iTunes .m4v H.264 format) via a hijacked Trailers application on the ATV3.

But ugh. . . doing the plexconnect thing would require convincing my wife to use a whole different organization method after she has gotten used to the ease of the shows appearing on the Apple TV in Computers --> TV Shows. I can hear the questions now: "You mean I have to go into the (counterintuitive) trailers app to get to the TV shows now? Why again did you buy that new device and spend all that time trying to figure out how to get it to do what you want? Just so we could watch the shows a bit sooner? Huh. Well let me know when you put it back the way it was."

(I know, I know. First world problems.)

nickk
Silicondust
Posts: 14931
Joined: Tue Jan 13, 2004 9:39 am

Re: VideoLAN VLC

Postby nickk » Thu Jan 23, 2014 11:52 pm

We are currently talking with Dolby to get permission to convert the audio format for Apple products.

grhowes
Posts: 11
Joined: Sat Dec 22, 2007 3:10 am

Re: VideoLAN VLC

Postby grhowes » Fri Jan 24, 2014 1:13 am

We are currently talking with Dolby to get permission to convert the audio format for Apple products.
When are Dolby's patents expiring for this? It's in the next few years right?

cmh716
Posts: 59
Joined: Wed Oct 30, 2013 3:01 am

Re: VideoLAN VLC

Postby cmh716 » Fri Jan 24, 2014 4:29 am

It appears that the apple tv supports AC3 passthrough. So if you're using a receiver, it can decode the AC3 stream. That said, after some research and trial an error, I discovered that the AC3 track needs to be the second audio track and audio track 1 MUST be AAC. Since I have some TV's (with Apple TV's connected) that are only stereo, I tried encoding a Stereo AAC Audio Track 1 and Copied the AC3 track to track 2 (for my HT setup) using ffmpeg:

ffmpeg -i inputfilenamefromhdhr.ts -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libfaac -b:a 192k -ac 2 -scodec copy -c:a:1 copy outputfilename.m4v

So far, "mobile" 30fps videos are working. The "heavy" format isn't working yet. Investigating to see if ATV even supports the 60fps 1080i, or if I will end up using ffmpeg to drop frames. I'll report back.
Last edited by cmh716 on Fri Jan 24, 2014 6:48 am, edited 1 time in total.

cmh716
Posts: 59
Joined: Wed Oct 30, 2013 3:01 am

Re: VideoLAN VLC

Postby cmh716 » Fri Jan 24, 2014 6:35 am

I just recorded a 30 minute 720p 30fps "mobile" file and used the aforementioned ffmpeg command line option and it took 2.5 minutes at 10% CPU on my quad core to create the resulting m4v file. I suspect most people watching on AppleTV will be running it through comskip or showanalyzer and tagging it anyhow. So at least the heavy lifting (h.264 encode) is done on the HDHR hardware.

I have tested the output on both Apple TV 2 and Apple TV 3 and they work. I've decided to not bother trying to convert the 1080i/60fps "heavy" format because I still have 720p only apple tvs.

dgalvan
Posts: 82
Joined: Wed Mar 27, 2013 9:15 am

Re: VideoLAN VLC

Postby dgalvan » Thu Jan 30, 2014 11:13 am

I just recorded a 30 minute 720p 30fps "mobile" file and used the aforementioned ffmpeg command line option and it took 2.5 minutes at 10% CPU on my quad core to create the resulting m4v file. I suspect most people watching on AppleTV will be running it through comskip or showanalyzer and tagging it anyhow. So at least the heavy lifting (h.264 encode) is done on the HDHR hardware.

I have tested the output on both Apple TV 2 and Apple TV 3 and they work. I've decided to not bother trying to convert the 1080i/60fps "heavy" format because I still have 720p only apple tvs.
This is encouraging! Thanks for posting the ffmpeg cl option. I'll try that on the output of EyeTV, now that the latest firmware enables use of EyeTV for transcoded recording.

dgalvan
Posts: 82
Joined: Wed Mar 27, 2013 9:15 am

Re: VideoLAN VLC

Postby dgalvan » Wed Feb 05, 2014 10:07 am

It appears that the apple tv supports AC3 passthrough. So if you're using a receiver, it can decode the AC3 stream. That said, after some research and trial an error, I discovered that the AC3 track needs to be the second audio track and audio track 1 MUST be AAC. Since I have some TV's (with Apple TV's connected) that are only stereo, I tried encoding a Stereo AAC Audio Track 1 and Copied the AC3 track to track 2 (for my HT setup) using ffmpeg:

ffmpeg -i inputfilenamefromhdhr.ts -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libfaac -b:a 192k -ac 2 -scodec copy -c:a:1 copy outputfilename.m4v

So far, "mobile" 30fps videos are working. The "heavy" format isn't working yet. Investigating to see if ATV even supports the 60fps 1080i, or if I will end up using ffmpeg to drop frames. I'll report back.
Now that I have a working device, I'm trying to replicate your results.

what is the *.ts file you are using as your input? Is that the output of a wget recording command to generate an mp4 (H264) from the HDTC-2US? I have done that, but the file just inherits a generic name without an extension, so I renamed it as a *.mp4. (What I'm getting at: is your "inputfilenamefromhdhr.ts" the mp4 file generated by the HDTC-2US? Or is it some otherwise modified version of that file? I don't recognize the *.ts extension.)

Now that we can enable transcoding via the HD Homerun configuration page, I've used EyeTV to record a couple clips. EyeTV stores them inside the ".eyetv" package with .mpg extensions. But when I open them in VLC I can verify that they are, indeed, mp4's encoded with H264. I (naively) tried just changing the extension to .m4v or .mp4, but iTunes still won't play them. I gather this is because they have an AC3 audio track instead of the necessary AAC. (I don't understand why iTunes still won't play the video without the audio, instead of just refusing to recognize the file at all, but I'll take others word for it that's just the way it works.)

I haven't tested your "transcoding only the audio track" ffmpeg method above yet. Will try that tonight. I have an ATV3, so I'd prefer the "heavy" transcode over "mobile", but I'm not picky enough to let that hold me up from getting it working.

Otherwise, I'm holding out hope that SD can get the permissions and firmware working so that the HDTC-2US will spit out a transcoded stream with an AAC track. Of course, even then, if I want the recordings tagged and titled appropriately, I was was still planning to use EyeTV's "export" function, which I'm hoping will be near-instantaneous.

cmh716
Posts: 59
Joined: Wed Oct 30, 2013 3:01 am

Re: VideoLAN VLC

Postby cmh716 » Thu Feb 06, 2014 5:07 pm

ts was just random.

wget -O inputfilenamefromhdhr.ts http://<device ip>:5004/auto/v<channel number>?transcode=mobile

ffmpeg -i inputfilenamefromhdhr.ts -map 0:0 -map 0:1 -map 0:1 -c:v copy -c:a:0 libfaac -b:a 192k -ac 2 -scodec copy -c:a:1 copy outputfilename.m4v

You'll need a version of ffmpeg that supports the libfaac parameter.


Return to “Development Support”

Who is online

Users browsing this forum: No registered users and 1 guest