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

May I ask how to configure HTTP access to simultaneously push FLV and AAC using only one SRS? #2806

Closed
lin557 opened this issue Dec 22, 2021 · 5 comments
Assignees
Labels
TransByAI Translated by AI/GPT. Won't fix We won't fix it.

Comments

@lin557
Copy link

lin557 commented Dec 22, 2021

Description'

Please ensure that the markdown structure is maintained.

How should I configure HTTP access if I want to use only one SRS to simultaneously push FLV and AAC?

Please describe the issue you are facing.

  1. SRS version: v3.0

  2. SRS configuration is as follows:

vhost your_vhost {
    http_remux {
        enabled     on;
        fast_cache  30;
        mount       [vhost]/[app]/[stream].aac;
    }
}
vhost your_vhost {
    http_remux {
        enabled     on;
        fast_cache  30;
        mount       [vhost]/[app]/[stream].flv;
    }
}

Expected behavior

To push different stream formats based on different [app] in SRS, you can configure it as follows:

For rtmp://xxx/live/test, you can access it through http://xxx:8080/live/test.flv.
For rtmp://xxx/audio/test, you can access it through http://xxx:8080/audio/test.aac.

To achieve this using only one SRS instance, you need to configure it accordingly.

I have read the documentation regarding forwarding to other vhosts, but I am not clear on how to configure it.

TRANS_BY_GPT3

@lin557 lin557 changed the title 请问我想只用一个srs同时推送flv 与 aac 应该如何配置 请问我想只用一个srs同时推送flv 与 aac 应该如何配置http访问 Dec 22, 2021
@chundonglinlin
Copy link
Member

chundonglinlin commented Dec 22, 2021

Based on your needs, are you looking to push audio and video streams to SRS and then specify parameters when pulling the stream? For example:
Pushing stream:
ffmpeg -re -i source.200kbps.768x320.flv -c copy -f flv rtmp://xxxxxx/live/livestream
Playback:
Audio only: 'http://xxxxxx/live/livestream.flv?only-audio=1'
Video only: 'http://xxxxxx/live/livestream.flv?only-video=1

TRANS_BY_GPT3

@lin557
Copy link
Author

lin557 commented Dec 22, 2021

Yes, indeed I want it this way. The jtt1078 protocol has a voice intercom, and I only want to use one srs to achieve real-time streaming of http-flv and aac.

Based on your needs, are you looking to push audio and video streams to srs, but specify parameters when pulling the stream? For example:
Pushing stream: ffmpeg -re -i source.200kbps.768x320.flv -c copy -f flv rtmp://xxxxxx/live/livestream
Playing:
Audio only: http://xxxxxx/live/livestream.flv?only-audio=1
Video only: http://xxxxxx/live/livestream.flv?only-video=1

TRANS_BY_GPT3

@chundonglinlin
Copy link
Member

chundonglinlin commented Dec 22, 2021

If using http-flv for voice intercom, the real-time performance may not be sufficient. It is recommended to configure the RTC module instead! Also, if it is only for voice, why bother streaming video? Video consumes bandwidth resources. (The srs service currently does not support specifying parameters for pulling streams, such as only-audio or only-video).

TRANS_BY_GPT3

@lin557
Copy link
Author

lin557 commented Dec 23, 2021

Okay, thank you

TRANS_BY_GPT3

@lin557 lin557 closed this as completed Dec 23, 2021
@winlinvip winlinvip self-assigned this Dec 23, 2021
@winlinvip winlinvip added Deleting Will deleted in future. Won't fix We won't fix it. labels Dec 23, 2021
@winlinvip
Copy link
Member

winlinvip commented Dec 23, 2021

This is not a bug, it belongs to 'How do I?' and can be submitted to StackOverflow. This issue will be deleted.

Please ask questions on Stack Overflow using the #simple-realtime-server tag.
This issue will be eliminated, see #2716

TRANS_BY_GPT3

@winlinvip winlinvip removed the Deleting Will deleted in future. label Aug 7, 2022
@winlinvip winlinvip changed the title 请问我想只用一个srs同时推送flv 与 aac 应该如何配置http访问 May I ask how to configure HTTP access to simultaneously push FLV and AAC using only one SRS? Jul 28, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT. Won't fix We won't fix it.
Projects
None yet
Development

No branches or pull requests

3 participants