Server Version#: v1.19.4.2902-69560ce1e - QNAP TS-251+ x86_64 - build: linux-x86_64 qnap
Player Version#: Plex for Samsung 4.25.2
I need some help trying to understand how to make my Samsung TV direct play my PAL DVD videos instead of transcoding them. I am experiencing this issue with both 4:3 and 16:9 PAL videos.
I have begun ripping my DVD collection to mp4 using Handbrake and am stumped as to why Plex is deciding to transcode the PAL 576p video stream (and direct stream the audio) on the Samsung app but direct plays them on all other clients (Android TV, Windows app, web player). Yet weirdly the same Samsung client will happily direct play NTSC 480p videos and 1080p! So the issue seems to be specific to this particular resolution.
My sample PAL 576p 4:3 video looks like this in MediaInfo:
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 16 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1 min 0 s
Bit rate : 2 260 kb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.218
Stream size : 16.2 MiB (85%)
Writing library : x264 core 157 r2935 545de2f
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2020-06-04 18:33:43
Tagged date : UTC 2020-06-04 18:33:43
Color range : Limited
Color primaries : BT.601 PAL
Transfer characteristics : BT.709
Matrix coefficients : BT.601
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 min 0 s
Bit rate mode : Constant
Bit rate : 384 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 2.70 MiB (14%)
Title : Surround
Language : English
Default : Yes
Alternate group : 1
Encoded date : UTC 2020-06-04 18:33:43
Tagged date : UTC 2020-06-04 18:33:43
The Plex library XML for this is:
<Video ratingKey="23728" key="/library/metadata/23728" guid="file:///share/CACHEDEV1_DATA/Multimedia/Films/South%20Park%20Bigger%2C%20Longer%20%26%20Uncut%20%281999%29/Trailer/Test%20South%20Park%20PAL%20SD.mp4" type="clip" title="Test South Park PAL SD" summary="" index="5" thumb="/library/metadata/23728/thumb/1591295829" subtype="trailer" duration="60011" addedAt="1591295827" updatedAt="1591295829" extraType="1">
<Media id="20533" duration="60011" bitrate="2643" width="720" height="576" aspectRatio="1.33" audioChannels="6" audioCodec="aac" videoCodec="h264" videoResolution="576" container="mp4" videoFrameRate="PAL" optimizedForStreaming="0" audioProfile="lc" has64bitOffsets="0" videoProfile="high">
<Part id="20862" key="/library/parts/20862/0/file.mp4" duration="60011" file="/share/CACHEDEV1_DATA/Multimedia/Films/South Park Bigger, Longer & Uncut (1999)/Trailer/Test South Park PAL SD.mp4" size="19824480" audioProfile="lc" container="mp4" has64bitOffsets="0" optimizedForStreaming="0" videoProfile="high">
<Stream id="44795" streamType="1" default="1" codec="h264" index="0" bitrate="2260" anamorphic="1" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="576" codedWidth="720" colorPrimaries="bt470bg" colorRange="tv" colorSpace="smpte170m" colorTrc="bt709" frameRate="25.000" hasScalingMatrix="0" height="576" level="40" pixelAspectRatio="16:15" profile="high" refFrames="16" streamIdentifier="1" width="720" displayTitle="480p (H.264)" />
<Stream id="44796" streamType="2" selected="1" default="1" codec="aac" index="1" channels="6" bitrate="383" language="English" languageCode="eng" audioChannelLayout="5.1" profile="lc" samplingRate="48000" streamIdentifier="2" displayTitle="English (AAC 5.1)" />
</Part>
</Media>
</Video>
My sample PAL 576p 16:9 video looks like this in MediaInfo:
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 16 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3 min 0 s
Bit rate : 1 852 kb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.179
Stream size : 39.7 MiB (83%)
Writing library : x264 core 157 r2935 545de2f
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2020-06-04 17:57:12
Tagged date : UTC 2020-06-04 17:57:12
Color range : Limited
Color primaries : BT.601 PAL
Transfer characteristics : BT.709
Matrix coefficients : BT.601
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 3 min 0 s
Bit rate mode : Constant
Bit rate : 368 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 7.90 MiB (17%)
Title : Surround
Language : English
Default : Yes
Alternate group : 1
Encoded date : UTC 2020-06-04 17:57:12
Tagged date : UTC 2020-06-04 17:57:12
The Plex library XML for this is:
<Video ratingKey="23729" key="/library/metadata/23729" guid="file:///share/CACHEDEV1_DATA/Multimedia/Films/South%20Park%20Bigger%2C%20Longer%20%26%20Uncut%20%281999%29/Trailer/Test%20South%20Park%20PAL%20SD%20Wide.mp4" type="clip" title="Test South Park PAL SD Wide" summary="" index="6" thumb="/library/metadata/23729/thumb/1591304678" subtype="trailer" duration="60048" addedAt="1591304677" updatedAt="1591304678" extraType="1">
<Media id="20540" duration="60048" bitrate="2715" width="720" height="576" aspectRatio="1.78" audioChannels="6" audioCodec="aac" videoCodec="h264" videoResolution="576" container="mp4" videoFrameRate="PAL" optimizedForStreaming="0" audioProfile="lc" has64bitOffsets="0" videoProfile="high">
<Part id="20869" key="/library/parts/20869/0/file.mp4" duration="60048" file="/share/CACHEDEV1_DATA/Multimedia/Films/South Park Bigger, Longer & Uncut (1999)/Trailer/Test South Park PAL SD Wide.mp4" size="20382118" audioProfile="lc" container="mp4" has64bitOffsets="0" optimizedForStreaming="0" videoProfile="high">
<Stream id="44809" streamType="1" default="1" codec="h264" index="0" bitrate="2332" anamorphic="1" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="576" codedWidth="720" colorPrimaries="bt470bg" colorRange="tv" colorSpace="smpte170m" colorTrc="bt709" frameRate="24.980" hasScalingMatrix="0" height="576" level="40" pixelAspectRatio="64:45" profile="high" refFrames="16" streamIdentifier="1" width="720" displayTitle="480p (H.264)" />
<Stream id="44810" streamType="2" selected="1" default="1" codec="aac" index="1" channels="6" bitrate="383" language="English" languageCode="eng" audioChannelLayout="5.1" profile="lc" samplingRate="48000" streamIdentifier="2" displayTitle="English (AAC 5.1)" />
</Part>
</Media>
</Video>
My sample NTSC 480p video looks like this in MediaInfo:
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 16 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3 min 48 s
Bit rate : 3 119 kb/s
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.301
Stream size : 85.1 MiB (87%)
Writing library : x264 core 157 r2935 545de2f
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date : UTC 2020-06-04 18:01:55
Tagged date : UTC 2020-06-04 18:01:55
Color range : Limited
Color primaries : BT.601 NTSC
Transfer characteristics : BT.709
Matrix coefficients : BT.601
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 3 min 48 s
Bit rate mode : Constant
Bit rate : 449 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 12.2 MiB (13%)
Title : Surround
Language : English
Default : Yes
Alternate group : 1
Encoded date : UTC 2020-06-04 18:01:55
Tagged date : UTC 2020-06-04 18:01:55
The Plex library XML for this is:
<Video ratingKey="23726" key="/library/metadata/23726" guid="file:///share/CACHEDEV1_DATA/Multimedia/Films/South%20Park%20Bigger%2C%20Longer%20%26%20Uncut%20%281999%29/Trailer/Test%20Broly%20NTSC%20SD.mp4" type="clip" title="Test Broly NTSC SD" summary="" index="3" thumb="/library/metadata/23726/thumb/1591295828" subtype="trailer" duration="228862" addedAt="1591295827" updatedAt="1591295828" extraType="1">
<Media id="20531" duration="228862" bitrate="3576" width="720" height="480" aspectRatio="1.33" audioChannels="6" audioCodec="aac" videoCodec="h264" videoResolution="480" container="mp4" videoFrameRate="NTSC" optimizedForStreaming="0" audioProfile="lc" has64bitOffsets="0" videoProfile="high">
<Part id="20860" key="/library/parts/20860/0/file.mp4" duration="228862" file="/share/CACHEDEV1_DATA/Multimedia/Films/South Park Bigger, Longer & Uncut (1999)/Trailer/Test Broly NTSC SD.mp4" size="102302405" audioProfile="lc" container="mp4" has64bitOffsets="0" optimizedForStreaming="0" videoProfile="high">
<Stream id="44791" streamType="1" default="1" codec="h264" index="0" bitrate="3119" anamorphic="1" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="480" codedWidth="720" colorPrimaries="smpte170m" colorRange="tv" colorSpace="smpte170m" colorTrc="bt709" frameRate="29.970" hasScalingMatrix="0" height="480" level="40" pixelAspectRatio="8:9" profile="high" refFrames="16" streamIdentifier="1" width="720" displayTitle="480p (H.264)" />
<Stream id="44792" streamType="2" selected="1" default="1" codec="aac" index="1" channels="6" bitrate="457" language="English" languageCode="eng" audioChannelLayout="5.1" profile="lc" samplingRate="48000" streamIdentifier="2" displayTitle="English (AAC 5.1)" />
</Part>
</Media>
</Video>
When I try to play the PAL videos I get the following in the PMS log:
Jun 04, 2020 19:39:40.982 [0x7f53a8855700] DEBUG - MDE: Selected protocol dash; container: mp4
Jun 04, 2020 19:39:40.982 [0x7f53a8855700] DEBUG - MDE: analyzing media item 20533
Jun 04, 2020 19:39:40.982 [0x7f53a8855700] DEBUG - MDE: Test South Park PAL SD: Direct Play is disabled
Jun 04, 2020 19:39:40.982 [0x7f53a8855700] DEBUG - MDE: Test South Park PAL SD: media must be transcoded in order to use the dash protocol
Jun 04, 2020 19:39:40.982 [0x7f53a8855700] DEBUG - MDE: Test South Park PAL SD: selected media 0 / 20533
Jun 04, 2020 19:39:40.982 [0x7f53a8855700] DEBUG - Streaming Resource: Reached Decision id=23728 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=20533 part=(id=20862 decision=transcode container=mp4 protocol=dash streams=(Video=(id=44795 decision=copy width=720 height=576) Audio=(id=44796 decision=copy channels=6 rate=48000))))
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: Selected protocol dash; container: mp4
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: analyzing media item 20533
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: Test South Park PAL SD: Direct Play is disabled
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: Test South Park PAL SD: media must be transcoded in order to use the dash protocol
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: Test South Park PAL SD: Direct Streaming is disabled, so video stream will be transcoded
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: Test South Park PAL SD: no remuxable profile found, so video stream will be transcoded
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - Scaled up video bitrate to 3390Kbps based on 1.500000x fudge factor.
Jun 04, 2020 19:39:42.836 [0x7f53a96fb700] DEBUG - MDE: Test South Park PAL SD: selected media 0 / 20533
Jun 04, 2020 22:05:09.757 [0x7f53ab447700] DEBUG - MDE: Selected protocol dash; container: mp4
Jun 04, 2020 22:05:09.757 [0x7f53ab447700] DEBUG - MDE: analyzing media item 20540
Jun 04, 2020 22:05:09.757 [0x7f53ab447700] DEBUG - MDE: Test South Park PAL SD Wide: Direct Play is disabled
Jun 04, 2020 22:05:09.757 [0x7f53ab447700] DEBUG - MDE: Test South Park PAL SD Wide: media must be transcoded in order to use the dash protocol
Jun 04, 2020 22:05:09.757 [0x7f53ab447700] DEBUG - MDE: Test South Park PAL SD Wide: selected media 0 / 20540
Jun 04, 2020 22:05:09.757 [0x7f53ab447700] DEBUG - Streaming Resource: Reached Decision id=23729 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=20540 part=(id=20869 decision=transcode container=mp4 protocol=dash streams=(Video=(id=44809 decision=copy width=720 height=576) Audio=(id=44810 decision=copy channels=6 rate=48000))))
Jun 04, 2020 22:05:11.869 [0x7f53aa88f700] DEBUG - MDE: Selected protocol dash; container: mp4
Jun 04, 2020 22:05:11.869 [0x7f53aa88f700] DEBUG - MDE: analyzing media item 20540
Jun 04, 2020 22:05:11.869 [0x7f53aa88f700] DEBUG - MDE: Test South Park PAL SD Wide: Direct Play is disabled
Jun 04, 2020 22:05:11.869 [0x7f53aa88f700] DEBUG - MDE: Test South Park PAL SD Wide: media must be transcoded in order to use the dash protocol
Jun 04, 2020 22:05:11.869 [0x7f53aa88f700] DEBUG - MDE: Test South Park PAL SD Wide: Direct Streaming is disabled, so video stream will be transcoded
Jun 04, 2020 22:05:11.869 [0x7f53aa88f700] DEBUG - MDE: Test South Park PAL SD Wide: no remuxable profile found, so video stream will be transcoded
Jun 04, 2020 22:05:11.870 [0x7f53aa88f700] DEBUG - MDE: Cannot direct stream video stream due to profile or setting limitations
Jun 04, 2020 22:05:11.870 [0x7f53aa88f700] DEBUG - Scaled up video bitrate to 3498Kbps based on 1.500000x fudge factor.
Jun 04, 2020 22:05:11.870 [0x7f53aa88f700] DEBUG - MDE: Test South Park PAL SD Wide: selected media 0 / 20540
When I play the NTSC video I don’t get any MDE-related messages presumably because the file is direct playing.
The only differences I can see between these videos are the resolution and frame rate - which is exactly what you would expect to be different with PAL vs NTSC. So why is Plex taking different playback decisions between these formats? Surely these should all be direct play.
I have copied the videos to a USB stick and the TV happily plays them all. So there is definitely no legitimate reason for transcoding in this case.
I cannot find any other posts on this specific issue and cannot find any real clues as to why Plex is taking the decision it is with this one specific format. I’ve used an identical approach and identical Handbrake settings for all the videos.
Am I missing something or is this a Plex bug?
