Stuttering on playback on Linux client

That’s correct.

Now test the next step please.

Play a known H.264 video (the processor cannot handle HEVC/H.265)

Using which player? Using the mpv I built (/usr/local/bin/mpv)? Or some other player? I do play h265 files all the time with Kodi and I don’t notice a ridiculous amount of strain.

By the way, I did a little reading on mpv and it turns out the hwdec on my machine is not enabled by default. You must use --hwdec=vaapi (at a minimum --hwdec) and I see a message when it plays.

/usr/local/bin/mpv --hwdec=vaapi Foo.mp4 
Playing: Foo.mp4
 (+) Video --vid=1 (*) (h264 720x400 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
Using hardware decoding (vaapi).
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 720x400 => 720x405 vaapi[nv12]
AV: 00:00:26 / 00:53:36 (0%) A-V:  0.000 Cache: 767s+150MB

If I don’t specify that switch, I get:

VO: [gpu] 720x400 => 720x405 yuv420p

Allow me to clarify. “Which Player?” should have been asked as “Which official Plex player?”

  1. Kodi - Not our concern here. Go talk to them if you have a problem with it
  2. Something you built - That’s on you.

To make a very specific request:

Please play a known H.264 file, uisng PMS, playing to an official Plex player app such as Plex/web

OK, playing a title known to have H.264 and MKV container using Chrome browser to http://plex.tv plays what appears to be a direct video stream. It claims to be doing a transcode on the audio EAC3 5.1 -> AAC.

I looked up EAC3 5.1 since I didn’t know what it was. It appears to be a newer format. My home theater supports AC-3. It seems like there should be a way to get it to transcode into that.

At any rate, the result looks good.

For the next step, I would like you to force video transcoding of the same file.

Start the playback,
In the Plex/Web interface, bring up the settings button (looks like 3 EQ sliders).
Lower the bitrate.
This will pause it momentarily while the transcoder engages and it begins transcoding to that bitrate.

Confirm (in activity) it’s now transcoding the video.

When you see the changed status, Stop Playback
Wait 30 seconds
Download and attach the logs here.

The EAC-3 is the Enhanced Audio Codec.

OK, I think I captured the transcoding. The web player wouldn’t allow me to reduce the bitrate, so I reverted to using the experimental client I have on this htpc. Plex Media Server Logs_2019-08-10_11-26-34.zip (3.9 MB)

Thanks. That is much better.

As I expected, which this now confirms, you do have VAAPI hardware transcoding.

Aug 09, 2019 11:06:09.659 [0x7f7859ffb700] DEBUG - TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Aug 09, 2019 11:06:09.659 [0x7f7859ffb700] DEBUG - Job running: EAE_ROOT='/tmp/pms-b5dc3528-d2bf-48a4-ac3b-201e36361482/EasyAudioEncoder' FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/2144ff1-2376-linux-x86_64/' XDG_CACHE_HOME='/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache' XDG_DATA_HOME='/usr/lib/plexmediaserver/Resources' X_PLEX_TOKEN='xxxxxxxxxxxxxxxxxxxx' '/usr/lib/plexmediaserver/Plex Transcoder' '-codec:0' 'mpeg2video' '-hwaccel:0' 'vaapi' '-hwaccel_fallback_threshold:0' '10' '-hwaccel_output_format:0' 'vaapi' '-codec:1' 'ac3' '-live_start_index' '0' '-probesize' '20000000' '-i' 'http://127.0.0.1:32400/livetv/sessions/25a5fbdb-a4a6-49a8-92c6-a0fd14893249/5l7zefw8q44bmlqpac5e5loq/index.m3u8?offset=0.000000&X-Plex-Incomplete-Segments=1&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx' '-filter_complex' '[0:0]hwupload[0];[0]scale_vaapi=w=1280:h=720:format=nv12[1];[1]hwupload[2]' '-filter_complex' '[0:1] aresample=async=1:ocl='\''5.1'\'':osr=48000[3]' '-map' '[2]' '-codec:0' 'h264_vaapi' '-b:0' '2562k' '-maxrate:0' '3416k' '-bufsize:0' '6832k' '-r:0' '59.939999999999998' '-map' '[3]' '-metadata:s:1' 'language=eng' '-codec:1' 'libopus' '-b:1' '336k' '-f' 'segment' '-segment_format' 'matroska' '-segment_format_options' 'live=1' '-segment_time' '1' '-segment_header_filename' 'header' '-segment_start_number' '0' '-segment_list' 'http://127.0.0.1:32400/video/:/transcode/session/avs57fb9o6o91741374ommxr/3700413e-3d8b-41bf-b4c0-04f2371cac61/seglist' '-segment_list_type' 'csv' '-segment_list_size' '2147483647' '-segment_list_separate_stream_times' '1' '-map_metadata' '-1' '-map_chapters' '-1' 'chunk-%05d' '-y' '-vaapi_device' '/dev/dri/renderD128' '-nostats' '-loglevel' 'quiet' '-loglevel_plex' 'error' '-xioerror' '-progressurl' 'http://127.0.0.1:32400/video/:/transcode/session/avs57fb9o6o91741374ommxr/3700413e-3d8b-41bf-b4c0-04f2371cac61/progress'
Aug 09, 2019 11:06:09.659 [0x7f7859ffb700] DEBUG - Jobs: Starting child process with pid 17542

When the new transcoder update is released, we’re expecting to have full MPEG2 decode. For now, MPEG2 decoding is software and simply can’t keep up with realtime playback requirement. This would apply to any player which need transcoding. AppleTV enhanced is capable of doing this as is nVidia Shield.

Thanks so much for taking a look at my issue. I’m just experimenting with PLEX now, and that fix will make me much more likely to continue using it as a TiVo replacement.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.