HLSDVD-1: Source hardware



Issue Information

Issue Type: Task
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: HLSDVD (HLSDVD)
Resolution: Won't Fix (2019-09-09 15:59:52)

Created: 2015-06-12 15:32:51
Time Spent Working


Description
Ideally this is going to be a platform agnostic solution, so simply getting a HDMI capture PCI-Express capture card doesn't really suit the aim.

I don't want to have to have the player plugged into a full-blown PC in order to work, so need something else.

I'll settle for something Raspberry Pi specific (and cheap) if needs be, as it at least keeps the power consumption down, but would prefer something that doesn't dictate the platform (so a VM can potentially be used).


Toggle State Changes

Activity


There is a kickstarter for a Raspberry Pi HDMI input expansion board (with an IR sender) which could potentially be perfect - http://www.auvidea.com/index.php/theme-styles/2013-06-22-21-23-34/raspberry-pi-hdmi-in - unfortunately it looks like development has stalled so it's not currently available.

Kickstarter is at https://www.kickstarter.com/projects/1419380698/connect-your-hd-camcorder-to-your-raspberry-pi
Have ordered a Lenkeng HDMI over IP extender - http://www.ebay.co.uk/itm/Up-to-100m-120m-HDMI-Extender-Over-Signal-Cat5-5e-Cat6-LAN-Cable-HD-1080P-TCP-IP-/111450816069?pt=LH_DefaultDomain_3&hash=item19f2fc7e45

It's got a few benefits

- Claims to be HDCP compliant (so should be no evil downscaling by Blu-ray players)
- Sends the video using TCP/IP so the platform I'm aiming to build can sit elsewhere on the network

As an added bonus, it looks like someone else has already reverse engineered an earlier model - https://danman.eu/blog/reverse-engineering-lenkeng-hdmi-over-ip-extender/ - which should give me a good headstart towards doing what's necessary to push the data into HLS-Stream-Creator.

As the kit seems like a good starting point, have raised HLSDVD-2 containing requirements/aims based on what'll need doing assuming danman's script works from the get-go.
This script - https://github.com/toru173/Lenkeng373/blob/master/hdmicap.py - is actually half way to being what's needed. If we take away the ffmpeg encoding and just have it write to the FIFO's that should be sufficient for a copy of HLS-Stream-Creator to work with.
It's here - default IP out of the box is 192.168.168.55

There's an (unauthenticated!) web interface which can be used to change this.
Danman's script works, but there's no audio. Can get a more or less realtime stream from the VM by doing
ssh encoder@$VMIP "sudo /home/encoder/encoding/Lenkeng/capture.py" | vlc -


HLS Output
Had to make a few small fixes to Torus script, but that works for pushing via ffmpeg. There's about a 12 second delay (with 1 second segments!) and the VM struggles to keep up.

There also seem to be quite a few dropped audio packets
With a few additional tweaks, got Toru's script working reliably. Switched to using mpeg4 instead of libx264 which has dramatically decreased CPU demand. Also set segment size to 1 second.
~$ sudo python Lenkeng/hdmicap.py --input eth1 --ffmpeg /usr/bin/ffmpeg --heartbeat

There's currently about a 4 second delay between changing the input (e.g. opening a menu) and display, whilst not quite quick enough yet, it's a significant improvement
Looking at it, only currently getting half the theoretical bandwidth of the hardware - it's currently connected directly to a dedicated NIC, but that NIC is a USB2 dongle. Out of a theoretical maximum of 54Mbps currently receiving at 49Mbps which is pretty respectable.

The final deployment will use either a real NIC, or at worst a USB3 one so should achieve better rates. That said, the framerate and resolution still aren't too bad as it stands
Bulk Change

Realistically, if I wanted to restart work on this, I'd probably start from scratch, so marking as Won't Fix
btasker changed status from 'Open' to 'Closed'
btasker added 'Won't Fix' to resolution