gpt4 book ai didi

ffmpeg:视频参数与DNxHD不兼容

转载 作者:行者123 更新时间:2023-12-04 23:31:51 26 4
gpt4 key购买 nike

关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。












我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为 on-topic对于堆栈溢出。


1年前关闭。







Improve this question




我正在尝试转换 mp4mov ,但是 ffmpeg视频转换有问题:

  Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))
我已经尝试了几个建议的配置但没有成功:
  • -vcodec dnxhd -acodec pcm_s16le -pix_fmt yuv422p10 -r 24000/1001 -b:v 175M
  • -vcodec dnxhd -acodec pcm_s16le -pix_fmt yuv422p10 -r 25/1 -b:v 185M
  • -vcodec dnxhd -acodec pcm_s16le -pix_fmt yuv422p10 -r 60000/1001 -b:v 440M
  • -vcodec dnxhd -acodec pcm_s16le -pix_fmt yuv422p -r 24000/1001 -b:v 115M
  • -vcodec dnxhd -acodec pcm_s16le -pix_fmt yuv422p -r 25/1 -b:v 120M

  • 知道有什么问题吗?如何选择“正确”的视频格式?
    有没有可能 ffmpeg当相机旋转 90° 时拒绝转换视频?即输入分辨率为 1080x1920 ?
    ffmpeg -i google-2020/VID-20200421-WA0000.mp4 -map_metadata 0 -vcodec dnxhd -acodec pcm_s16le -pix_fmt yuv422p10 -r 24000/1001 -b:v 175M google-2020-conv2/VID-20200421-WA0000.mov
    ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
    configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
    libavutil 55. 78.100 / 55. 78.100
    libavcodec 57.107.100 / 57.107.100
    libavformat 57. 83.100 / 57. 83.100
    libavdevice 57. 10.100 / 57. 10.100
    libavfilter 6.107.100 / 6.107.100
    libavresample 3. 7. 0 / 3. 7. 0
    libswscale 4. 8.100 / 4. 8.100
    libswresample 2. 9.100 / 2. 9.100
    libpostproc 54. 7.100 / 54. 7.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'google-2020/VID-20200421-WA0000.mp4':
    Metadata:
    major_brand : mp42
    minor_version : 0
    compatible_brands: isommp42
    creation_time : 2020-04-26T12:06:16.000000Z
    Duration: 00:00:12.98, start: 0.000000, bitrate: 720 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/bt709), 640x352 [SAR 1:1 DAR 20:11], 592 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
    creation_time : 2020-04-26T12:06:16.000000Z
    handler_name : ISO Media file produced by Google Inc. Created on: 04/26/2020.
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
    creation_time : 2020-04-26T12:06:16.000000Z
    handler_name : ISO Media file produced by Google Inc. Created on: 04/26/2020.
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))
    Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    [dnxhd @ 0x55b24eeae0a0] video parameters incompatible with DNxHD. Valid DNxHD profiles:
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p10; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p10; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 365Mbps; pixel format: yuv422p10; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p10; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 115Mbps; pixel format: yuv422p; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 120Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 145Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 240Mbps; pixel format: yuv422p; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 290Mbps; pixel format: yuv422p; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 220Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 365Mbps; pixel format: yuv422p; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080i; bitrate: 185Mbps; pixel format: yuv422p10; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080i; bitrate: 220Mbps; pixel format: yuv422p10; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080i; bitrate: 120Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080i; bitrate: 145Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080i; bitrate: 185Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080i; bitrate: 220Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080i; bitrate: 120Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080i; bitrate: 145Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p10; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p10; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 180Mbps; pixel format: yuv422p10; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 220Mbps; pixel format: yuv422p10; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 110Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 180Mbps; pixel format: yuv422p; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 220Mbps; pixel format: yuv422p; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 60Mbps; pixel format: yuv422p; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 60Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 75Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 120Mbps; pixel format: yuv422p; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1280x720p; bitrate: 145Mbps; pixel format: yuv422p; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 36Mbps; pixel format: yuv422p; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 36Mbps; pixel format: yuv422p; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 45Mbps; pixel format: yuv422p; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 75Mbps; pixel format: yuv422p; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 90Mbps; pixel format: yuv422p; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 350Mbps; pixel format: yuv422p10; framerate: 24000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 390Mbps; pixel format: yuv422p10; framerate: 25/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p10; framerate: 30000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 730Mbps; pixel format: yuv422p10; framerate: 50/1
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1920x1080p; bitrate: 880Mbps; pixel format: yuv422p10; framerate: 60000/1001
    [dnxhd @ 0x55b24eeae0a0] Frame size: 960x720p; bitrate: 42Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 960x720p; bitrate: 60Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 960x720p; bitrate: 75Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 960x720p; bitrate: 115Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080p; bitrate: 63Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080p; bitrate: 84Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080p; bitrate: 100Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080p; bitrate: 110Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080i; bitrate: 80Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080i; bitrate: 90Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080i; bitrate: 100Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24eeae0a0] Frame size: 1440x1080i; bitrate: 110Mbps; pixel format: yuv422p; framerate: 0/0
    [dnxhd @ 0x55b24ea11a60] ff_frame_thread_encoder_init failed
    Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
    Conversion failed!

    最佳答案

    Any idea what's wrong? How do I choose "correct" video format?


    DNxHD 有特定的要求。你必须选择一个正确的:
  • 宽 x 高
  • 比特率
  • 像素格式
  • 帧率

  • 您的命令缺少可接受的宽度 x 高度。您的输入是 640x352,但 DNxHD 需要 720p 或更大。引用 有效的 DNxHD 配置文件 ffmpeg在您的问题中输出。
    对于 640x352 的输入,我想知道 DNxHD 是否是正确的选择。为什么需要 DNxHD?可能是 XY 问题。

    Is it possible that ffmpeg refuses to convert video when camera is rotated 90°? i.e. the input resolution would be 1080x1920?


    我在您的文件信息中没有看到轮换元数据/sidedata。 ffmpeg编码时会自动旋转,除非你用 -noautorotate 告诉它不要这样做.
    如果它旋转到 1080x1920,那么它将是无效的,因为它没有在 中明确列出。有效的 DNxHD 配置文件 ffmpeg在您的问题中输出。
    例子
    与您的输入相匹配的最接近接受的个人资料是:
    Frame size: 1280x720p; bitrate: 110Mbps; pixel format: yuv422p; framerate: 30000/1001
    命令:
    ffmpeg -i input.mp4 -vf "fps=30000/1001,scale=1280:720:force_original_aspect_ratio=increase,crop=1280:720,setsar=1,format=yuv422p" -c:v dnxhd -b:v 110M -c:a pcm_s16le output.mov
    比例和填充过滤器示例来自 Resizing videos with ffmpeg to fit into specific size .如果您更喜欢 pad-to-fit(信箱/邮筒)而不是crop-to-fit,请参阅此链接以获取更多示例。

    关于ffmpeg:视频参数与DNxHD不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64511344/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com