我正在尝试播放 WebM VP9 视频文件。媒体播放器说该视频无法播放。
这意味着,我无法跳转到不同的时间或来回跳过几秒钟。每次播放视频时,我都必须从头开始。我可以暂停播放并继续。但如果视频停止,我必须从头开始观看。
有没有类似的开源工具FFmpeg
可以用来让视频可搜索?怎么做?
到目前为止,我已经尝试ts-ebml
过 Node.js(建议在这里使用 ffmpeg 查找 opus webm 音频的正确参数是什么?):
Linux
ts-ebml -s not_seekable.webm | cat > seekable.webm
视窗
ts-ebml -s not_seekable.webm | type > seekable.webm
它不适用于大于 2 GB 的文件。
Syntax error.
node:fs:419
throw new ERR_FS_FILE_TOO_LARGE(size);
^
RangeError [ERR_FS_FILE_TOO_LARGE]: File size (27933740002) is greater than 2 GB
at new NodeError (node:internal/errors:371:5)
at tryCreateBuffer (node:fs:419:13)
at Object.readFileSync (node:fs:464:14)
at Object.<anonymous> (C:\Users\Nathan Bauer\AppData\Roaming\npm\node_modules\ts-ebml\lib\cli.js:24:18)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47 {
code: 'ERR_FS_FILE_TOO_LARGE'
}
我已经分析了我所指的视频文件ffprobe
:
D:\>ffprobe testvideo.webm
也许这些信息有帮助。这是控制台输出:
ffprobe version 2022-02-24-git-8ef03c2ff1-full_build-www.gyan.dev Copyright (c) 2007-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 21.100 / 57. 21.100
libavcodec 59. 21.100 / 59. 21.100
libavformat 59. 17.102 / 59. 17.102
libavdevice 59. 5.100 / 59. 5.100
libavfilter 8. 27.100 / 8. 27.100
libswscale 6. 5.100 / 6. 5.100
libswresample 4. 4.100 / 4. 4.100
libpostproc 56. 4.100 / 56. 4.100
[matroska,webm @ 000001d61d73f6c0] Element at 0x7a5 ending at 0x7bd exceeds containing master element ending at 0x7ac
[matroska,webm @ 000001d61d73f6c0] Duplicate element
[matroska,webm @ 000001d61d73f6c0] Element at 0x13ed ending at 0x1406 exceeds containing master element ending at 0x13f4
[matroska,webm @ 000001d61d73f6c0] Duplicate element
[matroska,webm @ 000001d61d73f6c0] Element at 0x56 ending at 0x16a6 exceeds containing master element ending at 0x1402
[matroska,webm @ 000001d61d73f6c0] 0x00 at pos 101 (0x65) invalid as first byte of an EBML number
[matroska,webm @ 000001d61d73f6c0] 0x00 at pos 131515 (0x201bb) invalid as first byte of an EBML number
Input #0, matroska,webm, from 'testvideo.webm':
Duration: N/A, start: 5.000000, bitrate: N/A
Stream #0:0: Video: vp9 (Profile 0), yuv420p(tv, bt709), 3840x2160, SAR 1:1 DAR 16:9, 60 fps, 60 tbr, 1k tbn (default)
Stream #0:1: Audio: opus, 48000 Hz, stereo, fltp (default)