HTTP-TS: Support guess_has_av for audio only stream. v6.0.141#4063
Merged
winlinvip merged 3 commits intoossrs:developfrom Jul 24, 2024
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe
http_remux feature support config
has_audio,has_video&guess_has_avprop.srs/trunk/src/app/srs_app_http_stream.cpp
Lines 630 to 632 in 282d94d
Take
http_flvas example,srscan accept both RTMP streams with only audio, only video or both audio and video streams. It is controlled by above three properties.But
guess_has_avis not implemented byhttp_ts. The problem is that if I want publish a RTMP stream with audio or video track, thehas_audioandhas_video, which are default true/on, must to be config to match the RTMP stream, otherwise thempegts.jsplayer can't play thehttp-tsstream.How to reproduce
export SRS_VHOST_HTTP_REMUX_HAS_AUDIO=on; export SRS_VHOST_HTTP_REMUX_HAS_VIDEO=on; export SRS_VHOST_HTTP_REMUX_GUESS_HAS_AV=on; ./objs/srs -c conf/http.ts.live.confffmpeg -re -stream_loop -1 -i srs/trunk/doc/source.200kbps.768x320.flv -vn -acodec copy -f flv rtmp://localhost/live/livestreamhttp://localhost:8080/players/srs_player.html?schema=http, go toLivePlayer, input URL:http://localhost:8080/live/livestream.ts, click play.http://localhost:8080/live/livestream.tscan not play.Solution
Let
http-tssupportguess_has_av,http-flvalready supported. Theguess_has_avdefault value is ture/on, so thehttp-ts|flvcan play any streams with audio, video or both.