Server Version#: 1.32.6.7557
Player Version#: 10.2.0.448 (83522c5)
Hi - I have a bunch of videos from my drone (a DJI Mavic Air). They’re 4k and have a high bit-rate. I’ve got a Sony KD65A8H tv which runs Android TV. It’s on a wired 100Mbit connection, so I understand the bit-rate may be too high. When I try to watch any of these videos, the spinner just sits there and nothing loads, I try to tell it to convert for me, but still nothing happens. If I open the Plex app on my phone and cast it to the tv, it will play, but it buffers and pauses a lot.
So - I’d like to convert it to something that my TV and bandwidth can handle. I’ve tried letting Plex optimize it, but I have the same issue, it just won’t play. I’ve manually converted the files using ffmpeg, kept them as H264 but moved them from the .MOV container to .mp4, whether I keep it the same size, or halve the size (and bitrate) I just get the same issue, it won’t play at all.
This is the output from ffprobe for my converted file (-crf=28):
First question I’d ask is have you verified that the videos play on your computer?
I generally use VLC player as that pretty much plays anything I throw at it.
That said, I’m not really a video encoding guru, but you can try using Handbrake to re-encode the video and see if you get a different result as compared to using ffmpeg straight up (Handbrake is essentially a GUI frontend). Figure it wouldn’t hurt to try.
Also, make sure DEBUG is set and not VERBOSE as that will provide too much information and is only required if a Plex employee explicitly asks for it. Maybe there is something in the logs that will give a hint as to why the files are not playing.
I would suggest looking at the “Plex Media Server.log” files.
You could upload them here, but some people do not feel comfortable posting them to the forum where anyone with an account can access them.
If you aren’t comfortable posting, you can wait for a Plex team member to step in and ask them if you can PM them the files. A forum member might also being will to have you PM them to look at. You can send them to me if you want, but I cannot guarantee that I would be able to find anything, but I would be willing to take a look.
I’ve never had a Chinese video gadget that used a normal codec… Even when it’s something standard like h.264 they always change something to make actually using the footage a PITA.
Thanks very much - I had briefly had a look at the server logs in the past, but it seems the request doesn’t reach the server.
So instead I have just enabled the client side logging and you can see an error occurring. The video is called “Test_Video_CRF_28”. I’m not sure why it’s failing on “[MediaDecisionLoadable] Exception while determining media decision”, hopefully some smart person can help!
10-27 14:06:12.415 i: [MediaDecisionEngine] Starting media decision for: Test_Video_CRF_28 (part index 0)
10-27 14:06:12.415 i: [MediaDecisionEngine] Transcode server selected: My Media
10-27 14:06:12.415 i: [MediaDecisionEngine] Analyzing media: 4096x2160 19549kbps (Container: mp4, Video: h264, Audio: None)
10-27 14:06:12.424 i: [video] User maximum h264 profile determined: 52
10-27 14:06:12.424 i: [video] Device recommended h264 profile determined: 52
10-27 14:06:12.484 i: [CurrentItemMetadataBehaviour] Fetched current item, success: true
10-27 14:06:12.497 e: [MediaDecisionLoadable] Exception while determining media decision
10-27 14:06:12.499 e: [ExoPlayer][LoadTask] Unexpected exception loading stream
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.plexapp.plex.net.t1.v0(java.lang.String)' on a null object reference
at com.plexapp.plex.net.i1.x(SourceFile:33)
at com.plexapp.plex.net.i1.D(Unknown Source:0)
at com.plexapp.plex.net.i1.c(Unknown Source:0)
at com.plexapp.plex.net.g1.a(Unknown Source:10)
at com.plexapp.plex.utilities.m0.n(SourceFile:20)
at com.plexapp.plex.net.i1.i(SourceFile:40)
at com.plexapp.plex.net.i1.h(SourceFile:31)
at com.plexapp.plex.net.i1.s(SourceFile:11)
at com.plexapp.plex.net.i1.w(SourceFile:373)
at com.plexapp.plex.net.i1.J(SourceFile:17)
at qn.e.p(SourceFile:58)
at qn.e.s(SourceFile:169)
at eh.r.load(SourceFile:23)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(SourceFile:52)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
10-27 14:06:12.499 e: An exception occurred: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.plexapp.plex.net.t1.v0(java.lang.String)' on a null object reference
10-27 14:06:12.500 e: Stacktrace: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.plexapp.plex.net.t1.v0(java.lang.String)' on a null object reference
at com.plexapp.plex.net.i1.x(SourceFile:33)
at com.plexapp.plex.net.i1.D(Unknown Source:0)
at com.plexapp.plex.net.i1.c(Unknown Source:0)
at com.plexapp.plex.net.g1.a(Unknown Source:10)
at com.plexapp.plex.utilities.m0.n(SourceFile:20)
at com.plexapp.plex.net.i1.i(SourceFile:40)
at com.plexapp.plex.net.i1.h(SourceFile:31)
at com.plexapp.plex.net.i1.s(SourceFile:11)
at com.plexapp.plex.net.i1.w(SourceFile:373)
at com.plexapp.plex.net.i1.J(SourceFile:17)
at qn.e.p(SourceFile:58)
at qn.e.s(SourceFile:169)
at eh.r.load(SourceFile:23)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(SourceFile:52)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
10-27 14:06:12.501 i: Creating PlayerActivity.
10-27 14:06:12.501 i: [Activity] Resuming the application, attempting to download item and children.
10-27 14:06:12.504 i: [Boot] PlayerActivity took 3ms to run create behaviours.
10-27 14:06:12.525 i: Resuming PlayerActivity.
10-27 14:06:12.535 i: [PlayerActivity] Creating fragment
10-27 14:06:12.548 i: [Player][DimensionsLayout] Resizing: 100 x 100
10-27 14:06:12.563 i: [DisplayBehaviour] Activity has been changed, searching for available modes.
10-27 14:06:12.568 i: [DisplayBehaviour] Current Mode ID: 1 / {id=1, width=1920, height=1080, fps=60.000004}
10-27 14:06:12.569 i: [DisplayBehaviour] Current mode detected as 1920x1080 @ 60.0000Hz (1).
10-27 14:06:12.572 i: [PictureInPictureBehaviour] Picture-in-picture is available and can be used.
10-27 14:06:12.575 i: [VideoAwakeBehaviour] Keep screen awake has been requested disabled for VideoAwakeBehaviour.
10-27 14:06:12.671 i: [PictureInPictureBehaviour] Picture-in-picture is available and can be used.
10-27 14:06:12.673 i: [PictureInPictureBehaviour] Picture-in-picture is available and can be used.
10-27 14:06:12.683 i: [PictureInPictureBehaviour] Picture-in-picture is available and can be used.
10-27 14:06:12.692 i: [ChaptersSheetHud] Found 0 chapters.
10-27 14:06:12.707 i: [MenuSheetHud] Item changed (and fetched), invalidating settings...
10-27 14:06:12.844 i: [Player][View] Layout has been measured with a size of 1920 x 1080 (1920 x 1080).
10-27 14:06:12.845 i: [Player][DimensionsLayout] Resizing: 1920 x 1012
10-27 14:06:12.875 i: [ExoPlayer][EventLogger] surfaceSize [eventTime=0.60, mediaPos=0.00, window=0, period=0, 1920, 1012]
10-27 14:06:12.891 i: [ASS][Renderer] Surface has been created, connecting to renderer.
10-27 14:06:12.896 i: [ASS][Renderer] Attempting to start renderer from setSurface.
10-27 14:06:12.897 w: [ASS][Renderer] Missing video size, can't start renderer yet.
10-27 14:06:12.904 i: [SystemUIBehaviour] Hiding the system user-interface.
10-27 14:06:58.622 i: [HttpServer] /192.168.1.100:64544 - GET /logging
I never even realised it was Chinese until you mentioned it. It plays fine on my computer, and in the web player and on my mobile phone Plex client - just no joy on the Sony Bravia plex client.
That error is interesting. It looks like Plex thought the video could be direct played, but it didn’t work on the hardware.
You can try forcing a lower quality stream at playback time.
You can try Optimize in the Plex Web UI to have Plex create another version in advance, and then choose that version at playback time.
If you want to convert the video manually in advance, try Handbrake.
Don’t use H.264/AVC for either 4K or 60fps video. It’s very poorly supported by hardware playback devices.
This should be basically universally playable:
H.264/AVC, 1920x1080, 30fps, Main Profile (High should also be safe)
Try CRF20 for very high quality, or CRF24 for OK-and-smaller
For 4K or for 60fps, use H.265/HEVC:
H.265/HEVC, 4k, Main Profile, 30fps - any 4k device
H.265/HEVC, 4k, Main Profile, 60fps - devices with 4k+60fps support
Try CRF24 for very high quality, or CRF28 for OK-and-smaller
The Presets (Veryfast/Medium/Veryslow etc) don’t directly control quality, they control how “clever” the codec can be. Being clever results in smaller files, but also takes looonger. Test with ultrafast or veryfast to make sure it plays; change to medium or slow if you don’t mind the time and want smaller files.
It looks like the newest/fanciest/best DJI models do support H.265 for encoding 4K. What a great excuse to upgrade …
You could also try recording in 1920x1080, maybe also 30fps. That might get you files that can be played back directly - but maybe not. As others have mentioned many of these “Action”-cam devices have strange dialects for their encoding.
I’ve actually sold the drone - but wanted to finally sort out why it was so damn difficult to watch the videos via Plex. I really appreciate the help though
It’s created the file just fine, but I still have exactly the same issue. I just remember I did try to convert some of these using Tdarr a little while back, and had the same experience.
This was my attempt to configure it as:
H.265/HEVC, 4k, Main Profile, 30fps - any 4k device
The above log excerpt seems to suggest that the tv is only fullHD, not 4k.
So anything above that is probably not supported and needs to be transcoded by your Plex server.
I’ve tried a couple of things to add a soundtrack, but I’m having trouble getting one added. Do you have any experience doing something like that?
EDIT: I managed to add a silent track - and YES, it seems to work! Thank you so much for pointing me in the right direction! I added it to one of the files I’d already converted to HEVC, I’m now going to see if I can just add it to the original videos, I’m guessing it will work.
EDIT2: Yep that works as well, and it’s much quicker, no re-encoding needed! Thanks so much for the suggestion.
FYI this is what I did (thanks to @OttoKerner for letting me know that 48000 is the best sample_rate). This copies the codec and the metadata (which for me, copied over the original recording date, which Plex picks up:
Always use a sample rate of 48000 for audio tracks in a video.
44100 only occurs in audio CDs and music streaming.
Considering this, you can bet that all those TVs and streaming boxes have never been tested thoroughly with videos which have audio tracks with 44100 sample rate. So glitches and weirdness can occur more likely. On top of that, the default sample rate on many devices is 48000 nowadays – sometimes even without the ability to change that. So the audio sample rate has to be converted during playback. And that in turn can again lead to sync issues or other weirdness.
So avoid it.