[FFmpeg-user] Mal-formed MP4s from Blue Iris won't play on Apple Silicon Macs. Diagnose ffprobe output?
Steven Kan
steven at kan.org
Thu Feb 9 02:11:39 EET 2023
> On Feb 7, 2023, at 10:56 PM, Ferdi Scholten <ferdi at sttc-nlp.nl> wrote:
>
> I have a Windows PC running Blue Iris security camera software, and it has a “Direct-to-disc” option whereby it records video straight from each camera’s h.264 RTSP stream without transcoding, to reduce CPU and HDD utilization. There is some re-packaging involved, and I think that’s where the problem may lie.
>> When I browse through recorded footage, either on the BI PC or on another device (e.g. my Mac), I have the option to download clips either with or without re-encoding to h.264. I obviously prefer to download without re-encoding. I’ll call these the “original” downloads. Once downloaded they behaved like normal MP4s on my Intel-based Mac. I could read them in QuickTime Player or in any other app that uses the QuickTime libraries, like DaVinci Resolve.
>>
>> But last week I replaced my Intel Mac with an Apple Silicon Mac, and now these MP4 files are broken. They will not play back in QuickTime player, nor in the apps that are based on QuickTime. Curiously, VLC Player on my AS Mac will play the “bad” files back, but only after a few frames of what looks like gray snow. If I turn off the Hardware acceleration in VLC Player, then it will play back the bad files correctly from frame 1.
>>
>> If I choose the option in Blue Iris or in the client viewer to re-encode the video to H.264 before download, then the resulting files behave properly on any computer I’ve tried, but I don’t want to have to wait for a re-encode every time I download a clip, and the file bloat is 10x.
>>
>> I ran the original file and the re-encoded file through ffprobe. Can anyone decode what the error is, and what the Blue Iris developer can do to fix it?
>>
>> Bad (original) file:
>>
>> https://www.kan.org/download/BlueIris/TrailDown.20230203_042912-042924.495.mp4
>>
>> Good (re-encoded) file:
>>
>> https://www.kan.org/download/BlueIris/TrailDown.20230203_042912-042924.494.mp4
>>
>> Console output from Bad (original) file:
>>
>> ffprobe /Users/steven/Downloads/TrailDown.20230203_042912-042924.495.mp4
>> ffprobe version N-109745-g7d49fef8b4-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2007-2023 the FFmpeg developers
>> built with Apple clang version 11.0.0 (clang-1100.0.33.17)
>> configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
>> libavutil 57. 44.100 / 57. 44.100
>> libavcodec 59. 61.100 / 59. 61.100
>> libavformat 59. 37.100 / 59. 37.100
>> libavdevice 59. 8.101 / 59. 8.101
>> libavfilter 8. 56.100 / 8. 56.100
>> libswscale 6. 8.112 / 6. 8.112
>> libswresample 4. 9.100 / 4. 9.100
>> libpostproc 56. 7.100 / 56. 7.100
>> [h264 @ 0x7fd082805200] error while decoding MB 161 121, bytestream -5
>> [h264 @ 0x7fd082805200] concealing 50 DC, 50 AC, 50 MV errors in I frame
>> [h264 @ 0x7fd082805200] error while decoding MB 161 121, bytestream -6
>> [h264 @ 0x7fd082805200] concealing 50 DC, 50 AC, 50 MV errors in P frame
>> [h264 @ 0x7fd082805200] error while decoding MB 161 121, bytestream -5
>> [h264 @ 0x7fd082805200] concealing 50 DC, 50 AC, 50 MV errors in P frame
>> [h264 @ 0x7fd082805200] error while decoding MB 161 121, bytestream -5
>> [h264 @ 0x7fd082805200] concealing 50 DC, 50 AC, 50 MV errors in P frame
>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/steven/Downloads/TrailDown.20230203_042912-042924.495.mp4':
>> Metadata:
>> major_brand : isom
>> minor_version : 512
>> compatible_brands: isomiso2avc1mp41
>> encoder : Lavf58.45.100
>> Duration: 00:00:11.30, start: 0.000000, bitrate: 6417 kb/s
>> Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 2592x1944, 6388 kb/s, 19.91 fps, 20.67 tbr, 90k tbn (default)
>> Metadata:
>> handler_name : VideoHandler
>> vendor_id : [0][0][0][0]
>> Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 26 kb/s (default)
>> Metadata:
>> handler_name : SoundHandler
>> vendor_id : [0][0][0][0]
>>
>> Console output from Good (re-encoded) file:
>>
>> /Applications/ffmpeg/ffprobe /Users/steven/Downloads/TrailDown.20230203_042912-042924.494.mp4
>> ffprobe version N-109745-g7d49fef8b4-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2007-2023 the FFmpeg developers
>> built with Apple clang version 11.0.0 (clang-1100.0.33.17)
>> configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
>> libavutil 57. 44.100 / 57. 44.100
>> libavcodec 59. 61.100 / 59. 61.100
>> libavformat 59. 37.100 / 59. 37.100
>> libavdevice 59. 8.101 / 59. 8.101
>> libavfilter 8. 56.100 / 8. 56.100
>> libswscale 6. 8.112 / 6. 8.112
>> libswresample 4. 9.100 / 4. 9.100
>> libpostproc 56. 7.100 / 56. 7.100
>> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/steven/Downloads/TrailDown.20230203_042912-042924.494.mp4':
>> Metadata:
>> major_brand : isom
>> minor_version : 512
>> compatible_brands: isomiso2avc1mp41
>> encoder : Lavf58.45.100
>> Duration: 00:00:12.09, start: 0.000000, bitrate: 37956 kb/s
>> Stream #0:0[0x1](und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(progressive), 2592x1952, 37926 kb/s, 19.94 fps, 20.42 tbr, 90k tbn (default)
>> Metadata:
>> handler_name : VideoHandler
>> vendor_id : [0][0][0][0]
>> Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 27 kb/s (default)
>> Metadata:
>> handler_name : SoundHandler
>> vendor_id : [0][0][0][0]
>>
>>
> Most likely the AS mac hardware does not support yuvj420p that has a bigger color range than yuv420p
I did some additional testing with 2 cameras from different manufacturers:
1 of 2) This is from a Wyze cam, and ffprobe reports it as yuv420p, but still fails it with a "error while decoding MB 119 67, bytestream -8"
https://www.kan.org/download/Finch.20230208_081507-081539.496.mp4
./ffprobe /Users/steven/Downloads/Finch.20230208_081507-081539.496.mp4
ffprobe version N-109745-g7d49fef8b4-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2007-2023 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 57. 44.100 / 57. 44.100
libavcodec 59. 61.100 / 59. 61.100
libavformat 59. 37.100 / 59. 37.100
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 56.100 / 8. 56.100
libswscale 6. 8.112 / 6. 8.112
libswresample 4. 9.100 / 4. 9.100
libpostproc 56. 7.100 / 56. 7.100
[h264 @ 0x7f8abbf057c0] error while decoding MB 119 67, bytestream -8
[h264 @ 0x7f8abbf057c0] concealing 50 DC, 50 AC, 50 MV errors in I frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/steven/Downloads/Finch.20230208_081507-081539.496.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 00:00:31.18, start: 0.000000, bitrate: 646 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 575 kb/s, 19.95 fps, 20 tbr, 90k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 67 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
2 of 2) This is from a Reolink camera (yeah, I know), also reporting as yuv420p and failing with multiple "error while decoding MB xxx yyy” errors:
https://www.kan.org/download/Bee.20230208_081549-081557.497.mp4
./ffprobe /Users/steven/Downloads/Bee.20230208_081549-081557.497.mp4
ffprobe version N-109745-g7d49fef8b4-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2007-2023 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 57. 44.100 / 57. 44.100
libavcodec 59. 61.100 / 59. 61.100
libavformat 59. 37.100 / 59. 37.100
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 56.100 / 8. 56.100
libswscale 6. 8.112 / 6. 8.112
libswresample 4. 9.100 / 4. 9.100
libpostproc 56. 7.100 / 56. 7.100
[h264 @ 0x7f7cb57057c0] error while decoding MB 120 80, bytestream -5
[h264 @ 0x7f7cb57057c0] concealing 73 DC, 73 AC, 73 MV errors in I frame
[h264 @ 0x7f7cb57057c0] error while decoding MB 118 80, bytestream -10
[h264 @ 0x7f7cb57057c0] concealing 75 DC, 75 AC, 75 MV errors in P frame
[h264 @ 0x7f7cb57057c0] error while decoding MB 98 80, bytestream -12
[h264 @ 0x7f7cb57057c0] concealing 95 DC, 95 AC, 95 MV errors in P frame
[h264 @ 0x7f7cb57057c0] error while decoding MB 122 80, bytestream -8
[h264 @ 0x7f7cb57057c0] concealing 71 DC, 71 AC, 71 MV errors in P frame
[h264 @ 0x7f7cb57057c0] error while decoding MB 94 80, bytestream -18
[h264 @ 0x7f7cb57057c0] concealing 99 DC, 99 AC, 99 MV errors in P frame
[h264 @ 0x7f7cb57057c0] error while decoding MB 107 80, bytestream -10
[h264 @ 0x7f7cb57057c0] concealing 86 DC, 86 AC, 86 MV errors in P frame
[h264 @ 0x7f7cb57057c0] error while decoding MB 96 80, bytestream -9
[h264 @ 0x7f7cb57057c0] concealing 97 DC, 97 AC, 97 MV errors in P frame
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/steven/Downloads/Bee.20230208_081549-081557.497.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.45.100
Duration: 00:00:06.47, start: 0.000000, bitrate: 5142 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 2304x1296, 5139 kb/s, 29.53 fps, 30 tbr, 90k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Can anyone inspect those macroblocks in these failing files and help us understand the root cause?
Thanks!
More information about the ffmpeg-user
mailing list