Giter Club home page Giter Club logo

Comments (3)

cesarandreslopez avatar cesarandreslopez commented on August 11, 2024

Nevermind! This is actually a problem with OvenMediaEngine (https://github.com/AirenSoft/OvenMediaEngine), which was the receiving rtmp sever. The example above is solved when a different RTMP server is used.

from opencv_ffmpeg_streaming.

beyond21299 avatar beyond21299 commented on August 11, 2024

I didn't get an error from cmake,also no error from make.
The examples given in the project also work.But I don't konw hwot to use this by python. Can you teach me how to use this by python?

from opencv_ffmpeg_streaming.

beyond21299 avatar beyond21299 commented on August 11, 2024

This is a very helpful implementation, thank you very much. I've gotten it to work well from Opencv to RTMP via Python using one stream.

My issue is when I try to open a second something like this:

    sc_clean = StreamerConfig()
    sc_clean.source_width = frame.shape[1]
    sc_clean.source_height = frame.shape[0]
    sc_clean.stream_width = frame.shape[1]
    sc_clean.stream_height = frame.shape[0]
    sc_clean.stream_fps = 25
    sc_clean.stream_bitrate = 3500000
    sc_clean.stream_profile = 'main' #'high444' # 'main'
    sc_clean.stream_server = 'rtmp://localhost:1935/app/clean'
    streamer_clean = Streamer()
    streamer_clean.init(sc_clean)
    streamer_clean.enable_av_debug_log()

    sc_cooked = StreamerConfig()
    sc_cooked.source_width = frame.shape[1]
    sc_cooked.source_height = frame.shape[0]
    sc_cooked.stream_width = frame.shape[1]
    sc_cooked.stream_height = frame.shape[0]
    sc_cooked.stream_fps = 25
    sc_cooked.stream_bitrate = 3500000
    sc_cooked.stream_profile = 'main' #'high444' # 'main'
    sc_cooked.stream_server = 'rtmp://localhost:1935/app/cooked'
    streamer_cooked = Streamer()
    streamer_cooked.init(sc_cooked)
    streamer_cooked.enable_av_debug_log()
   

   while (True):
        clean_frame = frame.copy()
        frame = some_process(frame) #some processing is done on the frame in opencv
        now = time.time()
        duration = now - prev
        streamer_clean.stream_frame_with_duration(frame, int(duration*1000))
        streamer_cooked.stream_frame_with_duration(clean_frame, int(duration*1000))
        prev = now

Running the above will still run, but the first RTMP stream itself will seem garbled like if it were combining and streaming a mix of both streamer data into one and the second RTMP stream won't work at all.

Is there anyway that I can open up more than one Streaming object in python?

I didn't get an error from cmake,also no error from make.
The examples given in the project also work.But I don't konw hwot to use this by python. Can you teach me how to use this by python?

from opencv_ffmpeg_streaming.

Related Issues (15)

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.