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

FMP4 HLS does not run on latest VideoJS 7 (7.21.5) version #8416

Open
whatever1211 opened this issue Aug 23, 2023 · 2 comments
Open

FMP4 HLS does not run on latest VideoJS 7 (7.21.5) version #8416

whatever1211 opened this issue Aug 23, 2023 · 2 comments
Labels
needs: triage This issue needs to be reviewed

Comments

@whatever1211
Copy link

Description

Hi VideoJS team,

We are using VideoJS with HLS for our product and it has been a great library.

We are planing upgrading to HLS FMP4 for better performance and memory storage.
But when we using the HLS FMP4 on latest VideoJS 7 version (7.21.5), the player return an error and can not run the stream.

image

HLS stream - Working: http://cdn-vttvas.s3.cloudstorage.com.vn/video1/2023/08/18/16/7002a157/7002a157-e25e-424f-b996-fe960d23c1a2_m.m3u8
HLS FMP4 stream - Not working: http://cdn-vttvas.s3.cloudstorage.com.vn/video1/2023/08/18/16/7002a157/7002a157-e25e-424f-b996-fe960d23c1a2_6.m3u8

Demo index.html code:

<!DOCTYPE html>
<html>
    <head>
        <link href="https://vjs.zencdn.net/7.21.5/video-js.css" rel="stylesheet" />
    </head>

    <body>
        <video
            id="my-video"
            class="video-js"
            controls
            preload="auto"
            width="1920"
            height="1080"
        >
        </video>

        <script src="https://vjs.zencdn.net/7.21.5/video.min.js"></script>

        <script>
            let player = videojs('my-video');
            // player.src("http://cdn-vttvas.s3.cloudstorage.com.vn/video1/2023/08/18/16/7002a157/7002a157-e25e-424f-b996-fe960d23c1a2_m.m3u8"); // HLS - Working
            player.src("http://cdn-vttvas.s3.cloudstorage.com.vn/video1/2023/08/18/16/7002a157/7002a157-e25e-424f-b996-fe960d23c1a2_6.m3u8"); // HLS FMP4 - Not working
        </script>
    </body>
</html>

The odd thing is when we try a lesser VideoJS version (7.9.7), both HLS and HLS FMP4 stream work.

Can you help giving us a look.

  1. How later VideoJS version (7.10.0 above) can not run HLS FMP4 stream, but lesser version (7.9.7) can?
  2. Is this a VideoJS issue or our HLS FMP4 stream issue? We are open for all suggestion. Note, however we have tried the HLS FMP4 stream using hls.js library version (1.1.5) and player can run the stream.

Reduced test case

http://cdn-vttvas.s3.cloudstorage.com.vn/video1/2023/08/18/16/7002a157/7002a157-e25e-424f-b996-fe960d23c1a2_6.m3u8

Steps to reproduce

  1. Copy and run the index.html code below.
<!DOCTYPE html>
<html>
    <head>
        <link href="https://vjs.zencdn.net/7.21.5/video-js.css" rel="stylesheet" />
    </head>

    <body>
        <video
            id="my-video"
            class="video-js"
            controls
            preload="auto"
            width="1920"
            height="1080"
        >
        </video>

        <script src="https://vjs.zencdn.net/7.21.5/video.min.js"></script>

        <script>
            let player = videojs('my-video');
            // player.src("http://cdn-vttvas.s3.cloudstorage.com.vn/video1/2023/08/18/16/7002a157/7002a157-e25e-424f-b996-fe960d23c1a2_m.m3u8"); // HLS - Working
            player.src("http://cdn-vttvas.s3.cloudstorage.com.vn/video1/2023/08/18/16/7002a157/7002a157-e25e-424f-b996-fe960d23c1a2_6.m3u8"); // HLS FMP4 - Not working
        </script>
    </body>
</html>
  1. Using HLS stream for the player to work.
  2. Using HLS FMP4 stream for player error.

Errors

image

What version of Video.js are you using?

v7.21.5, v7.9.7

Video.js plugins used.

None

What browser(s) including version(s) does this occur with?

Chrome 116.0.5845.97

What OS(es) and version(s) does this occur with?

Windows 10

@whatever1211 whatever1211 added the needs: triage This issue needs to be reviewed label Aug 23, 2023
@video-archivist-bot
Copy link

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

@BucherTomas
Copy link

Just my two cents, but I think that the fmp4 stream version is not packaged correctly. Download any first data segment with suffix _0.m4s from any rendition variant and it is just 24 bytes long, the fmp4 header is incomplete (which I believe is the main problem here) and the actual stream data in mdat box is missing. Only the subsequent segments are then generated as they should.

It appears that the data from the first segments are attached to the init segments, which should instead carry just the stream header with encoding specifics for decoder initialization and in fact no stream data should be present there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage This issue needs to be reviewed
Projects
None yet
Development

No branches or pull requests

3 participants