Transcoding instead of remuxing

DVR version 2020.03.06.0221
Playing a TVE stream Live locally to a web browser with setting Web Player Server Quality 1080p@10mbps

It's transcoding instead of remuxing and can't keep up with the Live feed, so keeps pausing and stuttering.

2020/03/06 14:19:13.817573 [TVE] stream timestamps: diy: start_at=2020-03-06T14:19:12-08:00 current_at=2020-03-06T14:19:39-08:00 end_at=2020-03-06T14:19:43-08:00
2020/03/06 14:19:13.817661 [TNR] Opened connection to TVE-Comcast_SSO for ch6108 DIY
2020/03/06 14:19:13.818676 [HLS] Starting transcoder for channel 6108 from 192.168.1.2 (encoder=remux, resolution=, deinterlacer=, bitrate=0)
2020/03/06 14:19:14.764140 [HLS] Probed live stream in 945.146021ms: h264 1920x1080 progressive 5171200bps
2020/03/06 14:19:14.781447 [HLS] Session ch6108-dANY-ip192.168.1.2 started in 3.691762564s
2020/03/06 14:19:14.785089 [ENC] Starting encoder for ch6108 in /volume1/arkives/ChannelsDVR/Streaming/ch6108-dANY-ip192.168.1.2-150953418/encoder-1-815011724 at 1 (0.024267) (encoder=libx264, resolution=720, deinterlacer=linear, bitrate=5171 segment_size=0.01)
2020/03/06 14:19:43.789102 [ENC] Segment 16 has unexpected duration: inputs=20-21 expected=0.333678 actual=0.400411 expected_pts=16.407333-16.707644 actual_pts=16.383078-16.750122
2020/03/06 14:20:16.397540 [ENC] Segment 27 has unexpected duration: inputs=36-37 expected=1.368044 actual=1.434766 expected_pts=34.265078-35.599744 actual_pts=34.240833-35.642222
2020/03/06 14:20:26.171551 [HLS] Stopping transcoder session ch6108-dANY-ip192.168.1.2 (out: 1m15.221333s, finished: false)
2020/03/06 14:20:26.201084 [ENC] Stopped encoder for ch6108 in /volume1/arkives/ChannelsDVR/Streaming/ch6108-dANY-ip192.168.1.2-150953418/encoder-1-815011724 after encoding 1 to 31
2020/03/06 14:20:26.201471 [HLS] ffmpeg: ch6108-dANY-ip192.168.1.2-remux:  [mpegts @ 0x2a95180] Dropped corrupted packet (stream = 0)
2020/03/06 14:20:26.215084 [TNR] Closed connection to TVE-Comcast_SSO for ch6108 DIY

If I change the Settings to use the Old Encoder, it remuxes and works fine.

2020/03/06 14:24:50.997331 [TVE] stream timestamps: diy: start_at=2020-03-06T14:24:50-08:00 current_at=2020-03-06T14:25:10-08:00 end_at=2020-03-06T14:25:19-08:00
2020/03/06 14:24:50.997469 [TNR] Opened connection to TVE-Comcast_SSO for ch6108 DIY
2020/03/06 14:24:51.627269 [HLS] Probed live stream in 629.285621ms: h264 1920x1080 progressive 5444050bps
2020/03/06 14:24:51.629832 [HLS] Starting transcoder for channel 6108 from 192.168.1.2 (encoder=remux, resolution=, deinterlacer=linear, bitrate=10000)
2020/03/06 14:25:41.762404 [HLS] Stopping transcoder session ch6108-dANY-ip192.168.1.2 (out: 1m1.482667s, finished: false)
2020/03/06 14:25:41.779210 [TNR] Closed connection to TVE-Comcast_SSO for ch6108 DIY

It seems to be transcoding to 720p@5Mbps, whereas the old transcoder seems to properly pass along the 1080p@10Mbps settings. (Although, the resolution is left blank in the "old" transcoder, seemingly to maintain original resolution.)

Exactly why I posted the logs.
[HLS] Probed live stream in 945.146021ms: h264 1920x1080 progressive 5171200bps
...
[ENC] Starting encoder... (encoder=libx264, resolution=720, deinterlacer=linear, bitrate=5171 segment_size=0.01)

Agreed. Definitely something wonky going on here.

(I wonder, you don't happen to have adaptive web streaming enabled, by chance? Only thing I could think of that might help narrow the field ...)

Also transcodes playing back the TVE recording.

2020/03/06 15:26:49.947781 [ENC] Starting encoder for Rustic Renovation S01E08 2017-08-08 Rustic on the River 2020-03-06-1307.mpg in /volume1/arkives/ChannelsDVR/Streaming/file1-ip192.168.1.2-958545511/encoder-0-133713562 at 0 (0.000000) (encoder=libx264, resolution=720, deinterlacer=linear, bitrate=4918 segment_size=0.01)
2020/03/06 15:28:21.373761 [ENC] Stopped encoder for Rustic Renovation S01E08 2017-08-08 Rustic on the River 2020-03-06-1307.mpg in /volume1/arkives/ChannelsDVR/Streaming/file1-ip192.168.1.2-958545511/encoder-0-133713562 after encoding 0 to 33

Enabling Old Transcoder, it streams direct.

Which web browser? Could be trying to use adaptive streaming.

Nope

Firefox v73.0.1 (64 bit)

I had just reinstalled Channels DVR on this NAS from scratch (didn't restore anything).
I think some setting wasn't being reflected accurately in the web UI.
I changed all the settings for Transcoder, Web Player and Experimental, then changed them back.
It now works. :man_shrugging:

I can try to duplicate this by reinstalling again from scratch.

How soon (during install) can I access the settings at http://127.0.0.1:8089/settings ?

I start by installing the Synology package ChannelsDVR_1.0.5.spk from https://getchannels.com/dvr-server/#synology
If I remember, it automatically updates to the latest release version 2020.02.26.0338 on startup.
Then I add the TVE device and wait for it to authorize channels and load the guide.
It was at this point I tested playing a TVE channel live using Firefox from my windows pc on the network.

You can access the settings right away. It does seem like something is not set correctly on fresh install. @eric will know better when he returns from a trip next week.

Duplicated it. It's transcoding TVE Live viewing in Firefox.

web UI Settings screen and settings.json agree with each other, except there's no entry in the settings.json for Web Player Server Quality or Client Buffer
"transcoder.deinterlacer": "linear",
"transcoder.disable_adaptive_streaming": "true",

Live%20transcoding%20activity

2 Likes

Just opening the dropdown for Web Player Server Quality and not making any change created the necessary entries in the settings.
"transcoder.bitrate": "10000",
"transcoder.deinterlacer": "linear",
"transcoder.disable_adaptive_streaming": "true",
"transcoder.resolution": "1080",

1 Like