ffmpeg-python
ffmpeg-python copied to clipboard
Server returned 404 Not Found
I am using process.run_ Asynchronous records video streams. If the streaming server does not continue streaming due to network or other reasons during the recording process, the status code returned by the process is 0 instead of 404. When I restart the recording client, I can obtain 404 error information, but the 404 error information during the recording process cannot be captured. Is there any way for me to capture Server returned 404 Not Found and restart the recording client?
process = (
ffmpeg.input(input_stream, **{"t": str(duration), "rw_timeout": "5000000"})
.output(output_file, **{"c": "copy"})
.overwrite_output()
)
process = process.run_async(pipe_stdin=True, pipe_stderr=True)
Error Message
ffmpeg version 6.0-tessus https://evermeet.cx/ffmpeg/ Copyright (c) 2000-2023 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.17)
configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
[http @ 0x7f7bb9704d00] HTTP error 404 Not Found
http://172.16.18.10:8080/live/33/1ZNBK7G00C00ET.flv: Server returned 404 Not Found