Re: [FFmpeg-user] Mal-formed MP4s from Blue Iris won't play on Apple Silicon Macs. Diagnose ffprobe output?
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 libavformat59. 37.100 / 59. 37.100 libavdevice59. 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 libpostproc56. 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.00, 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
Re: [FFmpeg-user] Mal-formed MP4s from Blue Iris won't play on Apple Silicon Macs. Diagnose ffprobe output?
> On Feb 7, 2023, at 3:36 PM, Steven Kan wrote: > > > 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 > libavformat59. 37.100 / 59. 37.100 > libavdevice59. 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 > libpostproc56. 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': > One more note: The playback error is specific to Apple-Silicon-based Macs. Either file plays properly in Windows. But the ffprobe output is the same whether I run ffprobe in Windows or on my Mac, so there appears to be an issue with the file itself that Windows can handle, that my Intel Mac could handle, but that my AS Mac can not handle. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Mal-formed MP4s from Blue Iris won't play on Apple Silicon Macs. Diagnose ffprobe output?
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 libavformat59. 37.100 / 59. 37.100 libavdevice59. 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 libpostproc56. 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.00, 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)
Re: [FFmpeg-user] Please help with weird video problems
On Tue, 7 Feb 2023 22:00:35 +0300 Alexander Gribanov wrote: > Hello! > > Here is a downloaded Facebook Livestream video which I'm trying to > process: > https://drive.google.com/file/d/1mVkQbzVSzhOlQbT2mB1J2yvPFV5kl5Dq/view?usp=share_link > > I can play it correctly in MPC-HC Media Player Classic, but when I > try to add this video to Adobe Premiere 2022, there around 3:00:00 > position audio is about 40 seconds ahead of video... > > I tried to remux and re-encode this video using ffmpeg, it showed a > lot of warnings like this: > [aac @ 01c1bfe68e40] env_facs_q 254 is invalid > > I tried different options like "-vsync cfr", "-fps_mode drop" and some > other stuff which I don't remember already, but nothing helped :( In > MPC-HC it was ok, but in Adobe Premiere still 40-seconds a/v unsync. > > I assume that the problem is with timestamps on the audio track. > > I would like to make using ffmpeg just a simple cfr video 29.97 fps / > audio 48kHz without any timestamp gaps and offsets. > > Could anybody please help me to understand how to analyze and > diagnose such problems in such videos to be sure what the exact > problem is? > > Could You please help me find the solution (i.e. options or > subcommands to ffmpeg). > > Thank You very much in advance :) Maybe re-encode it with constant framerate using 'framerate' filter? ffmpeg -i in.mp4 -vf framerate=fps=29.97 -c:a copy -c:v libx264 -b:v 800k out.mp4 ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Please help with weird video problems
Hello! Here is a downloaded Facebook Livestream video which I'm trying to process: https://drive.google.com/file/d/1mVkQbzVSzhOlQbT2mB1J2yvPFV5kl5Dq/view?usp=share_link I can play it correctly in MPC-HC Media Player Classic, but when I try to add this video to Adobe Premiere 2022, there around 3:00:00 position audio is about 40 seconds ahead of video... I tried to remux and re-encode this video using ffmpeg, it showed a lot of warnings like this: [aac @ 01c1bfe68e40] env_facs_q 254 is invalid I tried different options like "-vsync cfr", "-fps_mode drop" and some other stuff which I don't remember already, but nothing helped :( In MPC-HC it was ok, but in Adobe Premiere still 40-seconds a/v unsync. I assume that the problem is with timestamps on the audio track. I would like to make using ffmpeg just a simple cfr video 29.97 fps / audio 48kHz without any timestamp gaps and offsets. Could anybody please help me to understand how to analyze and diagnose such problems in such videos to be sure what the exact problem is? Could You please help me find the solution (i.e. options or subcommands to ffmpeg). Thank You very much in advance :) ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Noticeable transitions between audio chunks
Oh wait... > >> then I get raw PCM of each chunk and replace some parts of PCM with sine >> wave data (adding beeps) and then I transform that PCM chunks to mp3 chunks >> and write those to stream. The final process of concating audio parts is *NOT >> *performed by ffmpeg, I just write data chunks to the destination stream. Are you trying to concat mp3 chunks? That seems like a bad idea, Concat the raw PCM, then convert that to mp3 bouke ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] New user question
<> can we kill this 'obviously snowflake Reddit user' thread? you get expert info from expert developers and they want to give 15min of expert advice for free but not have their time wasted. When you go to the doctor and they order an x-ray to see if your foot is broken do you insult them with snowflake med school degree insults? Just say thank you and try to get the same expertise elsewhere. <> Sent from my iPhone > On Feb 4, 2023, at 6:17 AM, Dave Blanchard wrote: > > On Fri, 3 Feb 2023 23:39:59 +0100 > Reindl Harald wrote: > >> a working brain is a enough to put the question into the subject instead >> "New user question" and has nothing to do with a mailing list at all > > Please, tell us more about how the OP is too stupid to participate in this > mailing list, from your lofty vantage point in your mom's basement. > > Dave > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Noticeable transitions between audio chunks
> On 7 Feb 2023, at 11:05, Alexander Bieliaev via ffmpeg-user > wrote: > > I am processing audio chunks programmatically by using the ffmpeg library > for C#. First I divide the input audio of .wav format into chunks of 1 > minute each (I can't process the whole audio for specific reasons), then > prepend it's header to each chunk so it can be recognized and processed, I don’t get it. If you speak C, and you have uncompressed Wave input, is as simple as opening the file, find the DATA riff and copy out X bytes (depending on the bit depth / sample rate) > then I get raw PCM of each chunk and replace some parts of PCM with sine > wave data (adding beeps) and then I transform that PCM chunks to mp3 chunks > and write those to stream. The final process of concating audio parts is *NOT > *performed by ffmpeg, I just write data chunks to the destination stream. I > am facing the problem that there are noticeable transitions between 1 > minute chunks in result audio(clicks/silence/change of volume/shifting). > How can I smooth out the start/end of each chunk so when I'm putting them > together there are no noticeable transitions? From experience I know that the size of -f segment for Wave does NOT result in a sample accurate amount of data, not sure if that is what you are facing. (Should not matter if there is a pure concat of the data.) It ’should’ be seamless. So, if I can do this kind of stuff in pure python, why find the cause and not do it yourself in C? Bouke ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Noticeable transitions between audio chunks
I am processing audio chunks programmatically by using the ffmpeg library for C#. First I divide the input audio of .wav format into chunks of 1 minute each (I can't process the whole audio for specific reasons), then prepend it's header to each chunk so it can be recognized and processed, then I get raw PCM of each chunk and replace some parts of PCM with sine wave data (adding beeps) and then I transform that PCM chunks to mp3 chunks and write those to stream. The final process of concating audio parts is *NOT *performed by ffmpeg, I just write data chunks to the destination stream. I am facing the problem that there are noticeable transitions between 1 minute chunks in result audio(clicks/silence/change of volume/shifting). How can I smooth out the start/end of each chunk so when I'm putting them together there are no noticeable transitions? Here are the commands that being generated by library: To get PCM: -i "\\.\pipe\..." -ar 8000 -f s16le "\\.\pipe\..." -y To transform PCM to mp3: -f s16le -ar 8000 -ac 1 -i "\\.\pipe\..." -b:a 128k -f mp3 "\\.\pipe\..." -y -- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Question about "normalize" filter
Am 30.01.2023 um 20:45 schrieb Paul B Mahol: filter supports up to 16bit rgb(a), adding float would be trivial. patch welcome Thanks for adding float to colorlevels. Is there any filter for gamma correction with float? Does the geq filter support float? Yes. Gamma correction with float precision works with geq filter. Is there any faster solution? Michael ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".