Giter VIP home page Giter VIP logo

Comments (14)

iizukanao avatar iizukanao commented on August 27, 2024

That error is not harmful as long as you are not seeing any side effects. Please ignore them for now.

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

Well there is actually a side effect. The server doesn't serve anything and just says disconnect in the console.

from node-rtsp-rtmp-server.

iizukanao avatar iizukanao commented on August 27, 2024

What client are you using? I'm not experiencing such error on Debian 8.5 with curl.

$ coffee server.coffee
2016-06-23 16:54:17.524 attachRecordedDir: dir=file app=file
2016-06-23 16:54:17.555 [rtmp] server started on port 1935
2016-06-23 16:54:17.556 [rtsp/http/rtmpt] server started on port 8081
2016-06-23 16:54:20.235 [rtsp/http/rtmpt:client=c1] connected
2016-06-23 16:54:20.256 [rtsp/http/rtmpt:client=c1] disconnected
[rtsp/http: 0 clients]
$ curl -i http://localhost:8081/
HTTP/1.1 200 OK
Date: Thu, 23 Jun 2016 07:54:20 UTC
Server: node-rtsp-rtmp-server
Connection: close
Content-Length: 129
Content-Type: text/html; charset=utf-8

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Hello World</title>
</head>
<body>
Hello, World!
</body>
</html>

In the above example, port 8081 is used instead of 80.

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

VLC

Regards,
Mrinal Purohit

On Thu, Jun 23, 2016 at 1:28 PM, Nao Iizuka [email protected]
wrote:

What client are you using? I'm not experiencing such error on Debian 8.5
with curl.

$ coffee server.coffee
2016-06-23 16:54:17.524 attachRecordedDir: dir=file app=file
2016-06-23 16:54:17.555 [rtmp] server started on port 1935
2016-06-23 16:54:17.556 [rtsp/http/rtmpt] server started on port 8081
2016-06-23 16:54:20.235 [rtsp/http/rtmpt:client=c1] connected
2016-06-23 16:54:20.256 [rtsp/http/rtmpt:client=c1] disconnected
[rtsp/http: 0 clients]

$ curl -i http://localhost:8081/
HTTP/1.1 http://localhost:8081/HTTP/1.1 200 OK
Date: Thu, 23 Jun 2016 07:54:20 UTC
Server: node-rtsp-rtmp-server
Connection: close
Content-Length: 129
Content-Type: text/html; charset=utf-8

<title>Hello World</title> Hello, World!

In the above example, port 8081 is used instead of 80.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#51 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABjqMX9Co69qTAXzwuxRpH2P85olguTAks5qOjyxgaJpZM4I2lEY
.

from node-rtsp-rtmp-server.

iizukanao avatar iizukanao commented on August 27, 2024

What URL do you use in VLC?

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

I tried this in browser: http://104.236.24.31:8080/video.mp4
and in VLC, i tried rtsp://104.236.24.31:8080/video.mp4. I have a test machine running on a vps, can provide you access if you want to test.

from node-rtsp-rtmp-server.

iizukanao avatar iizukanao commented on August 27, 2024

OK, thanks.

Files in public/ directory will be served via http:// URL. For example, when you put public/video.mp4, it's accessible via http://HOST:8080/video.mp4

On the other hand, files in file/ directory will be served via rtsp:// and rtmp:// URLs. For example, when you put file/video.mp4, it's accessible via rtsp://HOST:8080/file/video.mp4 and rtmp://HOST/file/mp4:video.mp4

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

Let me give it a try. Thanks.
Quick question, in http method, is it that, the full file gets downloaded first and then gets played?

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

I moved the file in the file/ directory and tried rtsp://104.236.24.31:8080/file/video.mp4 and i get the following error in console:

`/root/node-rtsp-rtmp-server/server.js:47
throw err;
^

ReferenceError: box is not defined
at Function.Box.readHeader (/root/node-rtsp-rtmp-server/mp4.js:915:9)
at Function.Box.parse (/root/node-rtsp-rtmp-server/mp4.js:936:12)
at MP4File.parse (/root/node-rtsp-rtmp-server/mp4.js:107:19)
at Function.MP4Stream.create (/root/node-rtsp-rtmp-server/avstreams.js:308:15)
at Object.api.get (/root/node-rtsp-rtmp-server/avstreams.js:488:32)
at /root/node-rtsp-rtmp-server/rtsp.js:1502:32
at RTSPServer.livePathConsumer (/root/node-rtsp-rtmp-server/server.js:26:14)
at RTSPServer.consumePathname (/root/node-rtsp-rtmp-server/rtsp.js:1299:21)
at RTSPServer.respondDescribe (/root/node-rtsp-rtmp-server/rtsp.js:1490:19)
at RTSPServer.respond (/root/node-rtsp-rtmp-server/rtsp.js:2047:21)
`

from node-rtsp-rtmp-server.

iizukanao avatar iizukanao commented on August 27, 2024

Sorry, I've just fixed that bug. Please pull the latest code and try again.

As for mp4 streaming in HTTP, it depends on client player and the format of mp4 file. To prepare an mp4 file for streaming, see the first item in this answer.

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

Thanks checking...

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

Yes, moving the faststart to start does make the video stream instantaneously.
I have a question. When I am using this server for http streaming, is it same as sending the mp4 files directly to mobile clients over http or this does some magic before sending to html5 so that they gets played smoothly?

from node-rtsp-rtmp-server.

iizukanao avatar iizukanao commented on August 27, 2024

For HTTP, this server just sends mp4 content as-is in the same manner as Apache or nginx. Range header is also supported to allow seeking.

from node-rtsp-rtmp-server.

bmrinal avatar bmrinal commented on August 27, 2024

that helps! Thanks.

from node-rtsp-rtmp-server.

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.