Skip to content

fix: Compatible with flv video stream decoding without audio #253

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

UmbraCi
Copy link

@UmbraCi UmbraCi commented May 29, 2025

If the flv video stream has no audio data, but hasAudio is also true, then the video will be stuck loading. This fix determines that if there is no audio data in three seconds, then hasAudio will be changed to false

@veovera
Copy link

veovera commented May 29, 2025

Great find! Curious, have you thought about using these flags to set hasAudio or hasVideo?

hasAudioTrack: hasAudio,
hasVideoTrack: hasVideo

@UmbraCi
Copy link
Author

UmbraCi commented May 29, 2025

Great find! Curious, have you thought about using these flags to set hasAudio or hasVideo?很棒的发现!好奇,你有没有想过用这些标志来设置 hasAudio 或 hasVideo?

hasAudioTrack: hasAudio,
hasVideoTrack: hasVideo

I don't see this configurable property in the api.doc file, and I haven't tried it. Have you encountered the same problem and solved it by using this property configuration?

@veovera
Copy link

veovera commented May 29, 2025

I have not tried it. That said probe() reads the flv header which basically states weather audio is present in the flv. Knowing that allows you to avoid waiting 3 seconds to see if audio is present?

See https://rtmp.veriskope.com/pdf/video_file_format_spec_v10_1.pdf#page=74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants