PlexConnect icon indicating copy to clipboard operation
PlexConnect copied to clipboard

Transcode=Auto option does not work well with h.264 AVC3 streams.

Open bjornaelvoet opened this issue 6 years ago • 5 comments

Input:

option transcode=auto ffmpeg -i snippet_avc3.mp4 => Stream #0:0(und): Video: h264 (Constrained Baseline) (avc3 / 0x33637661), yuv420p, 768x432 [SAR 1:1 DAR 16:9], 1549 kb/s, 25 fps, 25 tbr, 19200 tbn, 50 tbc (default)

Behavior:

Apple TV starts playing the video with correct audio, but with black movie images (so no correct video images).

Problem root cause:

Line 1184 in XMLConverter.py:

videoATVNative =
Media.get('protocol','-') in ("hls")
or
Media.get('container','-') in ("mov", "mp4") and
Media.get('videoCodec','-') in ("mpeg4", "h264", "drmi") and
Media.get('audioCodec','-') in ("aac", "drms") # remove AC3 when Dolby Digital is Off

videoATVNative is programmed to identify this AVC3 stream as TRUE, while the Apple TV 3th generation is unable to play this video file correctly (start playing with audio, but shows continuously black images).

Resolution:

If possible; detect if the h264 stream is either AVC1 or AVC3 or anything else (for future). If not AVC3, default to transcoding and only do directplay if AVC1.

bjornaelvoet avatar Jan 13 '20 18:01 bjornaelvoet

snippet_avc3.zip

Example video of AVC3 stream in attachment.

bjornaelvoet avatar Jan 13 '20 19:01 bjornaelvoet

Thanks for reporting the problem in such a detailed way. I would prefer to eliminate the Transcoder Action setting and leave Transcode as the only available option. Virtually all other PMS clients rely on the transcoder decision engine instead of having their own (like PlexConnect still has).

In ancient days, when ARMv5 and PPC were PMS supported platforms, that would have been a problem because the transcoder was not included in PMS for those platforms, but today all supported PMS platforms support the transcoder, even if it reverts to direct stream or direct play, so I think that it will not be a problem if I remove that parameter. What do you think ?

moodyblue avatar Jan 18 '20 18:01 moodyblue

Hi,

Up to you to decide.

I like things being more simple (so less features/options); this leads typically to more stability/maintainability. So my vote goes also to removing the option or at least defaulting this option to Transcode and warn the user on potential playback problems with the option auto.

At least this "problem" has been reported, so it might help other people with troubleshooting.

I already put The Transcoder Action to Transcode which takes the issue of the non-playable video away :-)

Thanks!

bjornaelvoet avatar Jan 20 '20 08:01 bjornaelvoet

Transcoder action setting has been removed and defaulted to Transcode

moodyblue avatar Jan 24 '20 15:01 moodyblue

I made a comment on the commit but now see that this is where you made the decision to remove the Transcoder Action. But my installation ALWAYS transcodes with that commit. When i revert i get DirectPlay working again. So this doesn't appear to be working as intended. Is anyone getting DirectPlay on 0.7 install?

grockk avatar Mar 17 '20 18:03 grockk