[FFmpeg-user] Mal-formed MP4s from Blue Iris won't play on Apple Silicon Macs. Diagnose ffprobe output?

Anatoly anatoly at kazanfieldhockey.ru
Fri Feb 10 02:03:51 EET 2023

On Thu, 9 Feb 2023 11:04:31 -0800
Steven Kan <steven at kan.org> wrote:

> > On Feb 9, 2023, at 8:09 AM, Anatoly <anatoly at kazanfieldhockey.ru>
> > wrote:
> > 
> > Hello,
> > On Wed, 8 Feb 2023 16:11:39 -0800
> > Steven Kan <steven at kan.org> wrote:
> >   
> >>> 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.  
> > But are you sure that there is re-packaging?
> > What if capture camera stream with ffmpeg itself?  
> > ...snip...  
> Good question. "Repackaging" may be the wrong word, but BI must do
> something to take an RTSP stream and turn it into a file on a disk.
> There is no transcoding occurring with BI's "direct-to-disc" feature,
> because the reason for that feature is to reduce CPU utilization, and
> Task Manager on the BI computer shows that it's very, very low. But
> BI must at last write some sort of file name, file header, EOF
> marker, etc., right?
Right. File called 'container'. There are many container formats like:
mp4, avi, mkv... For each container format there is standard that
describes what exactly should be file header, delimeters between
audio/video chunks, EOF and more. Almost every format has something
like complex 'delimeters' between chunks of audio/video data or
even more complex 'sub-containers'. So almost never you can just cut off
start and end of the file, and get 'raw stream' and play it.
Here is internals of mp4 format for example:
If some software can't play some file, there are two possibilities:
-software doesn't know how to decompress video data
-software doesn't know how to extract video data from your
So I think that would be nice to perform full test for sure: Record
RTSP stream to mp4 file (w/o recompress, of course, -c copy) with
ffmpeg, then bring file to your AS MAC and test.
Another question is how did you got that
>> Bad (original) file:
>> https://www.kan.org/download/BlueIris/TrailDown.20230203_042912-042924.495.mp4
Are 'BI' creates such a files automatically every N munutes and you just
copied one from that windows PC disk with 'windows explorer'?
Or there is some 'export' procedure need to be executed within 'BI'
interface? If so, is 'mp4' container format only option? Or there are
others, like, say 'avi'?
This file looks like mp4 container by header, but if we assume that h264
data inside it valid, then container itself is not standard mp4
(like some extra non-standard 'delimeters' that pulled along vith h264
data as garbage).
By the way, list of container formats that ffmpeg can handle:
ffmpeg -formats
ffmpeg tries to guess container format automatically, but can be told
to threat input as specific format by -f <format>

More information about the ffmpeg-user mailing list