BabitMF / bmf

Cross-platform, customizable multimedia/video processing framework. With strong GPU acceleration, heterogeneous design, multi-language support, easy to use, multi-framework compatible and high performance, the framework is ideal for transcoding, AI inference, algorithm integration, live video streaming, and more.
https://babitmf.github.io/
Apache License 2.0
733 stars 60 forks source link

RuntimeError: BMF(0.0.7) /root/bmf/bmf/c_modules/src/ffmpeg_decoder.cpp:736: error: (-224:BMF Transcode Error) avformat_open_input failed: Protocol not found in function 'init_input' #52

Open codedoves opened 10 months ago

codedoves commented 10 months ago

When I use BMF to process RTSP video, the following problems will occur:

RuntimeError: BMF(0.0.7) /root/bmf/bmf/c_modules/src/ffmpeg_decoder.cpp:736: error: (-224:BMF Transcode Error) avformat_open_input failed: Protocol not found in function 'init_input'

Based on the example test_generator.py, replace the “'input_path': "../../files/big_bunny_10s_30fps.mp4"" in the code with the following content :

` frames = ( bmf.graph() .decode({'input_path': "https://*****:1101/rtp/0615746E.live.flv"})['video'] .fps(1)

.ff_filter('scale', 299, 299) # or you can use '.scale(299, 299)'

            .start()  # this will return a packet generator
        )

`

docker images : babitmf/bmf_runtime:latest

HuHeng commented 10 months ago

It is possible that FFmpeg in the image does not support the HTTPS protocol. It seems that SSL support was not included during the FFmpeg compilation process. You can use http stream for testing.

liujiachang commented 10 months ago

I think it's a problem with the installation of ffmpeg. OpenSSL was not enabled during the installation of ffmpeg. I added '-- enable openssl \' after each method in the scripts/build_ffmpeg.sh.

 # scripts/build_ffmpeg.sh  
 # line:145
 case $3 in
        x86_64)
            ./configure \
            -- enable openssl \
            ... 

After reinstalling ffpemg, I can read http stream.