ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.37k stars 5.34k forks source link

Docker: ./objs/ffmpeg/bin/ffmpeg: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory #3171

Closed zzj917 closed 2 years ago

zzj917 commented 2 years ago

Description

Description Deploy with Docker, use Ingest to pull RTSP, error occurs: ./objs/ffmpeg/bin/ffmpeg: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory.

  1. SRS Version: srs4

1. SRS Log: Please provide the SRS log for further analysis.

process ppid=1, cid=tya5148s, pid=672, in=0, out=1, err=2
process binary=./objs/ffmpeg/bin/ffmpeg, cli: ./objs/ffmpeg/bin/ffmpeg -loglevel info -rtsp_transport tcp -i rtsp://admin:abc12345@192.168.5.106:554/h264/ch1/main/av_stream -vcodec copy -acodec copy -f flv -y rtmp://192.168.4.129:1935/live/livestream 1 > ./objs/ffmpeg-ingest-__defaultVhost__-live-livestream.log 2 > ./objs/ffmpeg-ingest-__defaultVhost__-live-livestream.log
process actual cli: ./objs/ffmpeg/bin/ffmpeg -loglevel info -rtsp_transport tcp -i rtsp://admin:abc12345@192.168.5.106:554/h264/ch1/main/av_stream -vcodec copy -acodec copy -f flv -y rtmp://192.168.4.129:1935/live/livestream
./objs/ffmpeg/bin/ffmpeg: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

1. SRS Config: Please ensure that the markdown structure is maintained.

 ingest livestream {
        # whether enabled ingest features
        # default: off
        enabled      on;
        # input file/stream/device
        # @remark only support one input.
        input {
            # the type of input.
            # can be file/stream/device, that is,
            #   file: ingest file specifies by url.
            #   stream: ingest stream specifeis by url.
            #   device: not support yet.
            # default: file
            type    stream;
            # the url of file/stream.
            url     rtsp://admin:abc12345@192.168.5.106:554/h264/ch1/main/av_stream ;
        }
        # the ffmpeg
        ffmpeg      ./objs/ffmpeg/bin/ffmpeg;
        # the transcode engine, @see all.transcode.srs.com
        # @remark, the output is specified following.

        engine {
         enabled    on;
         perfile {
            rtsp_transport tcp;
        }

        vcodec copy;

        acodec copy;
            # output stream. variables:
            # [vhost] current vhost which start the ingest.
            # [port] system RTMP stream port.
            output          rtmp://127.0.0.1:[port]/live/livestream;
        }
    }

TRANS_BY_GPT3

benjamin658 commented 2 years ago

Same issue here, fallback to v4.0.198 and it works again.

winlinvip commented 2 years ago

Fixed by v4.0.265 and v5.0.63

It's caused by base image, after switching from CentOS7 to Ubuntu20.