fix: Compatible with flv video stream decoding without audio#253
fix: Compatible with flv video stream decoding without audio#253UmbraCi wants to merge 5 commits into
Conversation
|
Great find! Curious, have you thought about using these flags to set hasAudio or hasVideo? mpegts.js/src/demux/flv-demuxer.js Lines 162 to 163 in c7645fa |
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? |
|
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 |
Partially correct. The FLV header’s TypeFlagsAudio only indicates that audio is expected, but it doesn’t guarantee actual audio data. To be certain, you still need to check for audio tags (TagType = 8) in the file body. |
|
@xqq |

Summary
This PR improves playback availability for non-standard FLV inputs in two practical scenarios:
No-audio (non-standard) FLV can still play normally
Some non-standard dropped-frame videos no longer freeze playback
Production Validation
These fixes have been used at high frequency in our internal video business for about one year. In production practice, they have shown strong usability and stability.
Given this validation, we sincerely hope this PR can be merged into the main branch and that a new npm version can be released.
Sandbox