[FFmpeg-user] Video file often not recognised

Cecil Westerhof Cecil at decebal.nl
Wed Jun 15 19:03:07 EEST 2022


Reindl Harald <h.reindl at thelounge.net> writes:

> Am 15.06.22 um 16:25 schrieb Cecil Westerhof via ffmpeg-user:
>> Lately I am doing a lot with ffmpeg again.
>> But I have a strange problem.
>> Sometimes I send mp4 through WhatsApp.
>> Sometimes I see the thumbnail, sometimes I do not.
>> Today WhatsApp thinks my mp4 is not a video.
>> So I send it as an ordinary file.
>> On some places it can be played fine.
>> On another it plays only audio.
>> And another it cannot be played.
>> What can be happening here?
>> And could I do something about it by changing the parameters I use for
>> ffmpeg?
>
> god knows when you don't find it logical to post said parameters -
> crystal balls are out of order

The strange thing is that sometimes it worked and sometimes it did
not. With a multiple of scripts. And I thought it could be a generic
problem. (And I think it was.)

One example is:
     zoompan=zoompan=d=4:fps=.333:s=852x640,framerate=25:interp_start=0:interp_end=255:scene=100
     ffmpeg -y                  \
            -i       %03d.jpg   \
            -i       ${audio}   \
            -to      $to        \
            -vf      ${zoompan} \
            ${outputFile}

But then I remembered something about a problem with windows. After
some searching I changed it to:
     zoompan=zoompan=d=4:fps=.333:s=852x640,framerate=25:interp_start=0:interp_end=255:scene=100
     ffmpeg -y                  \
            -i       %03d.jpg   \
            -i       ${audio}   \
            -to      $to        \
            -vf      ${zoompan} \
            -pix_fmt yuv420p    \
            ${outputFile}

So I added '-pix_fmt yuv420p' and it looks like my problems are
resolved.
But I am sure I never used that before.

With this parameter my output files are 5 to 15 percent smaller.


Still strange that sometimes it worked and sometimes it did not. Just
make sure I edit all my scripts to use yuv420p,

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the ffmpeg-user mailing list