Open misslou opened 2 months ago
看起来好像有非UTF-8 编码的文本文件。 全部日志发一下看看?
看起来好像有非 UTF-8 编码的文本文件。全部日志发一下看看? .... core_on_data opcode=2 syn_core_on_data core_on_msg:{"header":{"namespace":"SpeechSynthesizer","name":"SynthesisCompleted","status":20000000,"message_id":"15a3e53e3561454aba22b1a4a5b6b5df","task_id":"a5d2c1ea5bdb4cebaffba9409b7f984d","status_text":"Gateway:SUCCESS:Success."}} syn_core_on_msg:msg={"header":{"namespace":"SpeechSynthesizer","name":"SynthesisCompleted","status":20000000,"message_id":"15a3e53e3561454aba22b1a4a5b6b5df","task_id":"a5d2c1ea5bdb4cebaffba9409b7f984d","status_text":"Gateway:SUCCESS:Success."}} args=() handle_message __synthesis_completed synthesis_completed shutdown done on_completed:args=>('',) message=>{"header":{"namespace":"SpeechSynthesizer","name":"SynthesisCompleted","status":20000000,"message_id":"15a3e53e3561454aba22b1a4a5b6b5df","task_id":"a5d2c1ea5bdb4cebaffba9409b7f984d","status_text":"Gateway:SUCCESS:Success."}} core_on_close __sr_core_on_close on_close: args=>('',) ali tts done with result:None ws exit... main_generate_video_dubbing end main_generate_subtitle begin: selected_audio_provider: Ali Response status and response reason: 200 OK Recognize response is: {'task_id': '13142ef79c7f49b887e5ee9df00f7b01', 'result': '', 'status': 20000000, 'message': 'SUCCESS', 'flash_result': {'duration': 16821, 'completed': True, 'sentences': [{'text': '探索人工智能的未来,', 'begin_time': 0, 'end_time': 2021, 'channel_id': 0}, {'text': '发展ai技术在医疗、金融、教育等领域的应用,', 'begin_time': 2021, 'end_time': 6064, 'channel_id': 0}, {'text': '以及对人类生活的影响,', 'begin_time': 6064, 'end_time': 8310, 'channel_id': 0}, {'text': '了解ai的基本原理和发展历程,', 'begin_time': 8310, 'end_time': 11230, 'channel_id': 0}, {'text': '探讨人工智能对社会和生活的改变。', 'begin_time': 11230, 'end_time': 14600, 'channel_id': 0}], 'latency': 1391}} 1 00:00:00,000 --> 00:00:02,021 探索人工智能的未来,
2 00:00:02,021 --> 00:00:06,064 发展ai技术在医疗、金融、教育等领域的应用,
3 00:00:06,064 --> 00:00:08,310 以及对人类生活的影响,
4 00:00:08,310 --> 00:00:11,230 了解ai的基本原理和发展历程,
5 00:00:11,230 --> 00:00:15,600 探讨人工智能对社会和生活的改变。
main_get_video_resource begin
resource_provider: pexels
ffmpeg -i /root/dist/MoneyPrinterPlus/work/1728546135914.wav
音频时长: 16
audio_length: 16
video_duration: 24
total length: 0 audio length: 16
match: {'id': 10673412, 'quality': 'hd', 'file_type': 'video/mp4', 'width': 1080, 'height': 1920, 'fps': 25.0, 'link': 'https://videos.pexels.com/video-files/8058101/8058101-hd_1080_1920_25fps.mp4', 'size': 8864870}
video_duration: 10
total length: 10 audio length: 16
match: {'id': 11125248, 'quality': 'uhd', 'file_type': 'video/mp4', 'width': 2160, 'height': 3840, 'fps': 23.97599983215332, 'link': 'https://videos.pexels.com/video-files/9515580/9515580-uhd_2160_3840_24fps.mp4', 'size': 17210784}
video_duration: 17
total length: 19.0 audio length: 16
download video
Video downloaded successfully: /root/dist/MoneyPrinterPlus/resource/pexels-8058101-hd_1080_1920_25fps.mp4
download video
Video downloaded successfully: /root/dist/MoneyPrinterPlus/resource/pexels-9515580-uhd_2160_3840_24fps.mp4
normalize video
ffprobe -i /root/dist/MoneyPrinterPlus/resource/pexels-8058101-hd_1080_1920_25fps.mp4 -show_entries format=duration
视频时长: 23.64
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of default=noprint_wrappers=1:nokey=1 /root/dist/MoneyPrinterPlus/resource/pexels-8058101-hd_1080_1920_25fps.mp4
Width: 720, Height: 1280
ffmpeg -i /root/dist/MoneyPrinterPlus/resource/pexels-8058101-hd_1080_1920_25fps.mp4 -r 20 -an -t 10 -vf scale=1080:-1:force_original_aspect_ratio=1,crop=1080:1920:(ow-iw)/2:(oh-ih)/2 -y /root/dist/MoneyPrinterPlus/work/pexels-8058101-hd_1080_1920_25fps.temp.mp4
Command executed successfully.
ffprobe -i /root/dist/MoneyPrinterPlus/resource/pexels-9515580-uhd_2160_3840_24fps.mp4 -show_entries format=duration
视频时长: 10.01
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of default=noprint_wrappers=1:nokey=1 /root/dist/MoneyPrinterPlus/resource/pexels-9515580-uhd_2160_3840_24fps.mp4
Width: 2160, Height: 3840
ffmpeg -i /root/dist/MoneyPrinterPlus/resource/pexels-9515580-uhd_2160_3840_24fps.mp4 -r 20 -an -t 10 -vf scale=1080:-1:force_original_aspect_ratio=1,crop=1080:1920:(ow-iw)/2:(oh-ih)/2 -y /root/dist/MoneyPrinterPlus/work/pexels-9515580-uhd_2160_3840_24fps.temp.mp4
Command executed successfully.
ffprobe -i /root/dist/MoneyPrinterPlus/work/pexels-8058101-hd_1080_1920_25fps.temp.mp4 -show_entries format=duration
视频时长: 10.0
ffprobe -i /root/dist/MoneyPrinterPlus/work/pexels-9515580-uhd_2160_3840_24fps.temp.mp4 -show_entries format=duration
视频时长: 10.0
启动转场特效
转场视频长度:10.0 10.0
ffmpeg version 6.1.2 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration:
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/root/dist/MoneyPrinterPlus/work/pexels-8058101-hd_1080_1920_25fps.temp.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf60.16.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 1018 kb/s
Stream #0:00x1: Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p(tv, bt709), 1080x1920 [SAR 1:1 DAR 9:16], 1017 kb/s, 20 fps, 20 tbr, 10240 tbn (default)
Metadata:
handler_name : L-SMASH Video Handler
vendor_id : [0][0][0][0]
encoder : Lavc60.31.102 mpeg4
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/root/dist/MoneyPrinterPlus/work/pexels-9515580-uhd_2160_3840_24fps.temp.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf60.16.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 1151 kb/s
Stream #1:00x1: Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p(tv, bt709), 1080x1920 [SAR 1:1 DAR 9:16], 1149 kb/s, 20 fps, 20 tbr, 10240 tbn (default)
Metadata:
handler_name : L-SMASH Video Handler
vendor_id : [0][0][0][0]
encoder : Lavc60.31.102 mpeg4
Stream mapping:
Stream #0:0 (mpeg4) -> xfade
Stream #1:0 (mpeg4) -> xfade
format:default -> Stream #0:0 (mpeg4)
Press [q] to stop, [?] for help
Output #0, mp4, to '/root/dist/MoneyPrinterPlus/final/final-1728546190045.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf60.16.100
Stream #0:0: Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, bt709, progressive), 1080x1920 [SAR 1:1 DAR 9:16], q=2-31, 200 kb/s, 20 fps, 10240 tbn
Metadata:
encoder : Lavc60.31.102 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[out#0/mp4 @ 0x55f5c05994c0] video:2284kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.110824%
frame= 380 fps= 68 q=31.0 Lsize= 2287kB time=00:00:18.95 bitrate= 988.5kbits/s speed=3.39x
ffmpeg -i /root/dist/MoneyPrinterPlus/final/final-1728546190045.mp4 -i /root/dist/MoneyPrinterPlus/work/1728546135914.wav -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 -shortest -y /root/dist/MoneyPrinterPlus/final/final-1728546190045.temp.mp4
['ffmpeg', '-i', '/root/dist/MoneyPrinterPlus/final/final-1728546190045.mp4', '-i', '/root/dist/MoneyPrinterPlus/bgmusic/2.mp3', '-filter_complex', '[1:a]aloop=loop=0:size=100M[bgm];[bgm]volume=0.3[bgm_vol];[0:a][bgm_vol]amix=duration=first:dropout_transition=3:inputs=2[a]', '-map', '0:v', '-map', '[a]', '-c:v', 'copy', '-shortest', '/root/dist/MoneyPrinterPlus/final/final-1728546190045.temp.mp4']
2024-10-10 07:43:13.322 Uncaught app exception
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 575, in _run_script
self._session_state.on_script_will_rerun(
File "/usr/local/lib/python3.12/site-packages/streamlit/runtime/state/safe_session_state.py", line 65, in on_script_will_rerun
self._state.on_script_will_rerun(latest_widget_states)
File "/usr/local/lib/python3.12/site-packages/streamlit/runtime/state/session_state.py", line 517, in on_script_will_rerun
self._call_callbacks()
File "/usr/local/lib/python3.12/site-packages/streamlit/runtime/state/session_state.py", line 530, in _call_callbacks
self._new_widget_state.call_callback(wid)
File "/usr/local/lib/python3.12/site-packages/streamlit/runtime/state/session_state.py", line 274, in call_callback
callback(*args, **kwargs)
File "/root/dist/MoneyPrinterPlus/pages/01_auto_video.py", line 98, in generate_video
main_generate_ai_video(video_generator)
File "/root/dist/MoneyPrinterPlus/main.py", line 308, in main_generate_ai_video
video_file = video_service.generate_video_with_audio()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/dist/MoneyPrinterPlus/services/video/video_service.py", line 535, in generate_video_with_audio
add_background_music(merge_video, self.background_music, self.background_music_volume)
File "/root/dist/MoneyPrinterPlus/services/video/video_service.py", line 215, in add_background_music
subprocess.run(command, capture_output=True, text=True)
File "/usr/local/lib/python3.12/subprocess.py", line 550, in run
stdout, stderr = process.communicate(input, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/subprocess.py", line 1209, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/subprocess.py", line 2157, in _communicate
stderr = self._translate_newlines(stderr,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/subprocess.py", line 1086, in _translate_newlines
data = data.decode(encoding, errors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 1386: invalid continuation byte
[libx264 @ 0x7f7e41106500] ref B L1: 98.3% 1.7% [libx264 @ 0x7f7e41106500] kb/s:3272.18 ffmpeg -i /Users/loubin/Desktop/MoneyPrinterPlus/final/final-1725553564523.mp4 -i /Users/loubin/Desktop/MoneyPrinterPlus/work/1725553161797.wav -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 -shortest -y /Users/loubin/Desktop/MoneyPrinterPlus/final/final-1725553564523.temp.mp4 ['ffmpeg', '-i', '/Users/loubin/Desktop/MoneyPrinterPlus/final/final-1725553564523.mp4', '-i', '/Users/loubin/Desktop/MoneyPrinterPlus/bgmusic/2.mp3', '-filter_complex', '[1:a]aloop=loop=0:size=100M[bgm];[bgm]volume=0.3[bgm_vol];[0:a][bgm_vol]amix=duration=first:dropout_transition=3:inputs=2[a]', '-map', '0:v', '-map', '[a]', '-c:v', 'copy', '-shortest', '/Users/loubin/Desktop/MoneyPrinterPlus/final/final-1725553564523.temp.mp4'] 2024-09-06 00:26:59.196 Uncaught app exception Traceback (most recent call last): File "/usr/local/anaconda3/envs/plus/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 575, in _run_script self._session_state.on_script_will_rerun( File "/usr/local/anaconda3/envs/plus/lib/python3.11/site-packages/streamlit/runtime/state/safe_session_state.py", line 65, in on_script_will_rerun self._state.on_script_will_rerun(latest_widget_states) File "/usr/local/anaconda3/envs/plus/lib/python3.11/site-packages/streamlit/runtime/state/session_state.py", line 517, in on_script_will_rerun self._call_callbacks() File "/usr/local/anaconda3/envs/plus/lib/python3.11/site-packages/streamlit/runtime/state/session_state.py", line 530, in _call_callbacks self._new_widget_state.call_callback(wid) File "/usr/local/anaconda3/envs/plus/lib/python3.11/site-packages/streamlit/runtime/state/session_state.py", line 274, in call_callback callback(*args, **kwargs) File "/Users/loubin/Desktop/MoneyPrinterPlus/pages/01_auto_video.py", line 75, in generate_video main_generate_ai_video(video_generator) File "/Users/loubin/Desktop/MoneyPrinterPlus/main.py", line 302, in main_generate_ai_video video_file = video_service.generate_video_with_audio() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/loubin/Desktop/MoneyPrinterPlus/services/video/video_service.py", line 512, in generate_video_with_audio add_background_music(merge_video, self.background_music, self.background_music_volume) File "/Users/loubin/Desktop/MoneyPrinterPlus/services/video/video_service.py", line 192, in add_background_music subprocess.run(command, capture_output=True, text=True) File "/usr/local/anaconda3/envs/plus/lib/python3.11/subprocess.py", line 548, in run stdout, stderr = process.communicate(input, timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/anaconda3/envs/plus/lib/python3.11/subprocess.py", line 1205, in communicate stdout, stderr = self._communicate(input, endtime, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/anaconda3/envs/plus/lib/python3.11/subprocess.py", line 2099, in _communicate stderr = self._translate_newlines(stderr, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/anaconda3/envs/plus/lib/python3.11/subprocess.py", line 1082, in _translate_newlines data = data.decode(encoding, errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 2391: invalid continuation byte Moonshot