0

It all begins with Plex and appears to end at ffmpeg as the easiest possible solution. I love ffmpeg! I use Plex running on Linux to stream over home network to a Roku. I've used this for years until recently as I'll describe below. I have a temporary workaround using Chromecast to bypass this issue.

Some videos don't play. There are two differences between the ones that play and the ones that don'that (sound but black screen). I list these below. Another possibility not listed is that Roku / Plex / Ubuntu have some kind of interaction (bug). Maybe the Roku device is old and unsupported? I listed my config way below.

  1. ffmpeg used to generate mkv / mp4 for the ones that don't play (sound but black screen). Handbrake and WinxDVD used to generate mkv / m4a for the ones that do play. My ffmpeg command is:

**ffmpeg -threads 4 -f gdigrab -probesize 42M -thread_queue_size 1024 -i desktop -f dshow -thread_queue_size 1024 -i audio="CABLE Output (VB-Audio Virtual Cable)" -vf scale=720:404 -vcodec libx264 -crf 28 -t 6.0 -y "C:/Users/daveg/Documents/Recordings\trial4_raw.mp4"**

  1. Video file properties show codec H.264 High 4:4:4 for the ones that don't play (sound but black screen). and H.264 Constrained Baseline Profile for the ones that do play.

Does somebody know how to configure ffmpeg to generate H.264 Constrained Baseline Profile? That seems like my next logical step. I tried various crf values only to produce grainy results still with High 4:4:4 nature.

Plex 1.32.8.7639 running on Ubuntu 22.04.1

Roku 3920X s/w 12.5.0 build 4178-91

ffmpeg 4.4.2 running on Ubuntu 22.04.1

1 Answer 1

0

You may not actually need baseline profile, but only a compatible pixel format i.e. YUV 4:2:0 as opposed to YUV 4:4:4 that ffmpeg converts gdigrab's RGB frames to.

Add -pix_fmt yuv420p. For baseline profile, also add -profile:v baseline.

1
  • -pix_fmt yuv420 added just after libx264 did the trick. No longer have black screen with sound for Plex on Roku. When I type ffmpeg -pix_fmts I find a whole list of these options...research for another day. Thanks. I didn't try the -profile:v baseline suggestion. Another day.
    – Dave Gutz
    Commented Dec 8, 2023 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.