gpt4 book ai didi

video - 使用 ffplay 播放视频的问题

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

每个人。我有 video 的问题使用ffplay播放。使用了以下命令

ffplay -i input.avi

但是出现了以下错误。
ffplay version N-87353-g183fd30 Copyright (c) 2003-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 76.100 / 55. 76.100
libavcodec 57.106.101 / 57.106.101
libavformat 57. 82.101 / 57. 82.101
libavdevice 57. 8.101 / 57. 8.101
libavfilter 6.105.100 / 6.105.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
[avi @ 00000000024bd9e0] Could not find codec parameters for stream 0 (Video: none (HEVC / 0x43564548), none, 1920x1080, 1697 kb/s): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, avi, from 'c:\problem.avi':
Duration: 00:00:25.00, start: 0.000000, bitrate: 1701 kb/s
Stream #0:0: Video: none (HEVC / 0x43564548), none, 1920x1080, 1697 kb/s, 30.92 fps, 30.92 tbr, 30.92 tbn, 30.92 tbc
No codec could be found with id 0
Failed to open file 'c:\problem.avi' or configure filtergraph

该视频可通过 VLC、Media Player Classic 毫无问题地播放。
在尝试找出有关视频文件的更多信息后,我使用了 ffprobe 命令
ffprobe -v 0  c:\problem.avi -print_format json -show_format -show_streams

{
"streams": [
{
"index": 0,
"codec_type": "video",
"codec_tag_string": "HEVC",
"codec_tag": "0x43564548",
"width": 1920,
"height": 1080,
"has_b_frames": 0,
"sample_aspect_ratio": "0:1",
"display_aspect_ratio": "0:1",
"level": -99,
"r_frame_rate": "773/25",
"avg_frame_rate": "773/25",
"time_base": "25/773",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 773,
"duration": "25.000000",
"bit_rate": "1697304",
"nb_frames": "773",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
}
}
],
"format": {
"filename": "c:\\bin\\Virtual\\problem\\problem.avi",
"nb_streams": 1,
"nb_programs": 0,
"format_name": "avi",
"format_long_name": "AVI (Audio Video Interleaved)",
"start_time": "0.000000",
"duration": "25.000000",
"size": "5318210",
"bit_rate": "1701827",
"probe_score": 100
}
}

这个视频文件可能有什么问题?

最佳答案

您可以通过显式设置 HEVC 解码器来播放此视频:

ffmpleg -codec:v hevc -i input.avi

原因很可能是 AVI 容器实际上不能包含 HEVC 数据。幸运的是,通过运行“ffprobe input.avi”并检查流,可能会知道其中的内容。

关于video - 使用 ffplay 播放视频的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46560249/

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