Is there a crash course on transcoding?

I’m really ignorant on how transcoding may be affecting my setup.

So here is what I have:

  1. SERVER
    Channels DVR running on Linux, Processor I3-2100 3.1 GHz, 8GB RAM.

  2. CLIENTS
    Windows 10 PC (I5 with 8GB RAM)
    Windows 10 PC (AMD A8-7410, 8GB RAM)
    ShieldTV 2017
    iPad Pro
    Samsung Smart TV

We typically never have more than 2 streams going at any time.
We only watch OTA content, typically recorded.

QUESTIONS:

  1. Is the server powerful enough to handle any transcoding that needs to take place?
  2. Is the server doing hardware transcoding or software transcoding? How can I tell?
  3. Which of my clients will require a transcode to view the OTA content?
  4. Do the clients do any transcoding, or is all that done at the server?
  5. When a transcode is required, does it complete the transcode before we view the content? Or does it try to transcode while we are viewing the content?

Transcoding is something that happens on the server in real time, to convert video to a smaller size or to a different video format. It is only required for web based playback, or if you’re streaming over the internet away from home.

You can switch between hardware and software transcoding on the DVR web UI. Your server should support both. Hardware transcoding is more power efficient but can produce lower quality video.

For any client in your home running a native Channels app, no transcoding occurs.

Wow. So only my Windows PC clients are getting transcoded content.

When I look at the server gui it only has an option for ‘software transcoding’

What Linux distro? There are some instructions on our DVR download page about how to set up permissions for hardware transcoding access.

FreeNAS 11.1 Stable

Oh, that’s FreeBSD not Linux. FreeBSD does not support hardware transcoding,

That is good to know. I can install Linux Mint. Would that support hardware transcoding?

Yes

I installed Linux (Mint) on the server. I also successfully got hardware transcoding working.

It didn’t resolve any of my performance problems though. Many channels are just unable to play. I’m confused by this because my server’s processor and RAM that are well above the minimum requirements. After all, I’m only attempting to transcode one stream at a time.

It seems as though the clients that have a native channels app work very well. But any attempt to use a PC as a client is pointless.

I’m trying really hard to like Channels DVR, but this is becoming frustrating and discouraging.

So you’re having issues playing live tv on the PCs? But the iPad and SHIELD are fine?

What exactly is happening? What does the Log tab of the DVR show when something fails to play.

Correct. The Web clients that require transcoding are having problems. It says the transcoder is starting but it never really works. Just a spinning wheel.

Here is what I see in the log:

2018/09/27 20:15:27 [HLS] Starting transcoder for channel 11.1 from 192.168.0.108 (encoder=h264_vaapi, resolution=1080, deinterlacer=hardware, bitrate=8000)
[ac3 @ 0x2afdfc0] frame sync error
Error while decoding stream #0:2: Invalid data found when processing input
[ac3 @ 0x2b8a340] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x2b8e5c0] Queue input is backward in time
[aac @ 0x2b8b740] Queue input is backward in time
Could not write header for output file #0 (incorrect codec parameters ?): Permission denied
Error initializing output stream 0:0 –
[aac @ 0x2b8b740] 2 frames left in the queue on closing
[aac @ 0x2b8e5c0] 2 frames left in the queue on closing
2018/09/27 20:15:37 [WRN] Buffer for 106202B3 ch11.1 is more than 50% full (clients=1, len=16777816)
2018/09/27 20:15:42 [WRN] Buffer for 106202B3 ch11.1 is more than 75% full (clients=1, len=25167184)
2018/09/27 20:15:45 [WRN] Buffer for 106202B3 ch11.1 is more than 95% full (clients=1, len=31878784)
2018/09/27 20:15:46 [HLS] Stopping transcoder session ch11.1-dANY-ip192.168.0.108 @ 0s
2018/09/27 20:15:46 [TNR] Closed connection to 106202B3 for ch11.1

Looks like a permissions error trying to write to the Streaming folder in your DVR storage location

I think you are correct. This is probably because I moved the storage from another server. Let me check on permissions and UIDs.

Thanks for the tip

1 Like

I was able to resolve the permission error so I’m getting closer. This is what I’m getting now:

2018/09/28 04:50:06 [HLS] Starting transcoder for channel 11.1 from 192.168.0.111 (encoder=h264_vaapi, resolution=1080, deinterlacer=blend, bitrate=8000)
[ac3 @ 0x21c82c0] frame sync error
Error while decoding stream #0:2: Invalid data found when processing input
[ac3 @ 0x21c7880] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
[aac @ 0x21c5480] Queue input is backward in time
[aac @ 0x21c4f00] Queue input is backward in time
[hls @ 0x2239ec0] Non-monotonous DTS in output stream 0:1; previous: 4800, current: 3840; changing to 4801. This may result in incorrect timestamps in the output file.
[hls @ 0x2239ec0] Non-monotonous DTS in output stream 0:2; previous: 6996, current: 6036; changing to 6997. This may result in incorrect timestamps in the output file.
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
Error while decoding stream #0:1: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
Error while decoding stream #0:1: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 2)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
Error while decoding stream #0:2: Error number -16976906 occurred
Error while decoding stream #0:1: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
Error while decoding stream #0:1: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 2)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
Error while decoding stream #0:1: Error number -16976906 occurred
Error while decoding stream #0:2: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
Error while decoding stream #0:1: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
[ac3 @ 0x21c82c0] new coupling strategy must be present in block 0
[ac3 @ 0x21c82c0] error decoding the audio block
Error while decoding stream #0:1: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
Last message repeated 1 times
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
Error while decoding stream #0:1: Error number -16976906 occurred
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 1)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 2)
[mpegts @ 0x2197800] Dropped corrupted packet (stream = 0)
Error while decoding stream #0:2: Error number -16976906 occurred
Error while decoding stream #0:1: Error number -16976906 occurred
2018/09/28 04:50:39 [HLS] Stopping transcoder session ch11.1-dANY-ip192.168.0.111 @ 32.515811s
2018/09/28 04:50:39 [TNR] Closed connection to 106202B3 for ch11.1

Does the video play now?

On your iOS device, try setting the Home Quality to 720p and see if it plays there.

Video only plays on one of the two PCs. The other one I get only audio. When I set the quality to 720p I don’t get nearly as many Dropped Corrupted Packet errors. But the video still hangs.

Many of the channels are playing okay at 720p. Some are hanging on video only.

iOS is fine though

So transcoded video going to the iOS Channels app plays just fine.

But transcoded video going to Windows PC is not playing well. What browser are you using? Can you try Chrome?

How about transcoded video going to iOS Safari?

I was using Microsoft Edge. Now that I’m using Chrome many of my issues are disappearing.

I still have a few channels that give some scary errors in the log file, but they all are playing audio and video now so I’m encouraged with the results.

The errors in the log are harmless. Most of them are just when first tuning into the stream and its discarding partial frames.

I’ll see if there’s something weird going on with Edge.

EDIT: Tested with Microsoft Edge 42.17134.1.0 and I’m seeing the same problem.

Thank you so much for the hand-holding. This looks like a good solution for my family’s needs

1 Like