Closed iamareebjamal closed 4 years ago
Hello, We need more information to identify and reproduce the problem. I have followed exact same steps that you described and published an RMTP stream using OBS and the HLS stream played successfully in the browser. Which software did you use to publish the stream with RMTP? It can be also related to type or encodecing of the stream which you published. Did you publish directly a video file using ffmpeg or created stream from your camera or screen share using OBS, Wirecast etc?
Best Regards, Can
I used OBS and tested using a media file and I have been using similar steps in a commercial product (mux.com, dacast.com) and it works fine for both. I tried doing it various times. Let me clarify that I was connecting through 1935 for RTMP and 5080 for HLS, I think that's as expected. Tell me if you need more info
Can you follow exactly the same steps in the following guide? https://github.com/ant-media/Ant-Media-Server/wiki/Open-Broadcaster-Software-Publishing and write me the result. For RMTP you dont have to to give a port. The URL for publishing will be like this: rtmp://your_server_domain_name/LiveApp To play m3u8 for my stream, I use following Link http://192.168.1.23:5080/LiveApp/streams/857190862347253083045206.m3u8 And if the problem persists, can you send me the link to the media file you are using for testing?
For RMTP you dont have to to give a port
For "RTMP", I am confused as to how you don't have to give it a port but I did retry and it seems it defaults to port 1935 so giving it a port if it is already 1935 is a no-op. However, it still didn't work. I doubt that the media file is the problem because it's the API which sends 404 but I'll provide it anyway
https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4
Yeah the file is fine. It can play the file for me. I use following link to publish rtmp://192.168.1.23/LiveApp from OBS where 192.168.1.23 is ip address of my Ant Media Server Please double check that you are using always using consistently LiveApp but not WebRTCApp in the URLs
Yes, confirmed it. I'm using LiveApp and the dashboard is also showing me that it is being broadcasted, so it is definitely receiving the steam
What happens when you press the Play Stream button in the following screen? Can you send me a screenshot after waiting a little bit? To be safe can you start the server again using admistrator role. Maybe it cannot write m3u8 realted files to the disk because it does not have necessary permissions.
I checked your logs again, following log suggests that the problem can be related to Play URL. 2020-03-23 22:45:17,197 [http-nio2-0.0.0.0-5080-exec-5] WARN io.antmedia.rest.RestServiceBase - endpoint does not exist in this app. I don't get this warning. Please try everything from start with a different simple stream id and double check the URLs.
Best, Can
It is installed as a service using the installation script provided in the wiki, so it is running as sudo
This is the screenshot.
RestServiceBase - endpoint does not exist in this app. I don't get this warning.
Yes, that's why I wrote in the issue that it is throwing 404 not found.
start with a different simple stream id
Stream ID is autogenerated, right?
and double check the URLs.
I am copying everything from the dashboard, and it is showing broadcasting, OBS is showing LIVE, so how can the URLs be wrong. I am also clicking on the play button in the dashboard itself, so I don't know how can its URL be wrong. I mean both the stream ID and playback URL have the same identifier.
I can give you access to the dashboard. Can you tell me your email?
2020-03-25 21:43:35,819 [RTMPConnectionExecutor-2] INFO o.r.s.stream.ClientBroadcastStream - Stream start: 405962443156146838883691
2020-03-25 21:43:35,820 [RTMPConnectionExecutor-2] INFO i.a.AntMediaApplicationAdapter - stream name in streamPublishStart: 405962443156146838883691
2020-03-25 21:43:35,831 [RTMPConnectionExecutor-2] INFO i.a.AntMediaApplicationAdapter - start publish leaved
2020-03-25 21:43:35,831 [RTMPConnectionExecutor-2] INFO i.a.e.streamapp.StreamApplication - W3C x-category:stream x-event:publish c-ip:103.249.76.18 x-sname:de1d1bfb-3c5e-4764-9d38-dea501107609 x-name:405962443156146838883691
2020-03-25 21:43:35,835 [RTMPConnectionExecutor-2] ERROR io.antmedia.muxer.MuxAdaptor - io.antmedia.enterprise.adaptive.EncoderAdaptor
2020-03-25 21:43:35,847 [vert.x-worker-thread-2] INFO i.a.AntMediaApplicationAdapter - Status of stream 405962443156146838883691 is set to Broadcasting with result: true
2020-03-25 21:43:35,847 [RTMPConnectionExecutor-2] INFO io.antmedia.muxer.MuxAdaptor - adding HLS Muxer for 405962443156146838883691
2020-03-25 21:43:35,848 [RTMPConnectionExecutor-2] INFO io.antmedia.muxer.HLSMuxer - hls time: 2, hls list size: 5
2020-03-25 21:43:35,848 [RTMPConnectionExecutor-2] INFO io.antmedia.muxer.MuxAdaptor - Number of items in the queue while adaptor is being started to prepare is 0
2020-03-25 21:43:35,849 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - before prepare for 405962443156146838883691
2020-03-25 21:43:35,850 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - before avformat_open_input for stream 405962443156146838883691
2020-03-25 21:43:35,856 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - Checking streams for stream: 405962443156146838883691
2020-03-25 21:43:36,638 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - Video and Audio is detected in the incoming stream for stream: 405962443156146838883691
2020-03-25 21:43:36,638 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - Streams for 405962443156146838883691 enableVideo:true enableAudio:true total spend time: 781 elapsed frame timestamp: 1 stop request exists: false
2020-03-25 21:43:36,638 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - before avformat_find_stream_info for stream: 405962443156146838883691
2020-03-25 21:43:37,921 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - avformat_find_stream_info takes 1283ms for stream:405962443156146838883691
2020-03-25 21:43:38,021 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - after prepare for 405962443156146838883691
2020-03-25 21:43:38,022 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - Number of items in the queue while adaptor is scheduled to process incoming packets is 8
2020-03-25 21:43:38,022 [Red5_Scheduler_Worker-9] INFO io.antmedia.muxer.MuxAdaptor - Packet Feeder Job Name ScheduledJob_18
2020-03-25 21:43:38,023 [Red5_Scheduler_Worker-10] INFO io.antmedia.muxer.MuxAdaptor - first packet time 67
Server is showing normal processing for the stream ID 405962443156146838883691
And for the exact same stream ID /LiveApp/streams/405962443156146838883691.m3u8
, it is throwing 404
No, stream id is not auto generated. You can choose any arbitrary string as stream id and you dont need to create it in the beginning from the management console. It will accept it automatically.
My email address is can@antmedia.io. Yeah access to the dashboard would be nice to solve identify the problem.
I'm not sure if we are talking about the same thing. I only see the option of Stream Name when creating a new Live Stream and the Stream ID is autogenerated, which is seen even here - https://github.com/ant-media/Ant-Media-Server/wiki/Open-Broadcaster-Software-Publishing#3-configure-obs
Stream Key == Stream ID
Anyway, I have sent you the email with dashboard and credentials
You dont need to create a new stream in the dashboard. You can just choose arbitrary stream id in OBS and start streaming. Ant Media Server will automatically create a stream for this id and you will see it on the dashboard. Ok, I received the email, I will check.
Hi,
As I written per email, I can play your video file that I published to your server with OBS inside your dashboard and in my browser with HLS player extension. I also used the stream id which you used to publish your stream and it did also play successfully. I could not find any problems in your server installation. I stopped publishing to your server now.
Please follow the Wiki Guide I sent you before step by step, also tune for low latency, change bitrate etc. The URL, I used to play my stream from your server, I also sent you per email.
Best, Can
Hi, some hit and trial and I got it working. Really thankful for your support. However, I think I got a bug due to which all this happened. Instead of closing this, I'll update the issue so that you can look at it. Give me a few minutes to verify it thoroughly
Hi @iamareebjamal , I have the same issue. kindly update how did you fix this issue
@canat Same problem here, only difference is that my stream is rtsp and needs auth.
@unbranched @chandrikadevis
could you please let us know some reproduce scenario? It's likely there is a problem in the pipeline or configuration.
Describe the bug HLS stream does not start playing because the server throws 404 Not Found for it
To Reproduce Steps to reproduce the behavior:
Broadcasting 1.05x
Stream will start playing automatically when it is live
Expected behavior The stream should start playing and server should not throw 404
Additional context
Not sure if it'll help but here are the logs. They clearly mention receiving the stream for the stream ID:
Version: Community Edition 1.9.1 20200112_1622