<i id='mfjIO'><tr id='mfjIO'><dt id='mfjIO'><q id='mfjIO'><span id='mfjIO'><b id='mfjIO'><form id='mfjIO'><ins id='mfjIO'></ins><ul id='mfjIO'></ul><sub id='mfjIO'></sub></form><legend id='mfjIO'></legend><bdo id='mfjIO'><pre id='mfjIO'><center id='mfjIO'></center></pre></bdo></b><th id='mfjIO'></th></span></q></dt></tr></i><div id='mfjIO'><tfoot id='mfjIO'></tfoot><dl id='mfjIO'><fieldset id='mfjIO'></fieldset></dl></div>

    <small id='mfjIO'></small><noframes id='mfjIO'>

  1. <legend id='mfjIO'><style id='mfjIO'><dir id='mfjIO'><q id='mfjIO'></q></dir></style></legend>

      <bdo id='mfjIO'></bdo><ul id='mfjIO'></ul>

  2. <tfoot id='mfjIO'></tfoot>

    1. 我收到错误“使用了已弃用的像素格式,请确保

      时间:2023-09-20

      <small id='lpHKD'></small><noframes id='lpHKD'>

          <bdo id='lpHKD'></bdo><ul id='lpHKD'></ul>
          <legend id='lpHKD'><style id='lpHKD'><dir id='lpHKD'><q id='lpHKD'></q></dir></style></legend>

          • <i id='lpHKD'><tr id='lpHKD'><dt id='lpHKD'><q id='lpHKD'><span id='lpHKD'><b id='lpHKD'><form id='lpHKD'><ins id='lpHKD'></ins><ul id='lpHKD'></ul><sub id='lpHKD'></sub></form><legend id='lpHKD'></legend><bdo id='lpHKD'><pre id='lpHKD'><center id='lpHKD'></center></pre></bdo></b><th id='lpHKD'></th></span></q></dt></tr></i><div id='lpHKD'><tfoot id='lpHKD'></tfoot><dl id='lpHKD'><fieldset id='lpHKD'></fieldset></dl></div>
              <tbody id='lpHKD'></tbody>
            <tfoot id='lpHKD'></tfoot>

              • 本文介绍了我收到错误“使用了已弃用的像素格式,请确保您使用 ffmpeg 正确设置了范围"……有人可以检查我下面的代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                这是我使用 ffmpeg 的代码我想要视频缩略图但我不熟悉 ffmpeg 谁能知道我遇到的错误.

                [swscaler @ 0x7ff8da028c00] 不推荐使用的像素格式,请确保您没有正确设置范围输出#0,mjpeg,到'image.jpg':元数据:主要品牌:mp42次要版本:0兼容品牌:isomp42编码器:Lavf56.36.100流 #0:0(und): 视频: mjpeg, yuvj420p(pc), 320x240 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc (默认)元数据:创作时间:2016-11-06 09:40:22handler_name :由 Google Inc. 制作的 ISO 媒体文件.编码器:Lavc56.41.100 mjpeg流映射:流#0:0 ->#0:0(h264(本机)-> mjpeg(本机))按 [q] 停止,按 [?] 寻求帮助帧= 1 fps=0.0 q=4.8 Lsize= 16kB 时间=00:00:01.00 比特率= 129.5kbits/s视频:16kB 音频:0kB 字幕:0kB 其他流:0kB 全局标题:0kB 复用开销:0.000000%

                这也是我的代码:

                $video_url ='https://URL/upload/4b8acab123563649f19e07450d810df6.mp4';$ffmpeg = '/opt/local/bin/ffmpeg';$image = 'image.jpg';$间隔= 5;$size = '320x240';shell_exec($tmp = "$ffmpeg -i $video_url -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1");

                解决方案

                根据 ffmpeg 论坛,从命令行调用时可以忽略它,我总是忽略它.您可以尝试的一件事(请使用虚拟文件进行测试)是将 -pix_fmt yuvj422p 添加到最后一行,使其看起来像这样:

                shell_exec($tmp = "$ffmpeg -i $video_url -pix_fmt yuvj422p -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&;1");

                正如我所说,请测试它,因为我不能保证结果,但就我而言,我已经使用了 ffmpeg 数千次,即使有警告,一切看起来也很好.

                https://lists.ffmpeg.org/pipermail/ffmpeg-user/2014-February/020151.html

                <块引用><块引用>

                事实上,警告主要是针对图书馆用户的,ffmpeg 用户不应该受到影响.

                好的,那就忽略它.

                This is my code using ffmpeg I want to have video thumbnail but I'm not familiar in ffmpeg can someone know the error I got.

                [swscaler @ 0x7ff8da028c00] deprecated pixel format used, make sure you did set range correctly
                Output #0, mjpeg, to 'image.jpg':
                Metadata:
                major_brand     : mp42
                minor_version   : 0
                compatible_brands: isommp42
                encoder         : Lavf56.36.100
                Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 320x240 [SAR 4:3 DAR 16:9], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc (default)
                Metadata:
                  creation_time   : 2016-11-06 09:40:22
                  handler_name    : ISO Media file produced by Google Inc.
                  encoder         : Lavc56.41.100 mjpeg
                Stream mapping:
                Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
                Press [q] to stop, [?] for help
                frame=    1 fps=0.0 q=4.8 Lsize=      16kB time=00:00:01.00 bitrate= 129.5kbits/s    
                video:16kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
                

                Also This is my code:

                $video_url ='https://URL/upload/4b8acab123563649f19e07450d810df6.mp4';
                
                $ffmpeg = '/opt/local/bin/ffmpeg';
                $image = 'image.jpg';
                $interval = 5;
                $size = '320x240';
                shell_exec($tmp = "$ffmpeg -i $video_url -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1");  
                

                解决方案

                According to ffmpeg forum this can be ignored when called from the command line and I always ignored it. One thing you can try (test with a dummy file PLEASE) is to add -pix_fmt yuvj422p to your last line so it look like this:

                shell_exec($tmp = "$ffmpeg -i $video_url -pix_fmt yuvj422p -deinterlace -an -ss $interval -f mjpeg -t 1 -r 1 -y -s $size $image 2>&1");
                

                As I said, test it please as I cannot guarantee the results but as far as I'm concerned I've used ffmpeg thousand of times and everything looks just fine even with the warning.

                https://lists.ffmpeg.org/pipermail/ffmpeg-user/2014-February/020151.html

                Afaict, the warning is primarily meant for library users, ffmpeg users should not be affected.

                OK, will just ignore it then.

                这篇关于我收到错误“使用了已弃用的像素格式,请确保您使用 ffmpeg 正确设置了范围"……有人可以检查我下面的代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:ffmpeg 从cropdetect 中获取值 下一篇:查询音频/视频文件的信息

                相关文章

                最新文章

                <small id='3vE7E'></small><noframes id='3vE7E'>

                  • <bdo id='3vE7E'></bdo><ul id='3vE7E'></ul>
                1. <tfoot id='3vE7E'></tfoot>

                2. <i id='3vE7E'><tr id='3vE7E'><dt id='3vE7E'><q id='3vE7E'><span id='3vE7E'><b id='3vE7E'><form id='3vE7E'><ins id='3vE7E'></ins><ul id='3vE7E'></ul><sub id='3vE7E'></sub></form><legend id='3vE7E'></legend><bdo id='3vE7E'><pre id='3vE7E'><center id='3vE7E'></center></pre></bdo></b><th id='3vE7E'></th></span></q></dt></tr></i><div id='3vE7E'><tfoot id='3vE7E'></tfoot><dl id='3vE7E'><fieldset id='3vE7E'></fieldset></dl></div>
                3. <legend id='3vE7E'><style id='3vE7E'><dir id='3vE7E'><q id='3vE7E'></q></dir></style></legend>