ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.24k stars 619 forks source link

LiveApp not support audio/G711.alaw? #3532

Open 14780001553 opened 3 years ago

mekya commented 3 years ago

Yes G711 is not supported. It supports Opus for WebRTC streaming.

Why do you need G.711 support?

babutree commented 1 year ago

Sorry, In China most of IP Camera on desk doesn't support ONVIF protocol, I use Mercury MIPC 451-4. It's support ONVIF, but its audio encode only support G.711 protocol.

2023-03-03 06:40:04,972 [Thread-169] INFO i.a.streamsource.StreamFetcher - Setting rtsp transport type to tcp for stream source: rtsp://admin:123456789@192.168.1.198:554/stream1 2023-03-03 06:40:04,972 [Thread-169] ERROR i.a.streamsource.StreamFetcher - cannot open stream: rtsp://admin:123456789@192.168.1.198:554/stream1 with error:: Invalid argument 2023-03-03 06:40:04,972 [Thread-169] ERROR i.a.streamsource.StreamFetcher - Prepare for opening the rtsp://admin:123456789@192.168.1.198:554/stream1 has failed 2023-03-03 06:40:04,977 [Thread-169] INFO i.a.streamsource.StreamFetcher - write all buffered packets for stream: 1jKS1tJ2fc1t1677824726004 2023-03-03 06:40:04,977 [Thread-169] INFO i.a.streamsource.StreamFetcher - Stream fetcher will try to fetch source rtsp://admin:123456789@192.168.1.198:554/stream1 after 3000 ms 2023-03-03 06:40:07,982 [Thread-170] INFO i.a.streamsource.StreamFetcher - Preparing the StreamFetcher for rtsp://admin:123456789@192.168.1.198:554/stream1 for streamId:1jKS1tJ2fc1t1677824726004

image

mekya commented 1 year ago

Hi @babutree ,

The problem may not be the G711A-law support in WebRTC streaming. It seems that the server cannot open the RTSP URL in your IP camera.

I think the problem should be something else. Could you please write the ffmpeg output of your command?

ffmpeg -rtsp_transport tcp -i {YOUR_RTSP_URL}