Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please tell me about the flv stream method. #228

Open
pikesaury opened this issue Jan 18, 2025 · 0 comments
Open

Please tell me about the flv stream method. #228

pikesaury opened this issue Jan 18, 2025 · 0 comments

Comments

@pikesaury
Copy link

I was using flv.js but am trying to change to mpegts.js.
I am trying to receive OBS data over a local IP.
In flv.js.

/flv?port=1935&app=live&stream=ch1

I can stream flv with this.
but in mpegts.js it only shows still images.
I am using nginx rtmp to flv module,Is there anything I should fix?

<script src="static/mpegts.js"></script>
<video id="videoElement"></video>
<script>
if (mpegts.getFeatureList().mseLivePlayback) {
var videoElement = document.getElementById('videoElement');
var player = mpegts.createPlayer({
type: 'flv', // could also be mpegts, m2ts, flv
isLive: true,
url: '/flv?port=1935&app=live&stream=ch1'
});
player.attachMediaElement(videoElement);
player.load();
player.play();
}
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant