Server Version#: 1.14.1.5488
Player Version#: 3.77.4 (Web) and 7.12.1.9314 (Android)
I have a Reolink security camera uploading MPEG-4 avc1 encoded videos (upon detecting motion) to a Linux box where Plex server is installed. Then I use the web client or the Android app to play the videos. However, it occurs that the Plex player is unable to play roughly one third of the videos. But when I download those videos, I’m able to play them fine on VLC and other video players!
Here are the errors I can find in the logs:
Mar 14, 2019 03:35:49.707 [0x7f6085de6700] ERROR - MDE: video has neither a video stream nor an audio stream
Mar 14, 2019 03:35:49.708 [0x7f6085de6700] ERROR - MDE: video has neither a video stream nor an audio stream
Mar 14, 2019 03:35:49.708 [0x7f6085de6700] ERROR - Streaming Resource: Cannot make a decision because either the file is unplayable or the client provided bad data
A sure sign I will not be able to play a video is when, in the player, I do a Get Info and no media info fields are displayed. However, when running the MediaInfo command line utility on the same video files, all the fields are displayed. Running Analyze on the affected videos doesn’t fix the problem.
There’s definitely something wrong with how Plex is handling these videos. I’m willing to share some of the affected videos with Plex’s technical support. The videos are relatively small (around 15 MB).
This sounds like you have a video encoding, with one of its options, which Plex isn’t expecting or doesn’t know how to handle.
For one of the files which does and one which does not play:
- Verify DEBUG logging only is enabled (not VERBOSE)
- Analyze the media
- Attempt playback
- Stop playback
- Wait 30 seconds after second attempt
- Settings - Server - Troubleshooting - Download Logs
- Hover over each video - Get Info - View XML
- Copy & Paste - highlight and protect each block with “Code” formatting
- Attach the log ZIP file
Thanks, Chuck.
I chose one of the videos Plex Player is unable to play and followed your steps (the video failed to play in both attempts, despite the Analyze):
Here are the logs:
Plex Media Server Logs_2019-03-14_20-05-42.zip (2.2 MB)
And the XML:
<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="1" librarySectionTitle="Câmara Cervos" librarySectionUUID="909fe97b-5f1f-4b21-9572-e9d8c03cc4a9" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1544818278">
<Video ratingKey="267" key="/library/metadata/267" guid="com.plexapp.agents.none://050e6298553b050be5fe3af53e9e9cc882864d56?lang=xn" librarySectionTitle="Câmara Cervos" librarySectionID="1" librarySectionKey="/library/sections/1" type="movie" title="Camara Cervos_01_20190314112716" summary="" year="2019" thumb="/library/metadata/267/thumb/1552593992" art="/library/metadata/267/art/1552593992" originallyAvailableAt="2019-03-14" addedAt="1552562873" updatedAt="1552593992">
<Media id="266">
<Part id="266" key="/library/parts/266/1552562867/file.mp4" file="/srv/ftp/recordings/2019/03/14/Camara Cervos_01_20190314112716.mp4" size="14775857" />
</Media>
<Extras size="0">
</Extras>
</Video>
</MediaContainer>
I’m happy to share this example video with you, if needed (it’s 14 MB in size).
That tells us right there PMS can’t pull any of the header information.
What does ffmpeg -i filename.mp4 show?
It should show all the stream information.
If you would be kind enough to dd snip a 20MB piece of the file, put it in a tar.gz. and attach here as well, that would be great.
It will let me recreate what you see. Then, upon recreating, attach with my submittal to engineering.
Hi @ChuckPa
ffmpeg -i filename.mp4 shows:
ffmpeg version 3.2.12-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Camara Cervos_01_20190314112716.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41iso2avc1dash
creation_time : 2019-03-14T11:27:18.000000Z
Duration: 00:00:35.55, start: 0.000000, bitrate: 3325 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2304x1296, 3259 kb/s, 10.02 fps, 25 tbr, 150k tbn, 300k tbc (default)
Metadata:
handler_name : VideoHandler
encoder : AVC Coding
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 64 kb/s (default)
Metadata:
handler_name : SoundHandler
At least one output file must be specified
And here’s the file you requested:
unplayable_video.tar.gz (14.0 MB)
Thanks
I have completed my analysis.
[chuck@lizum SpaceCamp.449]$ ffmpeg -i Camara\ Cervos_01_20190314112716.mp4
ffmpeg version 4.0.3 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8 (GCC)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x564811b96dc0] error reading header
Camara Cervos_01_20190314112716.mp4: Operation not permitted
[chuck@lizum SpaceCamp.450]$
Notice I am using the newer version of ffmpeg and it can’t read it.
I’ve reached out to the transcoding team to determine why your FFMPEG and my FFMPEG disagree so greatly. This may be the root cause.
We found the error.
There was a regression in the upstream FFMPEG source.
The transcoder guys found it and applied a patch locally to verify it works now.
They ask your permission to share that sample with FFMPEG upstream as part of the problem demonstration and verification the patch corrects the problem.
Would that be ok?
It’s great you found the error! Feel free to share the sample with the FFMPEG upstream.
While the regression is not fixed, is there a Plex Media Server for Linux build which uses a working ffmpeg version that I can downgrade to?
There is not yet a version but, given we originated the patch, will likely get it put info use first.
I will task the team about that and get back to you .
Thanks for the RTU on the sample.
Hi @ChuckPa
Do you have any update?
Since I raised this, two new server versions were released (the latest I have installed is the 1.15.2.793) but none has fixed the issue.
I’m wondering if the patch has already went in to production.
Thanks
Have you run Analyze again on the video? Until it does analyzes it again, the info will remain the same.
Folks are reporting significant improvement with 1.15.3.835 . If you feel up to it, give a spin?
Hi @ChuckPa
I did two things:
- Upgraded to version 1.15.3.835 and restarted the plexmediaserver.service
- Ran Analyze (a few times, actually) on two videos which the web client was unable to play
Despite that, those videos remain unplayable…
On the other hand, FFMPEG 3.4.4 is still able to read the mp4 headers.
Here’s one of the videos:
unplayable_video2.tar.gz (13.3 MB)
do you have 1.14.1.5488 handy? If so, please downgrade to it and retest.
I’m in the same boat, but on Windows. Is there a link to download older releases? I’m happy to downgrade, but don’t have a copy.
I don’t know about Windows / where those are. I only handle Linux.
IIRC, WIndows keeps a copy of the package somewhere internally. I have heard of it but don’t know how to access it.
In all cases,
I always advise to keep a copy. It’s only 100 MB
Hi @ChuckPa
I’m happy about installing 1.14.1.5488. The only problem is that I don’t have the Ubuntu (16.04+) / Debian (8+) - Intel/AMD 64-bit package and I can’t find available for download anywhere…
Can you help?
I’ve installed 1.14.1.5488 again (thanks Chuck!) but it’s as broken as the latest version as far as recognizing all mp4 files is concerned. In fact, I ended up realizing 1.14.1.5488 was the version I was using when I created this thread.
@ChuckPa, you mentioned the Plex dev team created a FFMPEG 4 patch. Has that patch already been integrated in to a production release?
Do you know when PMS moved from FFMPEG version 3 to 4, by the way?
I stated the team is working on the updates.
There has been no announcement or other information made available to me regarding a version 4 “update”.
A number of things are broken in 1.15.x. Engineering is working through them.