Project

General

Profile

Unable to record (or stream)

Added by James Stewart over 6 years ago

Hi all -

I've spent the last few weeks trying to get tvh running on my DS218+. I'm running tvh 4.4.20180311 on Synology DSM 6.1.7-15284.

After a lot of mucking around I've got all the muxes and EPG working perfectly. However, when I go to record - a file is created but will only generate a file about 500kb big and then it will stop / fail. If I open that file in Plex 2 second of video will play (with no audio) and that's the end of the file. I also piped tvh into Plex as a plug-in for live streaming and the streams will fail to play as well. I suspect something is wrong with the audio but that's only a guess.

Here are the logs from tvh below. Any suggestions what could be happening here? I've tried changing the streaming profile but I'm only guessing at what I should be doing here.

2018-05-25 01:13:58.894 dvr: entry 13819cc06feb3b78050021cb0df6ebe2 "Shortland Street" on "TVNZ 2" starting at 2018-05-25 01:09:30, with broadcast id "", scheduled for recording by "James"
2018-05-25 01:13:58.894 dvr: "Shortland Street" on "TVNZ 2" recorder starting
2018-05-25 01:13:58.895 mpegts: raw.m3u8 - TVNZ 2 in Freeview - tuning on IPTV #1
2018-05-25 01:13:58.895 subscription: 0002: "DVR: Shortland Street" subscribing on channel "TVNZ 2", weight: 500, adapter: "IPTV #1", network: "Freeview", mux: "raw.m3u8 - TVNZ 2", provider: "FFmpeg", service: "Service01", profile="pass"
2018-05-25 01:13:59.078 libav: AVFormatContext: Opening 'https://d2k40ydor517br.cloudfront.net/Channel-2/0a0a3e2a-b366-4b2b-b2a5-80eaa4ba4a77' for reading
2018-05-25 01:13:59.218 libav: AVFormatContext: Opening 'crypto+https://ditqhbg3dqptg.cloudfront.net/master_5_500060.ts?m=1524167288' for reading
2018-05-25 01:13:59.476 libav: AVFormatContext: Application provided invalid, non monotonically increasing dts to muxer in stream 1: 3744792988 >= 3744792988
2018-05-25 01:13:59.476 iptv: libav: Error muxing packet: Invalid argument
2018-05-25 01:13:59.477 dvr: /volume1/Video/Recordings/Shortland Street.ts from adapter: "IPTV #1", network: "Freeview", mux: "raw.m3u8 - TVNZ 2", provider: "FFmpeg", service: "Service01"
2018-05-25 01:13:59.477 dvr: # type lang resolution aspect ratio sample rate channels
2018-05-25 01:13:59.477 dvr: 1 H264 ? ?
2018-05-25 01:13:59.477 dvr: 2 AAC-LATM 96000 ?


Replies (8)

RE: Unable to record (or stream) - Added by Mark Clarkstone over 6 years ago

James Stewart wrote:

Hi all -

I've spent the last few weeks trying to get tvh running on my DS218+. I'm running tvh 4.4.20180311 on Synology DSM 6.1.7-15284.

After a lot of mucking around I've got all the muxes and EPG working perfectly. However, when I go to record - a file is created but will only generate a file about 500kb big and then it will stop / fail. If I open that file in Plex 2 second of video will play (with no audio) and that's the end of the file. I also piped tvh into Plex as a plug-in for live streaming and the streams will fail to play as well. I suspect something is wrong with the audio but that's only a guess.

Here are the logs from tvh below. Any suggestions what could be happening here? I've tried changing the streaming profile but I'm only guessing at what I should be doing here.

2018-05-25 01:13:58.894 dvr: entry 13819cc06feb3b78050021cb0df6ebe2 "Shortland Street" on "TVNZ 2" starting at 2018-05-25 01:09:30, with broadcast id "", scheduled for recording by "James"
2018-05-25 01:13:58.894 dvr: "Shortland Street" on "TVNZ 2" recorder starting
2018-05-25 01:13:58.895 mpegts: raw.m3u8 - TVNZ 2 in Freeview - tuning on IPTV #1
2018-05-25 01:13:58.895 subscription: 0002: "DVR: Shortland Street" subscribing on channel "TVNZ 2", weight: 500, adapter: "IPTV #1", network: "Freeview", mux: "raw.m3u8 - TVNZ 2", provider: "FFmpeg", service: "Service01", profile="pass"
2018-05-25 01:13:59.078 libav: AVFormatContext: Opening 'https://d2k40ydor517br.cloudfront.net/Channel-2/0a0a3e2a-b366-4b2b-b2a5-80eaa4ba4a77' for reading
2018-05-25 01:13:59.218 libav: AVFormatContext: Opening 'crypto+https://ditqhbg3dqptg.cloudfront.net/master_5_500060.ts?m=1524167288' for reading
2018-05-25 01:13:59.476 libav: AVFormatContext: Application provided invalid, non monotonically increasing dts to muxer in stream 1: 3744792988 >= 3744792988
2018-05-25 01:13:59.476 iptv: libav: Error muxing packet: Invalid argument
2018-05-25 01:13:59.477 dvr: /volume1/Video/Recordings/Shortland Street.ts from adapter: "IPTV #1", network: "Freeview", mux: "raw.m3u8 - TVNZ 2", provider: "FFmpeg", service: "Service01"
2018-05-25 01:13:59.477 dvr: # type lang resolution aspect ratio sample rate channels
2018-05-25 01:13:59.477 dvr: 1 H264 ? ?
2018-05-25 01:13:59.477 dvr: 2 AAC-LATM 96000 ?

Try disabling "Use A/V Library" in the network.

RE: Unable to record (or stream) - Added by Robert Cameron over 6 years ago

Tvheadend does not support HLS streams. Your IPTV stream needs to be a single continuous MPEG-TS, not a segmented stream.

RE: Unable to record (or stream) - Added by Mark Clarkstone over 6 years ago

Robert Cameron wrote:

Tvheadend does not support HLS streams. Your IPTV stream needs to be a single continuous MPEG-TS, not a segmented stream.

Ah yes, good catch!

RE: Unable to record (or stream) - Added by James Stewart over 6 years ago

Robert Cameron wrote:

Tvheadend does not support HLS streams. Your IPTV stream needs to be a single continuous MPEG-TS, not a segmented stream.

Hi Robert and Mark, thanks for the quick reply!! I'm sure you guys know a lot more than I do, I'm a little suspicious that this is the issue. The reason I say that is there's a lot of people in New Zealand using the same streams on tvh and they're not having the same issue. The place we've I've got these from is here: https://www.matthuisman.nz/2017/07/new-updated-nz-iptv-files.html

RE: Unable to record (or stream) - Added by James Stewart over 6 years ago

Actually, I think you might be right. Reading that link, I couldn't get the http://iptv.matthuisman.nz/nz/tvh-tv.m3u8 link to work (probably because of ffmpeg). I instead used the raw link (http://iptv.matthuisman.nz/nz/raw-tv.m3u8) but he says

"These m3u8 files are made to be imported into Tvheadend as an IPTV Automatic Network. All the streams are piped to ffmpeg to re-container them as MPEG-TS. Therefore, they require ffmpeg to be installed on the system running Tvheadend and that it's path is /usr/bin/ffmpeg (symlink if different). If you don't have ffmpeg, you could try using the above RAW files instead - but you may find quite a few streams will not work without being piped through ffmpeg. I suggest a google for "how to install ffmpeg on XX". The steps are usually pretty easy."

I think my issue is with getting ffmpeg working on this Synology NAS. I think ffmpeg is installed automatically in DSM 6, when I SSH in and go to /usr/bin I can see ffmpeg in there. But I can also download ffmpeg from the package store in DSM.

So I guess the question is now - how do I troubleshoot why I can't get ffmpeg to process these streams?

RE: Unable to record (or stream) - Added by James Stewart over 6 years ago

Here's the log from tvh when I use the non-raw m3u8:

2018-05-25 11:25:43.943 mpegts: tvh-tv.m3u8 - The Edge TV in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.943 subscription: 0001: "scan" subscribing to mux "tvh-tv.m3u8 - The Edge TV", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.943 mpegts: tvh-tv.m3u8 - ThreeLife in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.943 subscription: 0002: "scan" subscribing to mux "tvh-tv.m3u8 - ThreeLife", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.943 mpegts: tvh-tv.m3u8 - TVSN Shopping in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.943 subscription: 0003: "scan" subscribing to mux "tvh-tv.m3u8 - TVSN Shopping", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.944 mpegts: tvh-tv.m3u8 - Bravo in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.944 subscription: 0004: "scan" subscribing to mux "tvh-tv.m3u8 - Bravo", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.944 mpegts: tvh-tv.m3u8 - DUKE in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.944 subscription: 0005: "scan" subscribing to mux "tvh-tv.m3u8 - DUKE", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.944 mpegts: tvh-tv.m3u8 - TVNZ 1 in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.945 subscription: 0006: "scan" subscribing to mux "tvh-tv.m3u8 - TVNZ 1", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.945 mpegts: tvh-tv.m3u8 - TVNZ 2 in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.947 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.45.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.45 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.948 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.65.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.65 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.948 subscription: 0007: "scan" subscribing to mux "tvh-tv.m3u8 - TVNZ 2", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.948 mpegts: tvh-tv.m3u8 - Al Jazeera in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.948 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.51.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.51 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.948 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.55.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.55 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.950 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.12.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.12 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.950 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.10.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.10 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.950 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.46.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.46 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.950 subscription: 0008: "scan" subscribing to mux "tvh-tv.m3u8 - Al Jazeera", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.950 mpegts: tvh-tv.m3u8 - CTV 8 in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.951 subscription: 0009: "scan" subscribing to mux "tvh-tv.m3u8 - CTV 8", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.951 mpegts: tvh-tv.m3u8 - Redbull TV in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.951 subscription: 000A: "scan" subscribing to mux "tvh-tv.m3u8 - Redbull TV", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.951 mpegts: tvh-tv.m3u8 - Wairarapa TV in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.951 subscription: 000B: "scan" subscribing to mux "tvh-tv.m3u8 - Wairarapa TV", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.951 mpegts: tvh-tv.m3u8 - Three in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.951 subscription: 000C: "scan" subscribing to mux "tvh-tv.m3u8 - Three", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.952 mpegts: tvh-tv.m3u8 - Shine TV in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.952 subscription: 000D: "scan" subscribing to mux "tvh-tv.m3u8 - Shine TV", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.952 mpegts: tvh-tv.m3u8 - Firstlight in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.952 subscription: 000E: "scan" subscribing to mux "tvh-tv.m3u8 - Firstlight", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.952 mpegts: tvh-tv.m3u8 - Television 33 in Freeview - tuning on IPTV #1
2018-05-25 11:25:43.952 subscription: 000F: "scan" subscribing to mux "tvh-tv.m3u8 - Television 33", weight: 5, adapter: "IPTV #1", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.952 mpegts: tvh-tv.m3u8 - Parliament TV in Freeview - tuning on IPTV #2
2018-05-25 11:25:43.953 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.21.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.21 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.954 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.60.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.60 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.955 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.9.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.9 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.955 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.11.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.11 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.955 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.redbull.tv.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.redbull.tv -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.956 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.8.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.8 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.956 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -i rtmp://streamer1.streamhost.org/salive/GMIFLNL -vcodec copy -acodec copy -metadata service_name=tv.39 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.956 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.7.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.7 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:43.956 subscription: 0010: "scan" subscribing to mux "tvh-tv.m3u8 - Parliament TV", weight: 5, adapter: "IPTV #2", network: "Freeview", service: "Raw PID Subscription"
2018-05-25 11:25:43.958 iptv: libav: Could not open input 'pipe:///usr/bin/ffmpeg -loglevel fatal -headers X-Forwarded-For:\ 202.89.4.222\r\nUser-Agent:\ FMLE/3.0\ (compatible;\ FMSc/1.0)\r\n -i http://iptv.matthuisman.nz/nz/tv.18.m3u8 -vcodec copy -acodec copy -metadata service_name=tv.18 -f mpegts pipe:1': Invalid data found when processing input
2018-05-25 11:25:58.943 mpegts: tvh-tv.m3u8 - TVNZ 2 in Freeview - scan no data, failed
2018-05-25 11:25:58.943 subscription: 0007: "scan" unsubscribing
2018-05-25 11:25:58.943 mpegts: tvh-tv.m3u8 - TVNZ 1 in Freeview - scan no data, failed
2018-05-25 11:25:58.943 subscription: 0006: "scan" unsubscribing
2018-05-25 11:25:58.943 mpegts: tvh-tv.m3u8 - DUKE in Freeview - scan no data, failed
2018-05-25 11:25:58.943 subscription: 0005: "scan" unsubscribing
2018-05-25 11:25:58.943 mpegts: tvh-tv.m3u8 - Bravo in Freeview - scan no data, failed
2018-05-25 11:25:58.943 subscription: 0004: "scan" unsubscribing
2018-05-25 11:25:58.943 mpegts: tvh-tv.m3u8 - TVSN Shopping in Freeview - scan no data, failed
2018-05-25 11:25:58.943 subscription: 0003: "scan" unsubscribing
2018-05-25 11:25:58.943 mpegts: tvh-tv.m3u8 - ThreeLife in Freeview - scan no data, failed
2018-05-25 11:25:58.943 subscription: 0002: "scan" unsubscribing
2018-05-25 11:25:58.943 mpegts: tvh-tv.m3u8 - The Edge TV in Freeview - scan no data, failed
2018-05-25 11:25:58.943 subscription: 0001: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Parliament TV in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 0010: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Television 33 in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 000F: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Firstlight in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 000E: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Shine TV in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 000D: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Three in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 000C: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Wairarapa TV in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 000B: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Redbull TV in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 000A: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - CTV 8 in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 0009: "scan" unsubscribing
2018-05-25 11:25:58.950 mpegts: tvh-tv.m3u8 - Al Jazeera in Freeview - scan no data, failed
2018-05-25 11:25:58.950 subscription: 0008: "scan" unsubscribing

RE: Unable to record (or stream) - Added by James Stewart over 6 years ago

Got there in the end. Found a different m3u8 URL to use (from the same guy though) and unselected "Use A/V Library" and the scans and recording started working.

Thanks for your help here guys, this stuff's bloody confusing when you're starting out.

    (1-8/8)