ffmpeg-python icon indicating copy to clipboard operation
ffmpeg-python copied to clipboard

ffmpeg command rtsp

Open omides248 opened this issue 2 years ago • 1 comments

Hello

ffmpeg -re -i 'rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1' -an -f rtp rtp://127.0.0.1:7777 -vn -f rtp rtp://127.0.0.1:7777

Can this command be created with this library? If possible, what about the Python command with this library?

Code:

import ffmpeg
process = (
    ffmpeg
    .input('rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1')
    .output("-an -f rtp rtp://127.0.0.1:7777 -vn -f rtp rtp://127.0.0.1:7777")
    .global_args('-report')
    .run_async(pipe_stdout=True)
)

Output:

root@omides248:/usr/src/callrecorder/test_file# ffmpeg version 3.4.11-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
**Unrecognized option 'an -f rtp rtp://127.0.01:7777'.
Error splitting the argument list: Option not found**

thanks

omides248 avatar Jun 20 '22 10:06 omides248

input = ffmpeg.input('rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1') out1 = input.output(an=None, f='rtp', filename='rtp://127.0.0.1:7777') out2 = input.output(vn=None, f='rtp', filename='rtp://127.0.0.1:7777') ffmpeg.merge_outputs(out1, out2).run()

you can try this code

nikiz24 avatar Jun 23 '22 08:06 nikiz24