dadarara Posted April 3, 2017 Share Posted April 3, 2017 I would like to connect my DV Camera via firewire to the unRAID server for capturing DV video tapes. Long story short - I CAN NOT passthrough the firewire device to any VM as its behind a PCI bridge and cant be configured for separate IOMMU group, I have installed the unRAID DBV edition and I have the firewire device enabled. I even get the video camera recognized as a fw1 device in the system logs. I am not very Linux savvy so I need someone to help me out. I want to configure the TvHeadend to be able to record from non DVB device connected via firewire. I have stumbled upon the bellow instructions but I dont know how to make it work. Hopefully someone will pick this up. Setup non-DVB devices: We will use a FireWire DV camcorder as a source for a Tvheadend tv channel, therefor we will install the following tools which will simplify testing and grabbing dv/hdv video and encoding and mulitplexing it to a fake DVB compatible stream which can be used in Tvheadend. Code: sudo apt-get install dvgrab ffmpeg #test dv video capture dvgrab -noavc testvideo.dv #press CTRL + C top stop capture #playback of captured dv file vlc testvideo.dv sudo nano /home/hts/dvcam.sh ### copy code below #!/bin/bash #/usr/bin/dvgrab -f raw -noavc - | /usr/bin/avconv -i - /usr/bin/ffmpeg -f iec61883 -i auto -vcodec mpeg2video -s 720x576 -r 25 -flags cgop -sc_threshold 1000000000 -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 1.4M -acodec mp2 -ac 2 -b:a 128k -f mpegts pipe:1 ### CTRL +X save sudo chmod +x /home/hts/dvcam.sh If previous attemps were succesful, we can now add the fake DVB stream to Tvheadend. Code: Configuration > DVB Inputs > Networks Add IPTV-network Network name:securitycams create Configuration > DVB Inputs > Muxes Add Mux:securitycams EPG disableinfo URL:pipe:///home/hts/dvcam.sh Interface: enp0s10 Mux name:seccammux create Configuration > DVB Inputs > Services #check this "ipcam" service with VLC #map this channel Quote Link to comment
saarg Posted April 3, 2017 Share Posted April 3, 2017 54 minutes ago, dadarara said: I would like to connect my DV Camera via firewire to the unRAID server for capturing DV video tapes. Long story short - I CAN NOT passthrough the firewire device to any VM as its behind a PCI bridge and cant be configured for separate IOMMU group, I have installed the unRAID DBV edition and I have the firewire device enabled. I even get the video camera recognized as a fw1 device in the system logs. I am not very Linux savvy so I need someone to help me out. I want to configure the TvHeadend to be able to record from non DVB device connected via firewire. I have stumbled upon the bellow instructions but I dont know how to make it work. Hopefully someone will pick this up. Setup non-DVB devices: We will use a FireWire DV camcorder as a source for a Tvheadend tv channel, therefor we will install the following tools which will simplify testing and grabbing dv/hdv video and encoding and mulitplexing it to a fake DVB compatible stream which can be used in Tvheadend. Code: sudo apt-get install dvgrab ffmpeg #test dv video capture dvgrab -noavc testvideo.dv #press CTRL + C top stop capture #playback of captured dv file vlc testvideo.dv sudo nano /home/hts/dvcam.sh ### copy code below #!/bin/bash #/usr/bin/dvgrab -f raw -noavc - | /usr/bin/avconv -i - /usr/bin/ffmpeg -f iec61883 -i auto -vcodec mpeg2video -s 720x576 -r 25 -flags cgop -sc_threshold 1000000000 -b:v 5M -minrate:v 5M -maxrate:v 5M -bufsize:v 1.4M -acodec mp2 -ac 2 -b:a 128k -f mpegts pipe:1 ### CTRL +X save sudo chmod +x /home/hts/dvcam.sh If previous attemps were succesful, we can now add the fake DVB stream to Tvheadend. Code: Configuration > DVB Inputs > Networks Add IPTV-network Network name:securitycams create Configuration > DVB Inputs > Muxes Add Mux:securitycams EPG disableinfo URL:pipe:///home/hts/dvcam.sh Interface: enp0s10 Mux name:seccammux create Configuration > DVB Inputs > Services #check this "ipcam" service with VLC #map this channel The Tvheadend container is not based on Ubuntu, so the first part you can't use, instead use the below: apk --update add dvgrab FFmpeg is already in the container. There is no way to use vlc inside the container, so you would have to check it's working on your desktop. The rest I'm not able to help you with. Quote Link to comment
dadarara Posted April 4, 2017 Share Posted April 4, 2017 Saarg thanks for the input. I am not very adept in linux and in docker/unRAID setup. where exactly should I execute the command? how do I get to the docker linux prompt (or whatever it is)? Quote Link to comment
dadarara Posted April 4, 2017 Share Posted April 4, 2017 succeeded to install the dvgrab. learning all the time, love it.. but apparently I have a problem to make it work. it gives a "Error: no camera exists". When I connect the camera, I get the fw1 device in the unRAID environment. but I dont get it in the guest docker environment. SO I am stuck. anyone can direct me where to dig for an answer ? Quote Link to comment
saarg Posted April 4, 2017 Share Posted April 4, 2017 14 minutes ago, dadarara said: succeeded to install the dvgrab. learning all the time, love it.. but apparently I have a problem to make it work. it gives a "Error: no camera exists". When I connect the camera, I get the fw1 device in the unRAID environment. but I dont get it in the guest docker environment. SO I am stuck. anyone can direct me where to dig for an answer ? So you managed to exec into the container and install dvgrab? You need to pass the fw1 device to the container in the container template. First off you need to find the path of the fw1 device. Search the syslog for anything about fw1. It should be in /dev somewhere. If unsure, post the syslog here. Then you need to add the device in the template. This will destroy the install of dvgrab you did as it deletes the container and installs it again. Click the add another port, variable text and choose device. Then add the path to the device in both host and container fields. Apply and you should have the device passed through. Quote Link to comment
dadarara Posted April 5, 2017 Share Posted April 5, 2017 not working. I am not sure that the /dev/fw0 is the device I need to pass. new device is created as fw1 when I connect the camera. in the unRAID environment: when I connect the video camera I get the following in the syslog tail -f /var/log/syslog Apr 5 11:01:56 Tower kernel: firewire_core 0000:0a:02.0: rediscovered device fw0 Apr 5 11:01:59 Tower kernel: firewire_core 0000:0a:02.0: giving up on node ffc1: reading config rom failed: bus reset Apr 5 11:01:59 Tower kernel: firewire_ohci 0000:0a:02.0: isochronous cycle inconsistent Apr 5 11:02:00 Tower kernel: firewire_core 0000:0a:02.0: rediscovered device fw0 Apr 5 11:02:00 Tower kernel: firewire_core 0000:0a:02.0: created device fw1: GUID 0000850001a0dbbe, S100 Apr 5 11:02:00 Tower kernel: firewire_core 0000:0a:02.0: phy config: new root=ffc1, gap_count=5 Firewire devices and permissions before camera plugged in: ls -ld /dev/fw* crw------- 1 root root 247, 0 Apr 5 08:16 /dev/fw0 Firewire devices and permissions after camera plugged in: ls -ld /dev/fw* crw------- 1 root root 247, 0 Apr 5 08:16 /dev/fw0 crw-rw---- 1 root video 247, 1 Apr 5 11:10 /dev/fw1 Quote Link to comment
saarg Posted April 5, 2017 Share Posted April 5, 2017 I don't know if you need both or only fw1, but doesn't hurt to pass through both. You also need to change permissions on both devices so nobody:users have read/write access. If you want help you need to say more than it doesn't work. Quote Link to comment
dadarara Posted April 7, 2017 Share Posted April 7, 2017 after playing too much with the camera, unfortunately I think my camera DV output is fu$#@%@ed. it recognizes the camera but no DV stream is getting out. some windows programs report errors like "cant find DV output pin" in Linux I get "raw1394 - failed to get handle: No such file or directory." need to get it repaired and then come back to the search.. hope will not cost me a fortune. Quote Link to comment
f451 Posted April 7, 2017 Share Posted April 7, 2017 (edited) Sorry guys but i need help....my wife will kill me, because i've killt the tvheadend installation. Because of an other problem i updated my unraid server and all the plugins and docker images....but now i the tvheadend server does'n work anymore. Can't connect vie web interface and the loging jsut say:[s6-init] making user provided files available at /var/run/s6/etc...exited 0.[s6-init] ensuring user provided files have correct perms...exited 0.[fix-attrs.d] applying ownership & permissions fixes...[fix-attrs.d] done.[cont-init.d] executing container initialization scripts...[cont-init.d] 10-adduser: executing...usermod: no changes-------------------------------------_ _ _| |___| (_) ___| / __| | |/ _ \| \__ \ | | (_) ||_|___/ |_|\___/|_|Brought to you by linuxserver.ioWe gratefully accept donations at:https://www.linuxserver.io/donations/-------------------------------------GID/UID-------------------------------------User uid: 99User gid: 100-------------------------------------[cont-init.d] 10-adduser: exited 0.[cont-init.d] 30-config: executing...[cont-init.d] 30-config: exited 0. UPDTAE:[cont-init.d] done.[services.d] starting services[services.d] done.2017-04-07 15:12:55.334 [ INFO] main: Log started2017-04-07 15:12:55.355 [ INFO] http: Starting HTTP server 0.0.0.0:99812017-04-07 15:12:55.358 [ INFO] htsp: Starting HTSP server 0.0.0.0:99822017-04-07 15:12:55.540 [ INFO] config: backup: migrating config from 4.1-2409~g4db3eec (running 4.1-2493~gb142383a7)2017-04-07 15:12:55.540 [ INFO] config: backup: running, output file /config/backup/4.1-2409~g4db3eec.tar.bz22017-04-07 15:12:55.540 [ INFO] spawn: Executing "/bin/tar" What can i do??? Update: Locks like the main reason was that i configure my rec folder under the config. So he tries to backup all the recordings..... i stopped the docker, delete the backupfile and moved the recordings to an other location. Now i got an endless loop of: 017-04-07 15:49:53.059 [ INFO] config: backup: running, output file /config/backup/4.1-2409~g4db3eec.tar.bz22017-04-07 15:49:53.059 [ INFO] spawn: Executing "/bin/tar"2017-04-07 15:50:08.627 [ INFO] config: backup: completed2017-04-07 15:50:08.633 [ ERROR] START: filename /config/channel/config/tag.tmp is invalid Update2: Got it :-) Delete the tag.tmp and a config.tmp file from the folder /config/channel/config Now i can connect....sorry for tha panic.....but i don't want to explain my wife why the tv doesnt work puhhhh.....weekend can start. Edited April 7, 2017 by f451 Update Quote Link to comment
CHBMB Posted April 7, 2017 Share Posted April 7, 2017 (edited) @f451 I'm sorry but your post made me laugh! I've been there fella, I know that panic. Edited April 7, 2017 by CHBMB Quote Link to comment
saarg Posted April 7, 2017 Share Posted April 7, 2017 3 hours ago, f451 said: Sorry guys but i need help....my wife will kill me, because i've killt the tvheadend installation. Because of an other problem i updated my unraid server and all the plugins and docker images....but now i the tvheadend server does'n work anymore. Can't connect vie web interface and the loging jsut say:[s6-init] making user provided files available at /var/run/s6/etc...exited 0.[s6-init] ensuring user provided files have correct perms...exited 0.[fix-attrs.d] applying ownership & permissions fixes...[fix-attrs.d] done.[cont-init.d] executing container initialization scripts...[cont-init.d] 10-adduser: executing...usermod: no changes-------------------------------------_ _ _| |___| (_) ___| / __| | |/ _ \| \__ \ | | (_) ||_|___/ |_|\___/|_|Brought to you by linuxserver.ioWe gratefully accept donations at:https://www.linuxserver.io/donations/-------------------------------------GID/UID-------------------------------------User uid: 99User gid: 100-------------------------------------[cont-init.d] 10-adduser: exited 0.[cont-init.d] 30-config: executing...[cont-init.d] 30-config: exited 0. UPDTAE:[cont-init.d] done.[services.d] starting services[services.d] done.2017-04-07 15:12:55.334 [ INFO] main: Log started2017-04-07 15:12:55.355 [ INFO] http: Starting HTTP server 0.0.0.0:99812017-04-07 15:12:55.358 [ INFO] htsp: Starting HTSP server 0.0.0.0:99822017-04-07 15:12:55.540 [ INFO] config: backup: migrating config from 4.1-2409~g4db3eec (running 4.1-2493~gb142383a7)2017-04-07 15:12:55.540 [ INFO] config: backup: running, output file /config/backup/4.1-2409~g4db3eec.tar.bz22017-04-07 15:12:55.540 [ INFO] spawn: Executing "/bin/tar" What can i do??? Update: Locks like the main reason was that i configure my rec folder under the config. So he tries to backup all the recordings..... i stopped the docker, delete the backupfile and moved the recordings to an other location. Now i got an endless loop of: 017-04-07 15:49:53.059 [ INFO] config: backup: running, output file /config/backup/4.1-2409~g4db3eec.tar.bz22017-04-07 15:49:53.059 [ INFO] spawn: Executing "/bin/tar"2017-04-07 15:50:08.627 [ INFO] config: backup: completed2017-04-07 15:50:08.633 [ ERROR] START: filename /config/channel/config/tag.tmp is invalid Update2: Got it :-) Delete the tag.tmp and a config.tmp file from the folder /config/channel/config Now i can connect....sorry for tha panic.....but i don't want to explain my wife why the tv doesnt work puhhhh.....weekend can start. Good you got it sorted before your wife killed you Quote Link to comment
gerard6110 Posted April 8, 2017 Share Posted April 8, 2017 First of all thanks for the new version. The setup wizard and the help information are a major improvement compared to tobbens tvheadend docker I was using with KODI to my full satisfaction. However, as we are advised to switch to this version (same as for oscam), this week I tried it. After the wizard my channels were not numbered however. Is this correct behavious or did this have to do that during the wizard is not asking for a card reader and which was therefore not yet configured correctly for communication with tvheadend? At least it would be nice that the card reader option (CA) is also incorporated into the wizard. Oscam is working fine, although while selecting the exact same config path as I had with tobbens docker I had to manually copy the config information into the new config files, as the path was changed. Another folder 'oscam' was created inside the config folder. Why? Then with oscam running succesfully (after the initial hickup), I tried switching to LS TVheadend. I backed up my tvheadend folder, installed the new docker pointing to the same folders and was up and running in no time. So far so good. However, and I have not read through all the pages here before, because I would imagine it would have been solved long time ago if it was picked up, I am throwing in my issue here just like that. There is a communication error between kodi and this new tv headend concerning instant recording. Instant recording and stopping directly from within tvheadend is fine. However not from within KODI. Starting instanct recording is fine. Instant stopping indeed stops the recording, however: - the indicator remains on recording - there's no on screen message that the recoding is stopped - in tvheadend appears a red exclamation mark like a failed recording, which is not correct as it stopping was a purposely manual action and thus it should present in tvheadend the green ok indicator if a correct finished recording. - trying to instant record that show again results in a 'PVR backend error. Check the log for more information about this message. OK'; which log? The new version also failed to record autocreated shows. This morning I installed the LS tvheadend again completely from scratch with empty config folder, during which I noticed the wizard - very very good, except for above comments - but still the same issue. Not sure if recording autocreated shows would fail too, but with this - I would say basic - instant recording issue there's no reason for me to check other things. Hope this can be solved quickly; until then I will stick with my proven tobben docker. Quote Link to comment
saarg Posted April 8, 2017 Share Posted April 8, 2017 12 minutes ago, gerard6110 said: First of all thanks for the new version. The setup wizard and the help information are a major improvement compared to tobbens tvheadend docker I was using with KODI to my full satisfaction. However, as we are advised to switch to this version (same as for oscam), this week I tried it. After the wizard my channels were not numbered however. Is this correct behavious or did this have to do that during the wizard is not asking for a card reader and which was therefore not yet configured correctly for communication with tvheadend? At least it would be nice that the card reader option (CA) is also incorporated into the wizard. Oscam is working fine, although while selecting the exact same config path as I had with tobbens docker I had to manually copy the config information into the new config files, as the path was changed. Another folder 'oscam' was created inside the config folder. Why? Then with oscam running succesfully (after the initial hickup), I tried switching to LS TVheadend. I backed up my tvheadend folder, installed the new docker pointing to the same folders and was up and running in no time. So far so good. However, and I have not read through all the pages here before, because I would imagine it would have been solved long time ago if it was picked up, I am throwing in my issue here just like that. There is a communication error between kodi and this new tv headend concerning instant recording. Instant recording and stopping directly from within tvheadend is fine. However not from within KODI. Starting instanct recording is fine. Instant stopping indeed stops the recording, however: - the indicator remains on recording - there's no on screen message that the recoding is stopped - in tvheadend appears a red exclamation mark like a failed recording, which is not correct as it stopping was a purposely manual action and thus it should present in tvheadend the green ok indicator if a correct finished recording. - trying to instant record that show again results in a 'PVR backend error. Check the log for more information about this message. OK'; which log? The new version also failed to record autocreated shows. This morning I installed the LS tvheadend again completely from scratch with empty config folder, during which I noticed the wizard - very very good, except for above comments - but still the same issue. Not sure if recording autocreated shows would fail too, but with this - I would say basic - instant recording issue there's no reason for me to check other things. Hope this can be solved quickly; until then I will stick with my proven tobben docker. I think you have us mixed up here. We do not make tvheadend and can't do anything about bugs in tvheadend/kodi plugin. We simply package tvheadend into a container. The wizard is a part of tvheadend. 1. You can't copy the config from my old containers directly to the linuxserver versions. Best thing is to start with a fresh new config. For oscam you can copy the old files when you see how the folder structure is in the new container. 2. Anything with problems recording and info in kodi is not something we can solve. 3. If there are no numbers on the channels in tvheadend, simply set them yourself. This depends on whether or not you set the use providers channel number when you added your network/muxes (can't remember which one it is). If it's in Kodi, you need to set the use channel numbers from backend to on. 4. The reason why you get a red exclamation mark when doing instant recordings is that you abort it if you hit the stop recording button. Instatn recording in Kodi either records for specified amount of minutes or the whole show as found in the EPG data. If you then stop the recording, it's aborted. This you have to ask the tvheadend plugin author (or kodi) about why it doesn't stop it gracefully. 5. You can see the logs of tvheadend if you push the log button on the docker page. But only the latest entries. If you want more, you can leave the tvheadend webgui open and open the log window in the bottom with the two arrows pointing up. You can see the reason for shows not recorded in the failed recordings tab of tvheadend. Quote Link to comment
Living Legend Posted April 24, 2017 Share Posted April 24, 2017 (edited) Long time mythTV user here. I'm on the HDHR3 (Prime), so I'm using a cable card and have 3 tuners. I've been trying to get things up and running on TVHeadend, but experiencing the usual issues that people seem to have where you need to go with IPTV, create an M3U playlist file, etc. Is anyone else using the HDHR Prime and TVheadend docker for live tv? And how'd you go about resolving your issues? Edited April 24, 2017 by Living Legend Quote Link to comment
saarg Posted April 24, 2017 Share Posted April 24, 2017 8 hours ago, Living Legend said: Long time mythTV user here. I'm on the HDHR3 (Prime), so I'm using a cable card and have 3 tuners. I've been trying to get things up and running on TVHeadend, but experiencing the usual issues that people seem to have where you need to go with IPTV, create an M3U playlist file, etc. Is anyone else using the HDHR Prime and TVheadend docker for live tv? And how'd you go about resolving your issues? What is the issue with IPTV and creating a m3u file? Quote Link to comment
Living Legend Posted April 24, 2017 Share Posted April 24, 2017 In the log I'm told that 33 minutes ago, saarg said: What is the issue with IPTV and creating a m3u file? iptv: unknown playlist format for network 'IPTV Automatic Network' Outside of this, what other upkeep is there? To be honest, I really don't have many issues with mythTV. It automatically downloads from schedule direct so I don'to have to do any manual uploads. It recognizes the channels without me having to trick it by creating this playlist. What are the perks of TVheadend that have people using it over something like MythTV? Quote Link to comment
saarg Posted April 24, 2017 Share Posted April 24, 2017 (edited) 10 minutes ago, Living Legend said: In the log I'm told that iptv: unknown playlist format for network 'IPTV Automatic Network' Outside of this, what other upkeep is there? To be honest, I really don't have many issues with mythTV. It automatically downloads from schedule direct so I don'to have to do any manual uploads. It recognizes the channels without me having to trick it by creating this playlist. What are the perks of TVheadend that have people using it over something like MythTV? People seem to use tvheadend over mythtv because of channel switching speed I have heard. Personally I never managed mythtv to see my tuners. How did you add your Hdhomerun? You are supposed to add it as a device as far as I know. But I don't have one, so someone else that have one needs to verify this. You need to use host networking to get tvheadend to see your Hdhomerun. Edited April 24, 2017 by saarg Quote Link to comment
Living Legend Posted April 24, 2017 Share Posted April 24, 2017 9 minutes ago, saarg said: People seem to use tvheadend over mythtv because of channel switching speed I have heard. Personally I never managed mythtv to see my tuners. How did you add your Hdhomerun? You are supposed to add it as a device as far as I know. But I don't have one, so someone else that have one needs to verify this. You need to use host networking to get tvheadend to see your Hdhomerun. I didn't have any problems adding the device. it shows up when I'm using host: The problem is scanning for the channels. When I set up with the network, I can get the tuners to scan for any channels because of this workaround attempt: Quote Link to comment
saarg Posted April 24, 2017 Share Posted April 24, 2017 3 hours ago, Living Legend said: I didn't have any problems adding the device. it shows up when I'm using host: The problem is scanning for the channels. When I set up with the network, I can get the tuners to scan for any channels because of this workaround attempt: If you go here it's explained how to set it up. Post your m3u file as it might not be correct. You should also limit the input streams to the tuners available on the HDHomerun. You are on the latest tvheadend version and not stable right? Quote Link to comment
Living Legend Posted April 24, 2017 Share Posted April 24, 2017 I'm on Build: 4.1-2541~g41fa62d87. And yes, thanks for reminding me about declaring max tuners. I'll take a look at that link. Thanks. Quote Link to comment
DZMM Posted May 15, 2017 Share Posted May 15, 2017 On 3/26/2017 at 5:48 PM, DZMM said: Totally correct - my problems were all Android. From SBMC: https://github.com/koying/SPMC/issues/754#issuecomment-281215588 SPMC working brilliantly - if anyone else is having android client problems, this is probably the answer. It also has some neat ANdroid TV support (recommendations, now playing) that Kryton doesn't. FYI If anyone is having with lag in the android builds of Kodi V17 the latest V18 alphas fix the problem. I just installed the 20170515 nightly and apart from a slight initial delay when changing to a few HD channels (acceptable as before couldn't watch at all), tvheadend works perfectly Quote Link to comment
himisk71 Posted May 19, 2017 Share Posted May 19, 2017 i have installed tvheadend 4.3-68~gce6f517 in an ubuntu vm. if i crate a docker with tvheadend, is there any chance to get the records (and maybe the cofigs/channels) over there? Quote Link to comment
saarg Posted May 19, 2017 Share Posted May 19, 2017 6 minutes ago, himisk71 said: i have installed tvheadend 4.3-68~gce6f517 in an ubuntu vm. if i crate a docker with tvheadend, is there any chance to get the records (and maybe the cofigs/channels) over there? It should work if you copy every file/folder in the .hts folder to the appdata folder of the Tvheadend container. You probably also need to have the same path for recordings inside the container. You might not need it, but I never tried. Quote Link to comment
himisk71 Posted May 19, 2017 Share Posted May 19, 2017 (edited) 25 minutes ago, saarg said: ou probably also need to have the same path for recordings inside the container thats bad, because i have in the ubuntu mapped "/home/user/Aufnahmen" to "/mnt/user/Aufnahmen/", but in the in the docker config i write immediately "/mnt/user/Aufnahmen/". that you cannot import "old" records is the most bad thing within tvheadend Edited May 19, 2017 by himisk71 Quote Link to comment
saarg Posted May 19, 2017 Share Posted May 19, 2017 10 minutes ago, himisk71 said: thats bad, because i have in the ubuntu mapped "/home/user/Aufnahmen" to "/mnt/user/Aufnahmen/", but in the in the docker config i write immediately "/mnt/user/Aufnahmen/". that you cannot import "old" records is the most bad thing within tvheadend There is no problem getting the recordings to the container. I did not say it wasn't possible. You can remove the mapping you did for the container and add a new one. When you add the new mapping be sure to name the container path the same you have in the Tvheadend config in Ubuntu and you should be good. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.