TV server - usb hub questions

Everything relating to hacking, expanding and modifying the Joggler hardware.
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

TV server - usb hub questions

Post by dec »

I'm planning on turning one of my Jogglers into a tvheadend server/backend (see here https://tvheadend.org/ for details). This will let me stream tv around my house to other devices running xbmc/openelec.

I have a couple of questions about how intend to set this up. I'm planning on using Ubuntu/xubuntu as the OS on a usb stick, through a powered hub which will also have the following devices connected:

- 2x DVB-T (freeview) usb sticks (may swap for DVB-T2 tuners for freeview HD in the future)
- a usb HDD for storing recordings on (this is the basis of my questions)

Regarding the usb HDD, if I use a 2.5" portable drive, would it be ok being powered through the (mains connected) usb hub? I would probably use a dual usb lead (looks like a splitter, with 1x usb connector for data and 1x for power).

Alternatively I could plug the power side of the usb lead into a mains usb charger. If that doesn't sound good I could place the 2.5" drive, via a bracket, into a 3.5" powered enclosure that would plug into the mains independently.

As I'll have a fair amount of data running through the jogglers USB port, would it be better (or even possible) to install Ubuntu/xubuntu on the internal memory? I know alternative OS's can be installed this way (I have another Joggler running SPOS on the internal memory). I don't want to choke the USB port with too much data and end up having missed/garbled recordings!

If this isn't clear - please ask away!

Thanks
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

I've also posted a similar question (regarding running all the data through the USB hub) here at the tvheadend forum:

https://tvheadend.org/boards/4/topics/12645
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: TV server - usb hub questions

Post by roobarb! »

dec wrote:Regarding the usb HDD, if I use a 2.5" portable drive, would it be ok being powered through the (mains connected) usb hub? I would probably use a dual usb lead (looks like a splitter, with 1x usb connector for data and 1x for power).
A good USB hub should power a good USB hard drive just fine. They should pull 500mA max, but many require more than this to get the drive to spin up, hence those cheaty USB cables. If the PSU you get with the hub can pump out more than 1500mA, you should be just fine. If it's a 4 port hub, you should by rights get at least a 5V 2A PSU with it.
dec wrote:As I'll have a fair amount of data running through the jogglers USB port, would it be better (or even possible) to install Ubuntu/xubuntu on the internal memory? I know alternative OS's can be installed this way (I have another Joggler running SPOS on the internal memory). I don't want to choke the USB port with too much data and end up having missed/garbled recordings!
Once booted, there's very little chatter from the underlying OS. I wouldn't worry about it. The only thing that can get tricksy is getting the Joggler to boot - hubs can confuse matters when the Joggler is trying to decide which device to boot up from, but the only way to know is to try!

How much data are you planning on storing?
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

roobarb! wrote: A good USB hub should power a good USB hard drive just fine. They should pull 500mA max, but many require more than this to get the drive to spin up, hence those cheaty USB cables. If the PSU you get with the hub can pump out more than 1500mA, you should be just fine. If it's a 4 port hub, you should by rights get at least a 5V 2A PSU with it.
I already have a little hub - I'll check the PSU later. I have a feeling it's 1.5A or 2A so that should be fine.
roobarb! wrote: Once booted, there's very little chatter from the underlying OS. I wouldn't worry about it. The only thing that can get tricksy is getting the Joggler to boot - hubs can confuse matters when the Joggler is trying to decide which device to boot up from, but the only way to know is to try!

How much data are you planning on storing?
I was thinking of using a 500gb 2.5" drive pulled from a laptop. If it works as intended I'll use it as a main/hub pvr. So it could potentially become fairly full with freeview recordings.

I need to figure out the best format to use for this - possibly ext3 or 4? I'll ask over on the tvheadend forum as well.

Otherwise for the OS I want the tvheadend service and hopefully CUPS as well, to act as a airprint server for a network printer I have.

The Joggler will essentially be used headless. I'll set the display to turn off to save power, once it's booted & running. All of the interaction with tvheadend is made via an app or web interface, on the local network.

Thanks for the advice!
User avatar
roobarb!
Posts: 1746
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: TV server - usb hub questions

Post by roobarb! »

dec wrote:I was thinking of using a 500gb 2.5" drive pulled from a laptop. If it works as intended I'll use it as a main/hub pvr. So it could potentially become fairly full with freeview recordings.

I need to figure out the best format to use for this - possibly ext3 or 4? I'll ask over on the tvheadend forum as well.
I'd go with ext4 if you're running from a HDD. If you can use ext4, there's no reason to consider ext3 these days.
dec wrote:Otherwise for the OS I want the tvheadend service and hopefully CUPS as well, to act as a airprint server for a network printer I have.
Sounds like a cool project. Are you rolling your own OS for this too?
BirdsLikeWires - Get fresh builds of Debian Bullseye and Bookworm for OpenFrame with the latest 5.10 and 6.1 kernels! 8-)
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

roobarb! wrote: I'd go with ext4 if you're running from a HDD. If you can use ext4, there's no reason to consider ext3 these days.
ext4 it is then. I'm planning on using the hdd for storage only and running the OS from a usb stick. I suppose I could do everything from the hdd but thought it might be easier if I decide on a larger hdd for storage, or need to change it further down the line.
roobarb! wrote: Sounds like a cool project. Are you rolling your own OS for this too?
No, I was planning on using the ubuntu/xubuntu build that's up in the forum. Tvheadend should install easily from there. I've had it up & running on my HP Microserver, running ubuntu previously without problems.
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: TV server - usb hub questions

Post by pete »

@dec,

Here utilize MythTV with 6 tuners today. That said it is on a core duo box using a BCM motherboard running Ubuntu 12.XX. The Joggler's stream live TV really OK with 720/480 resolutions but not so much at 1080. I have never tried to run MythTV on the Joggler here. I did though install a Broadcom Crystal HD mini pcie card in the OF2 and it streams 1080 live TV just fine with XBMC. I am also running Squeezeserver on the MythTV box these days.
All of the video / music though except for recorded stuff is on a networked NAS box(s).

Not sure how much much utilization hits to the CPU you are going to have streaming from 2 tuner USB sticks and writing to a USB drive. Here I am pushing the core duo streaming from two cards and 2 HDHomerun tuners connecting the box at Gb speeds. One card is a Nexus and one is an older style that I rebroadcast in house video channels to.

I would recommend starting with dropping an HD movie (say 18Gb in size) on the Joggler NAS box and streaming from it watching the CPU and see how it does. USB tuners will make the Joggler really work. Transcoding will make it do more work.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

pete wrote:@dec,

Here utilize MythTV with 6 tuners today. That said it is on a core duo box using a BCM motherboard running Ubuntu 12.XX. The Joggler's stream live TV really OK with 720/480 resolutions but not so much at 1080. I have never tried to run MythTV on the Joggler here. I did though install a Broadcom Crystal HD mini pcie card in the OF2 and it streams 1080 live TV just fine with XBMC. I am also running Squeezeserver on the MythTV box these days.
All of the video / music though except for recorded stuff is on a networked NAS box(s).

Not sure how much much utilization hits to the CPU you are going to have streaming from 2 tuner USB sticks and writing to a USB drive. Here I am pushing the core duo streaming from two cards and 2 HDHomerun tuners connecting the box at Gb speeds. One card is a Nexus and one is an older style that I rebroadcast in house video channels to.

I would recommend starting with dropping an HD movie (say 18Gb in size) on the Joggler NAS box and streaming from it watching the CPU and see how it does. USB tuners will make the Joggler really work. Transcoding will make it do more work.
I'm not planning on watching anything on the Joggler itself. It will purely be a server, with no transcoding required.

UK SD TV will be about 4-8mbits per stream (MPEG2) and I think HD is about 8-12mbits (MPEG4).

I already have 2x usb sticks running on an old Acer Revo (intel atom 230) with no problems. But obviously running everything on the USB hub will add extra load and the atom inside the Joggler is not as powerful.

As I already have all the parts, it's just a case of putting it all together, installing ubuntu & tvheadend and see how I go.

My main concerns were the power requirements with the hub and data throughput on both the hub & LAN.

I can have a go at streaming an existing recording from the Joggler and also an HD file and see how I get on.

Thanks for the advice. I'll try to update on how it goes, once I've had some time to set it all up.
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: TV server - usb hub questions

Post by pete »

+1 dec

Yup here utilize Digi USB powered hubs for automation stuff. I have tested automotive style powered USB hubs to work well.

http://www.amazon.com/CoolGear%C2%AE-In ... rid_pt_1_0
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

dec wrote:
roobarb! wrote: A good USB hub should power a good USB hard drive just fine. They should pull 500mA max, but many require more than this to get the drive to spin up, hence those cheaty USB cables. If the PSU you get with the hub can pump out more than 1500mA, you should be just fine. If it's a 4 port hub, you should by rights get at least a 5V 2A PSU with it.
I already have a little hub - I'll check the PSU later. I have a feeling it's 1.5A or 2A so that should be fine.
Checked my hub and the PSU is only 1A, so not suitable.

This looks ok and comes with a 2A PSU:

http://www.amazon.co.uk/The-Pi-Hut-Powe ... ed+usb+hub

Or do you have any particular make/model you would recommend?
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

dec wrote: Checked my hub and the PSU is only 1A, so not suitable.

This looks ok and comes with a 2A PSU:

http://www.amazon.co.uk/The-Pi-Hut-Powe ... ed+usb+hub

Or do you have any particular make/model you would recommend?
Ok, I've finally had a chance to set everything up.

I installed the Xubuntu 14.04 LTS build, by buzz, onto a usb stick and added the stable tvheadend repo & build. Having done it a few times, on various different systems, configuring tvheadend was fairly straightforward.

I decided to get the 2A PiHub hub, I linked to above, and it seems to handle 2x usb DVB-T sticks and a USB HDD without issues - along with the usb stick running the OS.

The USB HDD is a 500gb drive formatted as ext4.

This drive is mounted using etc/fstab and UUID at:

home/joggler/Videos/tvheadend

I had a quick streaming test, using only 1x DVB-T stick, to begin with. I was able to stream different channels, on the same mux, to 3x devices easily.

I'm now trying a little stress test with the following:

2x simultaneous recordings on different muxes, using both tuners while also streaming 2x different channels (on the same muxes as the recordings) to 2x different devices.

I've set the Joggler to switch the screen off after 5mins, using the Xubuntu display settings.

So far so good.

I had a few teething problems to begin with. These were mainly due to mounting the usb HDD and setting the correct permissions, to allow recording.

The bottom post at the tvheadend forum here solved the permissions for me:

https://tvheadend.org/boards/5/topics/4619

I'll try to post back when I've had a look at the recordings. I may try to playback while recording and see how that goes.

The final piece of the puzzle is trying out the improved XBMC tvheadend plugin, which apparently has improved support for time shift functions. Although I think this is not straightforward to implement as it requires building your own XBMC with the alternative plugin.

Does anyone know if I can see the CPU load easily, as I would like to see how stressed the Joggler is with the current processes I have running?
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: TV server - usb hub questions

Post by pete »

Very nice!

You can just run top and watch from an SSH session or go with some RRD graphing utilities.
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

Ok here's a little update on my progress so far:

I've done a stress test with some recordings and it passed with flying colours!

I scheduled 2x simultaneous recordings, while playing back 2x previous recordings, while also playing some live TV without any issues! I checked all the recordings and they appear fine - no dropouts, skipping etc.

I think it's safe to say the Joggler can easily handle my requirements (for SD freeview). I will have to wait for Linux support for the DVB-T2 tuner I have - a Geniatech T220A - before being able to test HD recording & streaming.

Otherwise this appears to be an ideal device to use as a silent, low-power tvheadend backend!

I just need to see if I can easily install ssh support, for headless control and install CUPS to enable AirPrint for my network printer.
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: TV server - usb hub questions

Post by pete »

Very nice dec!

Never really played much with TVHeadend. You are getting me to have a look at TVHeadend.

Yup here only played with the OF2's and a Broadcom Crystal HD card in them to stream live HD video from the MythTV box which works fine. (that and CCTV HD stuff).
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

Just to be clear, I'm not playing anything on my Joggler.

It is only acting as a server/backend to supply other devices on my network.

Seems to work great for that purpose though!
User avatar
pete
Posts: 2950
Joined: Mon Aug 01, 2011 6:33 am
Location: Time Traveler

Re: TV server - usb hub questions

Post by pete »

Understood.
I scheduled 2x simultaneous recordings, while playing back 2x previous recordings, while also playing some live TV without any issues! I checked all the recordings and they appear fine - no dropouts, skipping etc.

I think it's safe to say the Joggler can easily handle my requirements (for SD freeview). I will have to wait for Linux support for the DVB-T2 tuner I have - a Geniatech T220A - before being able to test HD recording & streaming.

Otherwise this appears to be an ideal device to use as a silent, low-power tvheadend backend!
Amazing stuff!
- Pete
O2 Jogglers running EFI Ubuntu / Squeezeplayer
OpenPeak Voip Telephony / Zigbee tabletops hardware modded with Seabios / RTC / Ethernet ROM edits / SSD drives running XPe for automation screens

Auto mater
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: TV server - usb hub questions

Post by hawsey »

Thanks for documenting your success with this project :-) , it is the main reason I am giving Plex media server a go again on the Joggler .
Happy Joggling
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

Re: TV server - usb hub questions

Post by dec »

hawsey wrote:Thanks for documenting your success with this project :-) , it is the main reason I am giving Plex media server a go again on the Joggler .
Good luck.

Please keep in mind I'm not getting my Joggler to transcode anything. It just pushes the raw DVB-T (SD Freeview) data around - whether that is recording, streaming live or streaming recordings - nothing is manipulated. That is probably the main reason why the Joggler is working so well for this task - plus the gigabit LAN really helps!
User avatar
hawsey
Posts: 2069
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: TV server - usb hub questions

Post by hawsey »

Thanks for that , yes I am trying the lan rather than wireless next step and a lighter Linux build on internal USB ,next .
Yes transcoding might be an issue but you have managed a lot from the humble Joggler so I will try again :-)
Cheers
Happy Joggling
dec
Posts: 33
Joined: Fri May 31, 2013 9:59 pm

TV server - usb hub questions

Post by dec »

hawsey wrote:Thanks for that , yes I am trying the lan rather than wireless next step and a lighter Linux build on internal USB ,next .
Yes transcoding might be an issue but you have managed a lot from the humble Joggler so I will try again :-)
Cheers
The issue with transcoding is that it is very CPU intensive - which is why low power systems, such as the Joggler, struggle.

I think there are many variables though, such as how much transcoding is required - for example HD/Blu-Ray rips to SD/low-res.

Good luck though - let us know how you get on with it!
Post Reply