-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
JSMpeg not playing audio when websocket stream is used #411
Comments
I have the same problem. They all used the command: So I think maybe this problem isn't caused by JSMPeg. And I want to know if you solved this problem. If can, please tell me. Thank you. |
I found the situation which caused this problem. Here are my ffmpeg options:
I test the sampling rate: 16000、22050、32000、44100、48000。 My raw stream sampling rate is 16khz、and when I set the option I hope this can help you. |
That's interesting. JSMpeg just uses the WebAudio createBuffer() function for audio, which should work with allmost all sample rates:
My assumption is that this issue is caused by a locked audio context. The test if WebAudio needs to be unlocked (testing only if we're running on iOS devices) is no longer true. All browsers start out with a locked context now. Proper unlocking is only handled by the VideoElement. So, I'm not sure why the change in sample rate would fix that for you. |
I am streaming RTSP stream to web browser using ffmpeg with help of a websocket relay in node js as per the example given here https://github.com/phoboslab/jsmpeg
FFMPEG command used:
ffmpeg -rtsp_transport tcp -i rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 -f mpegts -c:a mp2 -c:v mpeg1video http://127.0.0.1:5100/stream_from_ffmpeg
The video is playing good, but no audio, if i open the same RTSP URL above in vlc, the video plays along with the audio
The text was updated successfully, but these errors were encountered: