ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.75k stars 5.39k forks source link

How to change the stream order of streaming media audio and video? #2197

Closed aningxu closed 3 years ago

aningxu commented 3 years ago

Description Push media streams to the SRS server, where Stream0 is for audio and Stream1 is for video. I encountered a rare issue where some older versions of players do not support this order and only support the default stream0 for video and stream1 for audio in the media stream.

122

Question: How can I change the order of the streams to make stream0 for video?

TRANS_BY_GPT3

aningxu commented 3 years ago

Currently, I have tested multiple streaming media servers, and usually the default stream0 is for video. I hope to solve this problem.

TRANS_BY_GPT3

winlinvip commented 3 years ago

In individual cases, you can only fix it yourself.

TRANS_BY_GPT3

aningxu commented 3 years ago

Currently, I have tested many streaming media servers, and only SRS places the audio before the video. Big brother, please make a change.

TRANS_BY_GPT3

winlinvip commented 3 years ago

Currently, the order of the flow does not have a direct relationship with playback failure. You can try changing the order first, and if the player can play, then you can consider it.

I don't intend to solve an uncertain problem.

TRANS_BY_GPT3

geiliwanghaichao commented 3 years ago

Hello @aningxu, have you solved your problem? I have encountered a similar issue. When I connect to a Hikvision or Dahua camera, I cannot enable audio on the camera's web interface. image ](url) When using ffplay, stream 0 also has audio. I don't want this to happen when audio is not enabled. I don't know how to solve it.

TRANS_BY_GPT3

geiliwanghaichao commented 3 years ago

@winlinvip, may I ask how to change the order of the stream? Or in other words, if I don't have audio now, I don't want the audio information posted on the image shared by @aningxu above.

TRANS_BY_GPT3