GithubHelp home page GithubHelp logo

Comments (4)

suzp1984 avatar suzp1984 commented on July 25, 2024

Could you gives the video source to test? and the steps to reproduce this issue?

from srs.

antonymarion avatar antonymarion commented on July 25, 2024

sure

forest.mp4

then

fmpeg -d -stream_loop -1 -re -i ./forest.mp4 -c copy -f flv -y rtmp:/{your_ip}/live/test </dev/null

from srs.

suzp1984 avatar suzp1984 commented on July 25, 2024

ffprobe -show_frames forest.mp4 | grep -i 'pict_type'

There are B frames in this video, while webrtc don't support B frame, which will be drop by default at SRS.
That's the reason of bad quality.

How to workaround

ffmpeg -d -stream_loop -1 -re -i ./forest.mp4 -vcodec h264 -profile:v baseline -f flv -y rtmp:/{your_ip}/live/test </dev/null
or
ffmpeg -d -stream_loop -1 -re -i ./forest.mp4 -vcodec h264 -profile:v high -bf 0 -f flv -y rtmp:/{your_ip}/live/test </dev/null

Both of above publish cmd will resolve your problem.

About the GPU Acceleration question

No, SRS will not do any decode or encode, but just demux the video format, get the nalu elements inside the video frames, for the RTMP which is flv tags, then remux the nalu to the RTP packet. In short, the most common job of a live stream server is just do video format demux -> remux, or just re-streaming.

For the OvenMediaEngine, I didn't read it's source code yet, but he process video stream in this way: demux -> decode -> encode -> remux. Which means he did video decode->encode which is cpu | gpu intense job, and this kinds of server will be quite different than general live media server.

from srs.

antonymarion avatar antonymarion commented on July 25, 2024

Well thks for the clarification.

That was not really intensive on a RTX Titan GPU though (around 1% usage if I remember well..)

I will go back to SRS if I see that OvenMediaEngine is consuming too much resources (not the case right now 😉)

from srs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.