3b1b / 3b1b/manim

Sound in Windows refuses to be rendered due to FFMPEG error

未關閉
#1,152 24 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
93.9k
分支
7.7k
平均合併
2 天 13 小時
30 天內合併 PR
4

描述

I tried to play the sound files as instructed by [Theorem Of Beethoven](https://www.youtube.com/watch?v=tsMGRN3ZfAg&list=PL2B6OzTsMUrwo4hA3BBfS7ZR34K361Z8F&index=20) yet a strange kind of error is produced specifically from FFMPEG that I don't completely understand but still is annoying.

Pardon my lack of good formatting.

File "C:\Manim\manim-18june\manimlib\extract_scene.py", line 155, in main
scene = SceneClass(**scene_kwargs)
File "C:\Manim\manim-18june\manimlib\scene\scene.py", line 79, in __init__
self.file_writer.finish()
File "C:\Manim\manim-18june\manimlib\scene\scene_file_writer.py", line 379, in finish
self.combine_movie_files()
File "C:\Manim\manim-18june\manimlib\scene\scene_file_writer.py", line 506, in combine_movie_files
self.audio_segment.export(
File "C:\Users\allan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pydub\audio_segment.py", line 911, in export
raise CouldntEncodeError(
pydub.exceptions.CouldntEncodeError: Encoding failed. ffmpeg/avlib returned error code: 1

***And then after that the program is generous enough to proceed with this:***

Command:['ffmpeg', '-y', '-f', 'wav', '-i', 'C:\\Users\\ALLANM~1.000\\AppData\\Local\\Temp\\tmpz415eeyi', '-b:a', '312k', '-f', 'mp3', 'C:\\Users\\ALLANM~1.000\\AppData\\Local\\Temp\\tmpjzli2wu2']

Output from ffmpeg/avlib:

ffmpeg version git-2020-06-17-0b3bd00 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200523
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
--enable-amf
libavutil 56. 55.100 / 56. 55.100
libavcodec 58. 92.100 / 58. 92.100
libavformat 58. 46.101 / 58. 46.101
libavdevice 58. 11.100 / 58. 11.100
libavfilter 7. 86.100 / 7. 86.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'C:\Users\ALLANM~1.000\AppData\Local\Temp\tmpz415eeyi':
Duration: 00:00:02.23, bitrate: 2822 kb/s
Stream #0:0: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s32, 2822 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s32le (native) -> mp3 (mp3_mf))
Press [q] to stop, [?] for help
[mp3_mf @ 06a9dec0] could not find any MFT for the given media type
[mp3_mf @ 06a9dec0] could not create MFT
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!

*I really don't understand Manim and Python that well right now so this is just a good source for pure stress*

I tried looking into the problem on my own but that aspect is from the FFMPEG side and I'm still not entirely sure what that program does. I also did intensive web searches for anyone with a similar problem but no dice.

By the way, I installed the latest version of Manim. Should I change and lose a good part of my current progress or is this fixable on the current version?

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

此錯誤發生在 manimlib/scene/scene_file_writer.py 的 combine_movie_files,pydub 在此處呼叫 ffmpeg 進行音訊編碼。ffmpeg 指令在 Windows 上出現 'could not find any MFT for the given media type' 錯誤。檢查 Windows 上 ffmpeg 的安裝和 codec 可用性,並檢查 pydub 的音訊匯出參數。查找 manim codebase 或 pydub 文件中的 Windows 特定音訊編碼問題。

由索引模型根據 Issue 內容生成。

評估

領域
audio-video-rtc, tooling
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。