LingFeng-bbben / MajdataView

Next-generation Simai: Note disgner for maimai. The unity viewer part of the Majdata.
GNU General Public License v3.0
312 stars 38 forks source link

无法正常导出视频 #92

Closed Akineru closed 1 year ago

Akineru commented 1 year ago

问题出现的位置

导出视频功能

问题描述

导出视频的out.wav文件能正常播放,时长也正常,out.mp4文件大小为0

它是怎么出现的

选择导出视频之后弹出提示框和命令行框,然后view开始加速录制,左上角显示“编码器已退出 ExitCode:1”但是录制完成之后会左下角计时会继续跑,生成的wav时长正常,生成的mp4文件大小为0

它可以复现吗

每次都是一样

可能有帮助的截图与文件

命令行窗口

image

LingFeng-bbben commented 1 year ago

这个截图还没开始编码呢 请找到MajdataView_Data/StreamingAssets/ffarguments.txt 改这个txt然后在文件开头加 -report 这个参数 然后再跑一下渲染,会在铺面文件夹生成一个log文件 请发一下这个文件的内容

Akineru commented 1 year ago

ffmpeg started on 2023-02-12 at 20:36:34 Report written to "ffmpeg-20230212-203634.log" Log level: 48 Command line: "E:\DX\Majdata\Majdata_v4.1.0\Release\MajdataView_Data\StreamingAssets\ffmpeg.exe" -report -y -f rawvideo -vcodec rawvideo -pix_fmt rgba -s 608x599 -r 60 -i "\\.\pipe\majdataRec" -i out.wav -vf vflip -c:v libx264 -preset fast -pix_fmt yuv420p -c:a aac out.mp4 ffmpeg version 5.1.2-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.1.0 (Rev2, 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-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --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-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband libavutil 57. 28.100 / 57. 28.100 libavcodec 59. 37.100 / 59. 37.100 libavformat 59. 27.100 / 59. 27.100 libavdevice 59. 7.100 / 59. 7.100 libavfilter 8. 44.100 / 8. 44.100 libswscale 6. 7.100 / 6. 7.100 libswresample 4. 7.100 / 4. 7.100 libpostproc 56. 6.100 / 56. 6.100 Splitting the commandline. Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-f' ... matched as option 'f' (force format) with argument 'rawvideo'. Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'rawvideo'. Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'rgba'. Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '608x599'. Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '60'. Reading option '-i' ... matched as input url with argument '\.\pipe\majdataRec'. Reading option '-i' ... matched as input url with argument 'out.wav'. Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'vflip'. Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'. Reading option '-preset' ... matched as AVOption 'preset' with argument 'fast'. Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'. Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'aac'. Reading option 'out.mp4' ... matched as output url. Finished splitting the commandline. Parsing a group of options: global . Applying option report (generate a report) with argument 1. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input url \.\pipe\majdataRec. Applying option f (force format) with argument rawvideo. Applying option vcodec (force video codec ('copy' to copy stream)) with argument rawvideo. Applying option pix_fmt (set pixel format) with argument rgba. Applying option s (set frame size (WxH or abbreviation)) with argument 608x599. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 60. Successfully parsed a group of options. Opening an input file: \.\pipe\majdataRec. [rawvideo @ 000001a3b5bbeb40] Opening '\.\pipe\majdataRec' for reading [file @ 000001a3b5bbc0c0] Setting default whitelist 'file,crypto,data' [rawvideo @ 000001a3b5bbeb40] Before avformat_find_stream_info() pos: 0 bytes read:65536 seeks:0 nb_streams:1 [rawvideo @ 000001a3b5bbeb40] All info found [rawvideo @ 000001a3b5bbeb40] After avformat_find_stream_info() pos: 1456768 bytes read:1456768 seeks:0 frames:1 Input #0, rawvideo, from '\.\pipe\majdataRec': Duration: N/A, start: 0.000000, bitrate: 699248 kb/s Stream #0:0, 1, 1/60: Video: rawvideo (RGBA / 0x41424752), rgba, 608x599, 699248 kb/s, 60 tbr, 60 tbn Successfully opened the file. Parsing a group of options: input url out.wav. Successfully parsed a group of options. Opening an input file: out.wav. [NULL @ 000001a3b5bbe680] Opening 'out.wav' for reading [file @ 000001a3b5bd2480] Setting default whitelist 'file,crypto,data' [wav @ 000001a3b5bbe680] Format wav probed with size=2048 and score=99 [wav @ 000001a3b5bbe680] Before avformat_find_stream_info() pos: 44 bytes read:22742708 seeks:3 nb_streams:1 [wav @ 000001a3b5bbe680] probing stream 0 pp:32 [wav @ 000001a3b5bbe680] probing stream 0 pp:31 [wav @ 000001a3b5bbe680] probing stream 0 pp:30 [wav @ 000001a3b5bbe680] probing stream 0 pp:29 [wav @ 000001a3b5bbe680] probing stream 0 pp:28 [wav @ 000001a3b5bbe680] probing stream 0 pp:27 [wav @ 000001a3b5bbe680] probing stream 0 pp:26 [wav @ 000001a3b5bbe680] probing stream 0 pp:25 [wav @ 000001a3b5bbe680] probing stream 0 pp:24 [wav @ 000001a3b5bbe680] probing stream 0 pp:23 [wav @ 000001a3b5bbe680] probing stream 0 pp:22 [wav @ 000001a3b5bbe680] probing stream 0 pp:21 [wav @ 000001a3b5bbe680] probing stream 0 pp:20 [wav @ 000001a3b5bbe680] probing stream 0 pp:19 [wav @ 000001a3b5bbe680] probing stream 0 pp:18 [wav @ 000001a3b5bbe680] probing stream 0 pp:17 [wav @ 000001a3b5bbe680] probing stream 0 pp:16 [wav @ 000001a3b5bbe680] probing stream 0 pp:15 [wav @ 000001a3b5bbe680] probing stream 0 pp:14 [wav @ 000001a3b5bbe680] probing stream 0 pp:13 [wav @ 000001a3b5bbe680] probing stream 0 pp:12 [wav @ 000001a3b5bbe680] probing stream 0 pp:11 [wav @ 000001a3b5bbe680] probing stream 0 pp:10 [wav @ 000001a3b5bbe680] probing stream 0 pp:9 [wav @ 000001a3b5bbe680] probing stream 0 pp:8 [wav @ 000001a3b5bbe680] probing stream 0 pp:7 [wav @ 000001a3b5bbe680] probing stream 0 pp:6 [wav @ 000001a3b5bbe680] probing stream 0 pp:5 [wav @ 000001a3b5bbe680] probing stream 0 pp:4 [wav @ 000001a3b5bbe680] probing stream 0 pp:3 [wav @ 000001a3b5bbe680] probing stream 0 pp:2 [wav @ 000001a3b5bbe680] probing stream 0 pp:1 [wav @ 000001a3b5bbe680] probed stream 0 [wav @ 000001a3b5bbe680] parser not found for codec pcm_s16le, packets or times may be invalid. [wav @ 000001a3b5bbe680] All info found [wav @ 000001a3b5bbe680] After avformat_find_stream_info() pos: 204844 bytes read:22972084 seeks:3 frames:50 Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, wav, from 'out.wav': Duration: 00:02:08.37, bitrate: 2822 kb/s Stream #1:0, 50, 1/44100: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s Successfully opened the file. Parsing a group of options: output url out.mp4. Applying option vf (set video filters) with argument vflip. Applying option c:v (codec name) with argument libx264. Applying option pix_fmt (set pixel format) with argument yuv420p. Applying option c:a (codec name) with argument aac. Successfully parsed a group of options. Opening an output file: out.mp4. [file @ 000001a3b5bed300] Setting default whitelist 'file,crypto,data' Successfully opened the file. Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native)) Press [q] to stop, [?] for help cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [rawvideo @ 000001a3b5bd1bc0] PACKET SIZE: 1456768, STRIDE: 2432 detected 16 logical cores [graph 0 input from stream 0:0 @ 000001a3b5bf7fc0] Setting 'video_size' to value '608x599' [graph 0 input from stream 0:0 @ 000001a3b5bf7fc0] Setting 'pix_fmt' to value '26' [graph 0 input from stream 0:0 @ 000001a3b5bf7fc0] Setting 'time_base' to value '1/60' [graph 0 input from stream 0:0 @ 000001a3b5bf7fc0] Setting 'pixel_aspect' to value '0/1' [graph 0 input from stream 0:0 @ 000001a3b5bf7fc0] Setting 'frame_rate' to value '60/1' [graph 0 input from stream 0:0 @ 000001a3b5bf7fc0] w:608 h:599 pixfmt:rgba tb:1/60 fr:60/1 sar:0/1 [format @ 000001a3b5bf4840] Setting 'pix_fmts' to value 'yuv420p' [auto_scale_0 @ 000001a3b5bf3080] w:iw h:ih flags:'' interl:0 [format @ 000001a3b5bf4840] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_vflip_0' and the filter 'format' [AVFilterGraph @ 000001a3b5bd1900] query_formats: 4 queried, 3 merged, 1 already done, 0 delayed [auto_scale_0 @ 000001a3b5bf3080] w:608 h:599 fmt:rgba sar:0/1 -> w:608 h:599 fmt:yuv420p sar:0/1 flags:0x0 [libx264 @ 000001a3b5e20380] height not divisible by 2 (608x599) 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 [AVIOContext @ 000001a3b5eecc80] Statistics: 0 bytes written, 0 seeks, 0 writeouts [AVIOContext @ 000001a3b5bbc2c0] Statistics: 4370304 bytes read, 0 seeks [AVIOContext @ 000001a3b5bda600] Statistics: 22972084 bytes read, 3 seeks Conversion failed!

LingFeng-bbben commented 1 year ago

height not divisible by 2 (608x599)