VLC Player got freeze when getting requested *.m3u8 playlist from HTTP Server

0

I use FFMPEG for HLSstreaming with a command :

ffmpeg -f dshow -i video="GENERAL - UVC " -profile:v baseline -level 3.0 -c:v libx264 -crf 21 -preset veryfast -c:a aac -b:a 128k -ac 2 -f hls -hls_time 6 -hls_playlist_type event C:\TEST_STREAM\VLC_REQ_TEST\master.m3u8

Also I running local http-server on node.js to play it.

app.use((req, res, next) => 
{
    const fileName = path.basename(req.url);
    const extension = path.extname(fileName);

    if(extension == '.m3u8' || extension == '.ts') {
        const date = new Date();
        const correctTime = `${date.getHours()}h:${date.getMinutes()}m:${date.getSeconds()}s`;
        console.log(`File ${fileName} was requested at ${correctTime}`);
    }


    next();
});

app.use(express.static(streamPath));
app.get('/', (req, res) => {
    res.send(`HELLO MAN! Your path: ${streamPath}`);
});

When i open it in the EDGE browser is working correct without freezing and logging looks okay:

**EDGE BROWSER REQUEST HISTORY**:
C:\Users\intfl\source\repos\CS_IPFS\IPFS_Streaming_WPF\NodeJS_server>node index.js C:\TEST_STREAM\VLC_REQ_TEST\
SERVER RUNNING!
Your static path is: C:\TEST_STREAM\VLC_REQ_TEST\
File master.m3u8 was requested at 12h:38m:30s
File master0.ts was requested at 12h:38m:30s
File master.m3u8 was requested at 12h:38m:38s
File master1.ts was requested at 12h:38m:38s
File master.m3u8 was requested at 12h:38m:46s
File master2.ts was requested at 12h:38m:46s
File master.m3u8 was requested at 12h:38m:55s
File master3.ts was requested at 12h:38m:55s

But when i use VLC Player or standard WPF Player it get stuck on this log and video freezed:

**VLC REQUEST HISTORY**:
C:\Users\intfl\source\repos\CS_IPFS\IPFS_Streaming_WPF\NodeJS_server>node index.js C:\TEST_STREAM\VLC_REQ_TEST\
SERVER RUNNING!
Your static path is: C:\TEST_STREAM\VLC_REQ_TEST\
File master.m3u8 was requested at 12h:35m:21s
File master0.ts was requested at 12h:35m:21s
File master1.ts was requested at 12h:35m:22s
File master.m3u8 was requested at 12h:35m:29s

VLC start a huge CPU usage, there is no errors on logs just freezed... How can i fix that? Mb VLC has some commands before running player to avoid it?

Владимир Водов

Posted 2019-08-28T09:51:58.093

Reputation: 1

No answers