IPTV VoD pipe example
Added by Ruediger Koenen over 5 years ago
Hi All,
Since day I'm trying to VoD provided by my IPTV provider up and running. So far, I've tried everything what I have found. But without any success.
Out of the channel list of the provider, for each video a MUX has been created. Now I'm looking forward to stream these videos. When putting the URL into e.g. VLC, it's working fine. When trying to get it via TVH, I'm now lost in space.
Going to Config -> DVB Input -> Muxes I open the VoD Mux and adding to Environment (pipe):
pipe:///usr/bin/ffmpeg -i "${URL}"-vcodec copy -acodec copy -f mpegts pipe:1
However, when trying to watch the video by click on play, VLC comes up, but nothing happen
May 28 23:55:13 kpvr tvheadend[454]: http: 172.16.1.20: using ticket EB7AA0AA18BA4A593F2B91539DBF2C3B58C3269B for /stream/mux/8a7473406474ea753bca352ca7016786
May 28 23:55:13 kpvr tvheadend[454]: mpegts: siptveu.m3u - 2 Fast 2 Furious (2003) Movie MultiSub in KN-SIPTVEU - tuning on IPTV
May 28 23:55:13 kpvr tvheadend[454]: subscription: 1FC2: "HTTP" subscribing to mux "2 Fast 2 Furious (2003) Movie MultiSub", weight: 10, adapter: "IPTV", network: "KNIPTV", service: "Raw PID Subscription", hostname="172.16.1.20", client="VLC/3.0.6 LibVLC/3.0.6"
May 28 23:55:29 kpvr tvheadend[454]: subscription: 1FC2: service instance is bad, reason: No input detected
May 28 23:55:31 kpvr tvheadend[454]: subscription: 1FC2: No input source available for subscription "HTTP" to mux "2 Fast 2 Furious (2003) Movie MultiSub in KNIPTV"
May 28 23:55:31 kpvr tvheadend[454]: webui: Couldn't start streaming /stream/mux/8a7473406474ea753bca352ca7016786?ticket=EB7AA0AA18BA4A593F2B91539DBF2C3B58C3269B, No input detected
May 28 23:55:31 kpvr tvheadend[454]: subscription: 1FC2: "HTTP" unsubscribing, hostname="172.16.1.20", client="VLC/3.0.6 LibVLC/3.0.6"
Any suggestion?
Many thanks and best regards,
Ruediger
Replies (5)
RE: IPTV VoD pipe example - Added by Hiro Protagonist over 5 years ago
I think there should be a space after "${URL}"
If it still doesn't work, try out ffmpeg on the commandline:
export URL="url goes here"
ffmpeg -i "${URL}"
Some IPTV providers require a User Agent header.
RE: IPTV VoD pipe example - Added by Ruediger Koenen over 5 years ago
Good Morning,
Many thanks! The space has been added, but still no success. Even when I replace "${URL}" with the .mp4 or .mkv link.
When trying on command line the result is:
ffmpeg -i "${URL}"
ffmpeg version 3.2.14-1~deb9u1+rpt1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, matroska,webm, from 'http://SECRET.mkv':
Metadata:
encoder : libebml v1.3.5 + libmatroska v1.4.8
creation_time : 2018-05-17T13:29:04.000000Z
Duration: 01:47:35.91, start: 0.000000, bitrate: 2726 kb/s
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x816 [SAR 1:1 DAR 40:17], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 2498002
DURATION-eng : 01:47:35.831000000
NUMBER_OF_FRAMES-eng: 154785
NUMBER_OF_BYTES-eng: 2015835001
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
Metadata:
BPS-eng : 224000
DURATION-eng : 01:47:35.913000000
NUMBER_OF_FRAMES-eng: 302621
NUMBER_OF_BYTES-eng: 180765611
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:2(eng): Subtitle: subrip (default)
Metadata:
BPS-eng : 56
DURATION-eng : 01:40:33.181000000
NUMBER_OF_FRAMES-eng: 1243
NUMBER_OF_BYTES-eng: 42399
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:3(gre): Subtitle: subrip
Metadata:
BPS-eng : 69
DURATION-eng : 01:46:50.077000000
NUMBER_OF_FRAMES-eng: 828
NUMBER_OF_BYTES-eng: 55653
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:4(heb): Subtitle: subrip
Metadata:
BPS-eng : 55
DURATION-eng : 01:46:51.836000000
NUMBER_OF_FRAMES-eng: 832
NUMBER_OF_BYTES-eng: 44491
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:5(dut): Subtitle: subrip
Metadata:
BPS-eng : 35
DURATION-eng : 01:36:31.568000000
NUMBER_OF_FRAMES-eng: 984
NUMBER_OF_BYTES-eng: 25590
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:6(pol): Subtitle: subrip
Metadata:
BPS-eng : 48
DURATION-eng : 01:39:49.339000000
NUMBER_OF_FRAMES-eng: 1162
NUMBER_OF_BYTES-eng: 36421
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:7(por): Subtitle: subrip
Metadata:
BPS-eng : 50
DURATION-eng : 01:40:55.294000000
NUMBER_OF_FRAMES-eng: 1088
NUMBER_OF_BYTES-eng: 38530
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:8(rum): Subtitle: subrip
Metadata:
BPS-eng : 49
DURATION-eng : 01:40:04.800000000
NUMBER_OF_FRAMES-eng: 1072
NUMBER_OF_BYTES-eng: 36860
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:9(srp): Subtitle: subrip
Metadata:
BPS-eng : 38
DURATION-eng : 01:38:34.103000000
NUMBER_OF_FRAMES-eng: 798
NUMBER_OF_BYTES-eng: 28588
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:10(tur): Subtitle: subrip
Metadata:
BPS-eng : 38
DURATION-eng : 01:40:24.441000000
NUMBER_OF_FRAMES-eng: 809
NUMBER_OF_BYTES-eng: 28836
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:11(ara): Subtitle: subrip
Metadata:
BPS-eng : 141
DURATION-eng : 01:40:22.621000000
NUMBER_OF_FRAMES-eng: 1063
NUMBER_OF_BYTES-eng: 106697
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:12(bul): Subtitle: subrip
Metadata:
BPS-eng : 73
DURATION-eng : 00:52:32.903000000
NUMBER_OF_FRAMES-eng: 560
NUMBER_OF_BYTES-eng: 29076
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:13(chi): Subtitle: subrip
Metadata:
BPS-eng : 226
DURATION-eng : 01:47:32.468000000
NUMBER_OF_FRAMES-eng: 1356
NUMBER_OF_BYTES-eng: 182519
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:14(hrv): Subtitle: subrip
Metadata:
BPS-eng : 32
DURATION-eng : 01:35:27.630000000
NUMBER_OF_FRAMES-eng: 1071
NUMBER_OF_BYTES-eng: 23335
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:15(cze): Subtitle: subrip
Metadata:
BPS-eng : 39
DURATION-eng : 01:39:35.832000000
NUMBER_OF_FRAMES-eng: 1071
NUMBER_OF_BYTES-eng: 29403
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:16(dan): Subtitle: subrip
Metadata:
BPS-eng : 38
DURATION-eng : 01:39:32.443000000
NUMBER_OF_FRAMES-eng: 1022
NUMBER_OF_BYTES-eng: 29026
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:17(ger): Subtitle: subrip
Metadata:
BPS-eng : 0
DURATION-eng : 01:37:44.787000000
NUMBER_OF_FRAMES-eng: 10
NUMBER_OF_BYTES-eng: 256
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:18(spa): Subtitle: subrip
Metadata:
BPS-eng : 45
DURATION-eng : 01:39:26.376000000
NUMBER_OF_FRAMES-eng: 1081
NUMBER_OF_BYTES-eng: 34192
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
Stream #0:19(fre): Subtitle: subrip
Metadata:
BPS-eng : 40
DURATION-eng : 01:36:17.869000000
NUMBER_OF_FRAMES-eng: 1018
NUMBER_OF_BYTES-eng: 29272
_STATISTICS_WRITING_APP-eng: mkvmerge v21.0.0 ('Tardigrades Will Inherit The Earth') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2018-05-17 13:29:04
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
At least one output file must be specified
Any hint?
Many thanks!!
RE: IPTV VoD pipe example - Added by saen acro over 5 years ago
There is to be used more advanced command line because stream is not so Mpeg2 standard (ISO/IEC 13818) supported.
Or with other words:
Video: h262-h264-h265
Audio: mpeg1/2 aac ac3 dts
subtitles: dvb subtitles, teletext subtitles
Find a way to burn-in subtitles or remove it.
ffmpeg -i "sample.mkv" -y -c:v copy -map 0:0 -bsf h264_mp4toannexb -c:a ac3_fixed -b:a 640000 -ar 48000 -ac 6 -map 0:1 -f mpegts -threads 0 -crf 23 -f mpegts pipe:1
RE: IPTV VoD pipe example - Added by Ruediger Koenen over 5 years ago
Sorry, it's still a pain in ... and I'm also still in the limbo with the pipe configuration.
Is there any way to get it via the thv web gui running?
Many thanks and best regards,
Ruediger
RE: IPTV VoD pipe example - Added by Eric S over 5 years ago
I don't know if my question goes here or not but I want to give this a try.
I made a custom m3u playlist of a couple of IPTV channels that I wanted to have running through my TVheadend server (4.2.7-44 LibreELEC Tvh-addon v9.0.118)
Several of the IPTV channels work just find but there are a few that are really stubborn. They work when I am checking the channels in VLC but when I put them into Tvh the Mux scan result is "FAIL". I even had one working just fine for a couple of hours, then it failed and I could not get it to work again.
I found on one page to use "wget --user-agent="HTS/tvheadend" http://URL." to test the site and it comes back with a 401 error, so the provider is agent filtering. If you change the user-agent to anything else or even drop it the stream works just fine, but I don't know how to put that information into the Mux so it will pull the data. I understand that the User Agent is the tool being used to pull the stream, but it should be able to be spoofed in some way. I have seen several sites that list a "pipe" method but I have no idea how to implement it.
Can anyone help?
Eric