The only thing actually being used there is format=ts
, which gives you an MPEG2-TS stream.
It's overriding codec=copy
, which would give you an HLS stream.
So you are saying that format=ts is enough no need to use codec=copy ?
Yes, probably don't even need format=ts
either when using stream.mpg
, since stream.mpg
is already in TS format. Here's what Channels DVR passes to my VLC when using the VLC player integration to play my TVE ABC channel http://192.168.1.4:8190/devices/ANY/channels/6001/stream.mpg
and it's a MPEG2 Transport Stream.
codec=copy
is only used for an HLS stream, so it doesn't transcode the source audio or video to another codec.
This is how I have mine. I feed ome CDVR server from another. I agree with everyone else..
http://192.168.12.30:8089/devices/TVE-YouTubeTV/channels.m3u?format=ts
I took out the format=ts&gracenote=include&codec=copy and it started transcoding which I do not want..... So I will leave it the way I had it.... got interrupted recordings which is no big deal as there is nothing really airing at the moment. Perhaps just leaving this would be enough ... format=ts&gracenote=include
2024/06/03 07:00:09.641006 [ENC] Starting encoder for ch8.1 in C:\DVR\Streaming\ch8.1-dANY-ip192.168.50.68-676606534\encoder-1-2851166405 at 1 (1.342067) (encoder=h264_mf, codec=h264, acodec=aac, resolution=1080, deinterlacer=blend, bitrate=9488, segment_size=0.01)
2024/06/03 07:00:11.294007 [HLS] ffmpeg: ch8.1-dANY-ip192.168.50.68-1-h264-aac-copy--9488-256-1080-6-0---false-false-0.01-0: [h264_mf @ 0000000001f90980] stream format change
2024/06/03 07:00:13.567173 [DVR] indexed 838 airings (118 channels) [6s fetch, 460ms index]
2024/06/03 07:00:19.907240 [DVR] indexed 41 movies (16 channels) [6s fetch, 36ms index]
2024/06/03 07:00:19.912166 [DVR] Fetching guide data for 106 stations in X-TVE @ 2024-06-17 6:00AM
2024/06/03 07:00:23.059539 [DVR] indexed 705 airings (106 channels) [2s fetch, 326ms index]
2024/06/03 07:00:30.170362 [DVR] indexed 22 movies (8 channels) [7s fetch, 34ms index]
2024/06/03 07:00:30.176302 [DVR] Fetching guide data for 169 stations in X-M3U @ 2024-06-17 12:00PM
2024/06/03 07:00:39.477649 [HLS] Stopping inactive session ch8.1-dANY-ip192.168.50.68
2024/06/03 07:00:39.478240 [HLS] Stopping transcoder session ch8.1-dANY-ip192.168.50.68 (out=33.607644s finished=false first_seq=1 last_seq=17)
with format=ts&gracenote=include&codec=copy it just opened the connection no transcoding ... which is what I want.
2024/06/03 07:06:46.557280 [TNR] Opened connection to 107829D3/0 for ch8.1 KGW
I am not sure that works with when you have ANY when using ANY M3U from dvr to dvr. http://192.168.50.215:8089/devices/ANY/channels.m3u internally defaults to hls ... so format=ts is required.
#EXTINF:-1 channel-id="2.1" tvg-id="2.1" tvg-chno="2.1" tvg-logo="https://tmsimg.fancybits.co/assets/s28708_h3_aa.png?w=360&h=270" tvc-guide-stationid="20292" tvg-name="KATUDT" group-title="Favorites",ABC
http://192.168.50.215:8089/devices/ANY/channels/2.1/hls/master.m3u8?
This works for me ....
Yes when using url format=ts will not transcode. No need for codec=copy which is for hls remux only. Ts is faster to tune but hls is more robust with latency.
Reply without codec=copy it transcodes hls
That’s using text to build the source, using ts and url to build the source like @slampman above format=ts doesn’t transcode
That is without codec=copy ... I will just leave it the way I know it works....unless someone has a better way to do DVR to DVR sending all Channels without transcoding.
024/06/03 09:42:13.436259 [HLS] Starting live stream for channel 8.1 from fe80::d7ab:9d86:a511:77ce%Ethernet
2024/06/03 09:42:15.434900 [HLS] Probed live stream in 1.9986412s: mpeg2video 1920x1080 tt 7061801bps
2024/06/03 09:42:17.108474 [DVR] indexed 3539 airings (368 channels) [3s fetch, 1s index]
2024/06/03 09:42:18.053465 [DVR] indexed 153 movies (48 channels) [851ms fetch, 93ms index]
2024/06/03 09:42:18.063391 [DVR] Fetching guide data for 368 stations in X-M3U @ 2024-06-05 3:30AM
2024/06/03 09:42:18.219199 [HLS] Session ch8.1-dANY-ipfe80--d7ab-9d86-a511-77ce-Ethernet started in 4.7829399s
2024/06/03 09:42:18.223553 [ENC] Starting encoder for ch8.1 in C:\ChannelsDVR\Streaming\ch8.1-dANY-ipfe80--d7ab-9d86-a511-77ce-Ethernet-1597732575\encoder-1-2226916698 at 1 (2.454633) (encoder=h264_mf, codec=h264, acodec=aac, resolution=1080, deinterlacer=blend, bitrate=9488, segment_size=0.01)
2024/06/03 09:42:18.764637 [HLS] ffmpeg: ch8.1-dANY-ipfe80--d7ab-9d86-a511-77ce-Ethernet-1-h264-aac---9488-256-1080-6-0---false-false-0.01-0: [h264_mf @ 0000000001247ec0] stream format change
This is with =ts and without codec=copy
2024/06/03 11:14:56.166794 [TNR] Opened connection to xxxxxxxxx/0 for ch19.1 KCPT-1
2024/06/03 11:15:06.602752 [SNR] Statistics for ch19.1 KCPT-1: ss=100% snq=82%,79%-88% seq=100% bps=6457875,1075360-7899008 pps=552,92-676
2024/06/03 11:15:06.602971 [SNR] Buffer statistics for xxx.cxx.xxx.57 ([email protected] (xxx.cxx.xxx.57)) for ch19.1 KCPT-1: buf=0% drop=0%
2024/06/03 11:15:06.615080 [TNR] Closed connection to xxxxx/0 for ch19.1 KCPT-1
2024/06/03 11:18:44.117158 [TNR] Opened connection to xxxxxxxxx/0 for ch19.1 KCPT-1
2024/06/03 11:19:20.511817 [SNR] Statistics for ch19.1 KCPT-1: ss=100% snq=88%,73%-100% seq=100% bps=7462848,1696512-7908032 pps=639,145-677
2024/06/03 11:19:20.512010 [SNR] Buffer statistics for xxx.cxx.xxx.57 ([email protected] (100.120.137.57)) for ch19.1 KCPT-1: buf=0% drop=0%
2024/06/03 11:19:20.523070 [TNR] Closed connection to xxxxxxxxx/0 for ch19.1 KCPT-1
No transcode
I might be confusing myself going to get another cup of coffee doing too many things at once ... I will try it again your way.
Think you're confusing two things.
The first is how you get an m3u playlist from Channels DVR.
http://192.168.50.215/devices/ANY/channels.m3u
This provides an m3u playlist and takes parameters like format=ts (for an MPEG-TS playlist), or nothing (for an HLS playlist), or codec=copy (for an HLS playlist)
The second is the url inside the returned playlist that gets passed back to Channels DVR when that item in the playlist is selected to play/record.
Inside an HLS playlist would be
http://192.168.50.215:8089/devices/ANY/channels/2.1/hls/master.m3u8
Notice the /hls/master.m3u8
that specifies an HLS stream
Inside an MPEG-TS playlist would be
http://192.168.50.215:8089/devices/ANY/channels/2.1/stream.mpg
Notice the stream.mpg
that specifies an MPEG-TS stream
I am ok the format=ts did the trick by itself ...
http://192.168.50.215:8089/devices/ANY/channels.m3u?gracenote=include&format=ts
It’s theoretically possible that the TVE playlist does something funny during commercials and doesn’t update for a bit… we could look at increasing the timeout to 30 seconds and see if it makes a difference. It doesn’t really make sense to me that this would be happening, though.
Also, you could try using the new segmenter on your backend DVR and see if you see any difference.
Thank you, I'll give that a try and report back.
This might help.
No issues so far with the updated timeout. The new segmenter seems to work fine between 2 DVRs on the same network, but it I enable it on my main DVR I get non-stop buffering on remote streams.
That's very strange. Thanks for reporting this.