llvm-gcc-4.2: error

本文详细探讨了使用LLVM和GCC 4.2时遇到的常见错误,并提供了有效的解决方案。通过深入分析编译过程中的细节,作者分享了避免和修复错误的技巧,帮助开发者提高代码质量,提升开发效率。
http://stackoverflow.com/questions/6293298/llvm-gcc-4-2-error
[Running] set PYTHONIOENCODING=utf8 && python -u "c:\Users\Administrator\Desktop\project\server.py" * Serving Flask app 'server' * Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:5000 * Running on http://192.170.22.25:5000 Press CTRL+C to quit ffmpeg version 7.0.2-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers built with gcc 13.2.0 (Rev5, 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-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --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-libcodec2 --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 59. 8.100 / 59. 8.100 libavcodec 61. 3.100 / 61. 3.100 libavformat 61. 1.100 / 61. 1.100 libavdevice 61. 1.100 / 61. 1.100 libavfilter 10. 1.100 / 10. 1.100 libswscale 8. 1.100 / 8. 1.100 libswresample 5. 1.100 / 5. 1.100 libpostproc 58. 1.100 / 58. 1.100 [rtsp @ 0000021df1381b00] method SETUP failed: 461 Unsupported transport [in#0 @ 0000021df1381700] Error opening input: Error number -135 occurred Error opening input file rtsp://localhost:8554/t1. Error opening input files: Error number -135 occurred [Done] exited with code=1 in 53.396 seconds [Running] set PYTHONIOENCODING=utf8 && python -u "c:\Users\Administrator\Desktop\project\server.py" * Serving Flask app 'server' * Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:5000 * Running on http://192.170.22.25:5000 Press CTRL+C to quit ffmpeg version 7.0.2-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers built with gcc 13.2.0 (Rev5, 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-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --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-libcodec2 --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 59. 8.100 / 59. 8.100 libavcodec 61. 3.100 / 61. 3.100 libavformat 61. 1.100 / 61. 1.100 libavdevice 61. 1.100 / 61. 1.100 libavfilter 10. 1.100 / 10. 1.100 libswscale 8. 1.100 / 8. 1.100 libswresample 5. 1.100 / 5. 1.100 libpostproc 58. 1.100 / 58. 1.100 Input #0, rtsp, from 'rtsp://localhost:8554/t1': Metadata: title : Unnamed comment : N/A Duration: N/A, start: 80.138073, bitrate: N/A Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp Stream #0:1: Video: hevc (Main), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn Stream mapping: Stream #0:1 -> #0:0 (hevc (native) -> h264 (libx264)) Stream #0:0 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [hevc @ 0000027eacac6a80] Could not find ref with POC 52 [hevc @ 0000027eacac6a80] Could not find ref with POC 50 [hevc @ 0000027eacac6a80] Could not find ref with POC 48 [hevc @ 0000027eacac6a80] Could not find ref with POC 46 [hevc @ 0000027eacac6a80] Could not find ref with POC 45 [hevc @ 0000027eac459940] Could not find ref with POC 52 [hevc @ 0000027eac459940] Could not find ref with POC 50 [hevc @ 0000027eac459940] Could not find ref with POC 48 [hevc @ 0000027eac459940] Could not find ref with POC 46 [hevc @ 0000027eac8cb2c0] Could not find ref with POC 52 [hevc @ 0000027eac8cb2c0] Could not find ref with POC 50 [hevc @ 0000027eac8cb2c0] Could not find ref with POC 48 [hevc @ 0000027eac459fc0] Could not find ref with POC 52 [hevc @ 0000027eac459fc0] Could not find ref with POC 50 [hevc @ 0000027eac488c80] Could not find ref with POC 52 [hevc @ 0000027eacec6440] Could not find ref with POC 52 [hevc @ 0000027eac466800] Could not find ref with POC 52 [libx264 @ 0000027eac800a40] using SAR=1/1 [libx264 @ 0000027eac800a40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0000027eac800a40] profile High, level 4.0, 4:2:0, 8-bit [libx264 @ 0000027eac800a40] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC codec - Copyleft 2003-2024 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [out#0/mp4 @ 0000027eac40e200] Could not write header (incorrect codec parameters ?): Invalid argument [vf#0:0 @ 0000027eac480440] Error sending frames to consumers: Invalid argument [vf#0:0 @ 0000027eac480440] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 0000027eac480440] Terminating thread with return code -22 (Invalid argument) [out#0/mp4 @ 0000027eac40e200] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A dup=5 drop=0 speed=N/A [aac @ 0000027eac489440] Qavg: 368.809 Conversion failed! [Done] exited with code=1 in 15.938 seconds [Running] set PYTHONIOENCODING=utf8 && python -u "c:\Users\Administrator\Desktop\project\server.py" * Serving Flask app 'server' * Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on all addresses (0.0.0.0) * Running on http://127.0.0.1:5000 * Running on http://192.170.22.25:5000 Press CTRL+C to quit ffmpeg version 7.0.2-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers built with gcc 13.2.0 (Rev5, 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-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --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-libcodec2 --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 59. 8.100 / 59. 8.100 libavcodec 61. 3.100 / 61. 3.100 libavformat 61. 1.100 / 61. 1.100 libavdevice 61. 1.100 / 61. 1.100 libavfilter 10. 1.100 / 10. 1.100 libswscale 8. 1.100 / 8. 1.100 libswresample 5. 1.100 / 5. 1.100 libpostproc 58. 1.100 / 58. 1.100 Input #0, rtsp, from 'rtsp://localhost:8554/t1': Metadata: title : Unnamed comment : N/A Duration: N/A, start: 97.181519, bitrate: N/A Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp Stream #0:1: Video: hevc (Main), yuv420p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn Stream mapping: Stream #0:1 -> #0:0 (hevc (native) -> h264 (libx264)) Stream #0:0 -> #0:1 (aac (native) -> aac (native)) Press [q] to stop, [?] for help [hevc @ 000002c546bc2340] Could not find ref with POC -64 [hevc @ 000002c546bc2340] Could not find ref with POC -65 [hevc @ 000002c546bc2340] Could not find ref with POC -67 [hevc @ 000002c546bc2340] Could not find ref with POC -62 [hevc @ 000002c546bc2340] Could not find ref with POC -58 [hevc @ 000002c546bc2700] Could not find ref with POC -62 [hevc @ 000002c546bc2700] Could not find ref with POC -64 [hevc @ 000002c546bc2700] Could not find ref with POC -65 [hevc @ 000002c546bc2700] Could not find ref with POC -67 [hevc @ 000002c546bc2700] Could not find ref with POC -58 [hevc @ 000002c546bc2ec0] Could not find ref with POC -62 [hevc @ 000002c546bc2ec0] Could not find ref with POC -64 [hevc @ 000002c546bc2ec0] Could not find ref with POC -65 [hevc @ 000002c546bc2ec0] Could not find ref with POC -58 [hevc @ 000002c546bd0600] Could not find ref with POC -62 [hevc @ 000002c546bd0600] Could not find ref with POC -64 [hevc @ 000002c546bd0600] Could not find ref with POC -65 [hevc @ 000002c546bd0600] Could not find ref with POC -58 [hevc @ 000002c54704ed00] Could not find ref with POC -58 [hevc @ 000002c54704ed00] Could not find ref with POC -62 [hevc @ 000002c54704ed00] Could not find ref with POC -64 [hevc @ 000002c54704ed00] Could not find ref with POC -65 [hevc @ 000002c546b4b280] Could not find ref with POC -58 [hevc @ 000002c546b4b280] Could not find ref with POC -62 [hevc @ 000002c546b4b280] Could not find ref with POC -64 [hevc @ 000002c544d66b00] Could not find ref with POC -58 [hevc @ 000002c544d66b00] Could not find ref with POC -62 [hevc @ 000002c546bc2340] Could not find ref with POC -58 [hevc @ 000002c546bc2700] Could not find ref with POC -58 [hevc @ 000002c546bc2ec0] Could not find ref with POC -58 [hevc @ 000002c546bd0600] Could not find ref with POC -58 [libx264 @ 000002c546a60a80] using SAR=1/1 [libx264 @ 000002c546a60a80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 000002c546a60a80] profile High, level 4.0, 4:2:0, 8-bit [libx264 @ 000002c546a60a80] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC codec - Copyleft 2003-2024 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=9 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [out#0/mp4 @ 000002c544d0e740] Could not write header (incorrect codec parameters ?): Invalid argument [vf#0:0 @ 000002c546bbc100] Error sending frames to consumers: Invalid argument [vf#0:0 @ 000002c546bbc100] Task finished with error code: -22 (Invalid argument) [vf#0:0 @ 000002c546bbc100] Terminating thread with return code -22 (Invalid argument) [out#0/mp4 @ 000002c544d0e740] Nothing was written into output file, because at least one of its streams received no packets. frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A [aac @ 000002c547057900] Qavg: 653.518 Conversion failed!
最新发布
08-29
以下是针对Python调用FFmpeg将RTSP流(UDP传输)从HEVC转码为H264并封装为MP4格式时出现的不同错误的解决办法: #### 'method SETUP failed: 461 Unsupported transport' 此错误表明服务器不支持UDP传输。可以尝试以下修改: - **尝试其他传输协议**:若服务器不支持UDP,可将传输协议改回TCP。在FFmpeg命令中,将`-rtsp_transport udp`改为`-rtsp_transport tcp`。 ```python import subprocess def transcode_rtsp(): ffmpeg_cmd = [ 'ffmpeg', '-rtsp_transport', 'tcp', '-i', 'rtsp://localhost:8554/t1', '-c:v', 'libx264', '-f', 'mp4', '-movflags', 'frag_keyframe+empty_moov', 'pipe:1' ] return subprocess.Popen(ffmpeg_cmd, stdout=subprocess.PIPE) ``` - **检查服务器配置**:确认服务器是否允许UDP传输RTSP流,可能需要调整服务器的相关设置。 #### 'Could not find ref with POC ...' 该错误通常与HEVC解码过程中的参考帧缺失有关,可尝试以下方法: - **添加解码选项**:在FFmpeg命令中添加`-flags2 +export_mvs`和`-skip_loop_filter all`选项,帮助解码器更好地处理参考帧。 ```python import subprocess def transcode_rtsp(): ffmpeg_cmd = [ 'ffmpeg', '-rtsp_transport', 'udp', '-i', 'rtsp://localhost:8554/t1', '-c:v:0', 'libx264', '-flags2', '+export_mvs', '-skip_loop_filter', 'all', '-f', 'mp4', '-movflags', 'frag_keyframe+empty_moov', 'pipe:1' ] return subprocess.Popen(ffmpeg_cmd, stdout=subprocess.PIPE) ``` - **检查网络稳定性**:不稳定的网络可能导致参考帧丢失,需确保网络连接稳定。 #### 'Could not write header (incorrect codec parameters ?): Invalid argument' 此错误可能是由于编解码器参数不匹配或不正确导致的,可尝试以下操作: - **指定正确的编解码器参数**:确保输出的MP4文件使用正确的编解码器参数,如帧率、分辨率等。 ```python import subprocess def transcode_rtsp(): ffmpeg_cmd = [ 'ffmpeg', '-rtsp_transport', 'udp', '-i', 'rtsp://localhost:8554/t1', '-c:v', 'libx264', '-r', '25', # 指定帧率为25fps '-s', '1920x1080', # 指定分辨率为1920x1080 '-f', 'mp4', '-movflags', 'frag_keyframe+empty_moov', 'pipe:1' ] return subprocess.Popen(ffmpeg_cmd, stdout=subprocess.PIPE) ``` - **检查输入流的完整性**:确保输入的RTSP流正常,没有损坏或缺失关键信息。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值