Giter VIP home page Giter VIP logo

Comments (12)

RogerHardiman avatar RogerHardiman commented on May 25, 2024

There are no examples for reading video or audio from a file - just an example of receiving video and audio and saving it to a file.
If you wanted to add something as an example it would not be too hard and we could merge you code into the project

from sharprtsp.

Dokman avatar Dokman commented on May 25, 2024

okay i'll make a try or something.

from sharprtsp.

RogerHardiman avatar RogerHardiman commented on May 25, 2024

What format are you planning to use for the video file?
MP4 or .264 or something else?

from sharprtsp.

Dokman avatar Dokman commented on May 25, 2024

mp4 and matroska, but i need a way to read it, so i'll find an algorithm, cause i only need to stream it and the player will do the rest

from sharprtsp.

RogerHardiman avatar RogerHardiman commented on May 25, 2024

So there are several parts to this.

  1. You need to open the container file (mp4 or mkv) and extract the compressed video data for each frame of video. It will already be compressed (probably H264 in a format called NALs)

  2. Then you can look at the RTSP Camera Example. That example generates some video and feeds it into a very simple H264 compressor to get h264 data (called NALs). The example then sends the NALs.
    So you will need to read the NALs from the MP4 or MVK file and then you can use the part of the RTSP Camera Example that sends NALs to transmit the video.

(note live555 has code to read files and stream via RTSP if that is any use. I work on SharpRTSP as I have some projects where I need it all in c# either to simplify debugging or due to licences and app store limitations)

from sharprtsp.

Dokman avatar Dokman commented on May 25, 2024

i have the same problem as you XD so for this reason i have to use c#

from sharprtsp.

Dokman avatar Dokman commented on May 25, 2024

and i have problems with net7mma cause there is no integration about files and i am having a lot of troubles if i open my own apache to stream it

from sharprtsp.

RogerHardiman avatar RogerHardiman commented on May 25, 2024

There is some file handling code here https://github.com/juliusfriedman/net7mma/tree/master/Containers

MP4 is known as BaseMedia

from sharprtsp.

RogerHardiman avatar RogerHardiman commented on May 25, 2024

Found another library in c# - 3 clause BSD licence so that is easy to work with

https://github.com/jeremypoulter/basemedia

from sharprtsp.

Dokman avatar Dokman commented on May 25, 2024

@RogerHardiman when i use rtspSource("livestreamname",new Uri("http://localhost/test.mp4")) doesn't work, so i am f***ed up.

from sharprtsp.

RogerHardiman avatar RogerHardiman commented on May 25, 2024

Sorry, don't know what you mean by 'rtspSource'
Which library is that function in?

from sharprtsp.

RogerHardiman avatar RogerHardiman commented on May 25, 2024

There are no examples to read from a file and send via RTSP and I don't have time to write one.
So I'll close this Issue.

from sharprtsp.

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.