[FFmpeg-user] Where's the error?
Laine
llee040 at sbcglobal.net
Thu Sep 19 01:12:24 EEST 2024
On Sep 18, 2024, at 11:55 AM, Oliver Fromme <oliver at fromme.com> wrote:
>
> Laine wrote:
>> I use ffmpeg on my Mac without understanding much of it. I'd like to
>> be able to determine where in the video occasional reported errors
>> occur so I can view the affected passage in the output. My questions
>> about the following command and output are, "do the errors reported
>> include the time in the video where the error occurred, and if so,
>> how do I calculate that time in hours, minutes, and seconds so I can
>> view its containing passage in the encoded video?"
>>
>> The errors I'm referring to in the output are
>>
>> [h264 @ 0x127f33070] concealing 858 DC, 858 AC, 858 MV errors in B frame0.4kbits/s dup=76 drop=0 speed=8.83x
>> [h264 @ 0x127f44130] left block unavailable for requested intra mode
>> [h264 @ 0x127f44130] error while decoding MB 0 30, bytestream 49191
>> [h264 @ 0x127f44130] concealing 4609 DC, 4609 AC, 4609 MV errors in P frame
>> [vist#0:0/h264 @ 0x127f05730] [dec:h264 @ 0x127f06d30] corrupt decoded frame
>
> There are no time stamps in the above output.
>
> However, when you use the option ``-stats'', FFmpeg prints progress
> information. I think this is even the default (unless you give the
> option ``-nostats''). It looks like this:
>
> frame= 175 fps= 12 q=29.9 Lsize= 925kB time=00:00:08.12 bitrate= 932.6kbits/s speed=0.549x
> ^^^^^^^^^^ ^^^^^^^^^^^^^^^^
>
> As you can see, it contains a frame number as well as a time stamp
> in HH:MM:SS.ss format.
>
> The problem is, when a module prints a diagnostic message (in your
> case it's the h264 decoder module), that message overwrites parts
> of the progress information line. This seems to happen in your
> case, so you don't see the time stamp.
>
> There are several ways to solve this. One way is to modify FFmpeg's
> output by appending a tr(1) command like this:
>
> ffmpeg ... 2>&1 | tr '\r' '\n'
>
>
Thanks!
The original ffmpeg command line from original post is
ffmpeg -i '/Users/me/Downloads/philanthropist.ts' -map 0:0 -vf decimate=cycle=5,crop=1920:1024:0:28 -c:v h264_videotoolbox -b:v 3000k -color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709 -metadata:s:v "title=" -disposition:v default -map 0:1 -c:a:0 copy -metadata:s:a:0 "title=" -disposition:a:0 default -metadata:g "title=" -r 24 -movflags disable_chpl '/Users/me/Downloads/philanthropist.mp4'
Can you please tell me if the following is a suitable version of the command that includes your suggested modification?
ffmpeg -i '/Users/me/Downloads/philanthropist.ts' -map 0:0 -vf decimate=cycle=5,crop=1920:1024:0:28 -c:v h264_videotoolbox -b:v 3000k -color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709 -metadata:s:v "title=" -disposition:v default -map 0:1 -c:a:0 copy -metadata:s:a:0 "title=" -disposition:a:0 default -metadata:g "title=" -r 24 -movflags disable_chpl '/Users/me/Downloads/philanthropist.mp4' 2>&1 | tr '\r' '\n'
Thanks again.
Sincerely,
L. Lee
More information about the ffmpeg-user
mailing list