Skip to main content

Video has_audio is always false regardless if video had audio or not


1 comment

  • Official comment

    Hi Charmaine,

    Unfortunately those are one of the properties that we expose however are used internally. video_has_audio is the only one that has use for only a very small percentage of our customers.

    In your case the has_audio and video_has_audio will not really allow you to see if the video has the audio or not.

    The video_has_audio can only tell you if there is audio track within the video or not so in most cases (even when mic is muted or disconnected) the audio track is likely to be there.

    There are specific edge cases when the video might be created without any audio track, however it is very rare, so it would likely always show true. Most commonly it can be found as false if someone uploads the video that has no audio tracks / audio data at all.

    Just as a bit of info about the videos that might help understand the above.

    On your drive you can see each video as some-video.mp4, however the video itself is made out of different parts. The mp4 is used to tell us the type of container so we know where to find what. Within that container we have meta data (various hidden details such as framerate, orientation, etc.) that are not really seen when watching the video. Next to that we have video track and the audio track. There might be one video track and there might be many audio tracks within it. This is how you could for example have audio in different languages played when you watch some video.

    While it looks like the video and audio are same file, the reality is that these are separate data streams.

    So for the video_has_audio to be false it means that the video must not have any of those audio tracks within the video, regardless if the track is muted, just white noise or completely empty data.

    What might help you is to have the following:

    parameter audio-test-mandatory - tests the audio from microphone being present before starting recording

    method recorder.soundLevel(); - returns the current mic level


    1. no_microphone - fires when there is no microphone detected
    2. has_microphone - fires when there is mic detected
    3. microphonehealth - fires any time the health of the microphone is changed (available / not available)

    The last one would help you detect if the mic is turned off during the video recording, however even then it is possible that the browser API does not detect actual issue due to the noise that might be present, so if you really wanted to be safe, you could use microphonehealth and then also use the soundLevel() method to detect the current level at some intervals - for example every 10 seconds or so.

    You can see more about the events here:

    Hope this helps, and of course let us know if you have any additional questions for us :)

Please sign in to leave a comment.