-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPTV Multirec Scheduling not working #1053
Comments
@gigem can you please have a look at how this can be done? I did have a look myself a while ago but it is not obvious to me where and how to make changes. I try to stay close to the DVB tuner model where a capture card is connected to at most one video source. |
Just noticed that back to back recordings worked, same channel with two programs with modified start/end offset, therefor overlapping and recording at the same time. |
Are you receiving a Transport Stream via IPTV? I would expect you to be able to record from any "programs" within that Transport Stream. If instead, you are wanting to record simultaneous programs which are not in the same Transport Stream, then you would need a separate recorder/input for each one. |
HLS using tcp or udp: Capture card #71: https://api.init7.net/tvchannels.m3u
Capture card #81: https://api.init7.net/tvchannels.m3u?rp=true (not included in the original posts .csv files)
I can simultaneously record one program on each of the capture cards, each having it's own video source (same program data but different source-id) and input connection. |
Maybe I wrote this issue without emphasizing that multiple IPTV recordings are not the problem; the actual issue is that scheduling isn't working. After interpreting the following: When mplexid=0 it allows recording only when the two to be compared chanid's are the same. After setting mplexid=1 for the IPTV channels, I was able to multirecord different channels on the same capture card. Looking at scheduler.cpp it seems it additionally takes the sourceid in consideration, but not the capture capture capabilities (DVB,IPTV,other cards) and reduces it to only checking the DVB mplex, and when not set (mplexid==0), limiting it to allow scheduling only on the same channel. To not over-complicate the source the IPTV channel scan could set the mplexid=-1 or null, making it clear it is not an DVB mplex, however that crashed mythbackend during startup. Either choose =1 or maybe a sentinel value. mplexid=0 would still work for all other cards, possible those who anyway do not allow or are not capable of multirecording different channels. |
Hi @angelaschmid I am not able to reproduce IPTV multirec for different channels on the same capture card. For this test I did the following:
What does work for me is having one video source and multiple capture cards connecting to that single video source; then I can record as many channels simultaneously as there are capture cards. The way how it works with the DVB multirec is there is for each additional recording a virtual capture card created which then gets a copy of the data received by the one and only physical capture card. So I think that what we need for IPTV multirec is to use the existing mechanism that creates virtual capture cards but for IPTV multirec it must get the data from IP just like the real capture card instead of getting a copy of the data of the real capture card. |
I had the virtual capture cards configured with the web-setup: Max Recordings (Interactions Between Inputs) is set to 8 As I have two IPTV capture cards (tcp and udp) I could run 15 (not 16) simultaneous recordings. One culprit I found was that Why 15 instead of 16: I haven't figured that out:
When stopping another recording, I could restart the recording, without any further issues. There might be a MythTV limitation of the available sockets, maybe there is a MythTV http connection pool/manager. Another issue I found, during having these 15 recordings simultaneous running, I had some additional conflicting recordings, after I stopped some recordings, and restarted the conflicting recordings, they started, even that the max recordings was surpassed, they failed at the end. Somehow the scheduler did not check continuously for conflicts. Maybe it does not reschedule failed recordings, to set it to conflicting, as there is only one status, and just starts the recording on a restart. What I also noticed, as I have three input sources (DVB: 4x, IPTV tcp, IPTV udp), the failed or conflicting scheduled recordings, never changed the capture card, e.g. moving from IPTV tcp to IPTV udp. With DVB it changes the capture card, maybe it is related to the sourceid, which is the same for the DVB cards. Maybe to have this working I would need to configure to use only on input source for the capture cards. I mention this, because during adding a recording, say for a "tcp" channel, it used a "udp" channel, but during reschedule conflicts it does not change anymore. Maybe I am talking about failed recordings, as said before they are not rescheduled. The mentioned issues are complaints on a very high level (live is too short to view so many recordings), and for sure would need some further investigation. |
Sorry for the slow response. My internet has been fubar for most of the last two days due to storm damage. I hope to get it fully fixed this afternoon. I'll try to look tomorrow or over the weekend. It's going to depend on how the IPTV recorder was designed. If it was originally derived from the DVB recorder, it might just need a small tweak. If not, it could be a much bigger task. As an alternative, John Poet's black-box, external recorder can be used for IPTV. I know it supports multirec. |
A bit of context might be useful. The typical IPTV stream is a single program transport stream so it is a transport stream but with one video stream, one audio stream and sometimes a few subtitle streams. Sometimes there is the possibility to select one of many video streams but these then have a different bitrate/quality but it is the same program. MythTV always selects the stream with the highest bitrate. To play around with this, do create an IPTV capture card and a videosource and use for example A minimal configuration consists of one capture card (in which the URL is specified) connected to one video source. What we want to achieve is that we can receive multiple channels simultaneously and that the capture cards for these additional channels are created automatically. This similar to what is done for DVB multirec. Angela reports that she gets it running with only a few hacks (setting schedorder to a value > 0, setting mplexid to 1 and pre-creating the virtual tuners) and this sounds promising but I have not been able to reproduce this. |
I can now reproduce this. Had missed the mplexid of one channel. This then caused the termination of the first recording when starting the second recording. |
@angelaschmid, how did you configure the 8 recordings setting? Did you do it through the web UI or mythtv-setup? As for the IPTV recorder not currently supporting multirec, in theory, it can and probably should. Making it do so, however, will require some refactoring. I don't remember all of the details but at a minimum, it needs to support the concept of a "master" channel. Look at dvbchannel.{h,cpp}, hdhrchannel.{h,cpp} and ExternalChannel.{h,cpp} for examples. @jpoet, is probably more familiar with it all than I am. I've only dabbled in the recorder code over the years but he still actively maintains the external recorder. |
@angelaschmid @gigem @jpoet please have a look at my comment from yesterday starting with
and please comment. We do need to have a common understanding of what this feature request is about! |
|
@angelaschmid, thanks. That's what I suspected and I'll file a ticket for the web UI not to allow that. Your only solution for the near term is to set schedule as group to false and max recordings back to 1 for your existing tuner and create, independent tuners for however many simultaneous streams you want to record. |
@kmdewaal, I skimmed all of the earlier comments but they don't really matter. The IPTV recorder, as currently written, doesn't support multirec. To support it, someone will have to modify it to support the concept of a "master" tuner and possibly some other things I'm forgetting. Even then, it will likely only really support overlapping recordings of the same stream. That is essentially how the external recorder and HDHR recorder (when using virtual channels) work now. |
see #1057 |
The issue previously mentioned with the maximum 15 recordings (7xudp, 8xtcp), might be caused by the maximum allowed multicast groups, either by my router or my provider, allowing only max. 7 groups. @gigem
It would still be nice to have the maximum recordings be set and generated by the Web UI:
|
@angelaschmid, @bennettpeter is going to make the necessary changes in the web UI to prevent misconfiguring multirec for IPTV tuners. I fear there is still a misunderstanding on your part, though, as you keep saying master and virtual tuners. The IPTV tuner cannot support multirec (master and virtual tuners are only used with multrec) due to missing support. Until someone submits a patch with that support or one of the developers adds it, it will stay this way. Note that if you want to have basic, multirec support to record overlapping parts of the same stream, you can currently switch to using the external recorder. The only extra thing you would need to do is convert the m3u file to the format needed by the external recorder. |
Multiple recordings with an IPTV input connection is not working. Max Recordings (Interactions Between Inputs) is set to 8.
capturecard.csv
inputgroup.csv
Multirec with DVB works.
The text was updated successfully, but these errors were encountered: