I am begginer, my video is not playing in my hls player. in console i am getting message like0.ts not found (404)

Viewed 15

I checked my network tab and find out that like0.ts element was "not found" and returned status code 404 and also there was no .m3u8 file in network tab This is my front-end code:

import { useNavigate } from 'react-router-dom'
import '@vime/core/themes/default.css';
import {
  Player, Hls, DefaultUi,
} from '@vime/react';

const Part = () => {

  const navigate = useNavigate()

  var value = quality+'p'
  var balue = rate+"x"
   const hlsConfig = {
        // ...
    };

  return (
    <>
   <Player volume={100} playbackRate={rate}>

<Hls version="latest" config={hlsConfig} poster="/media/poster.png">
    <source data-src={'http://localhost:4000/api/videop'} type="application/x-mpegURL" />
</Hls>
</Player>    
    </>)}
export default Part

This is my ffmpeg code :

ffmpeg -i videoone.mp4 -codec: copy -start_number 0 -hls_time 5 -hls_list_size 0 -bsf:v h264_mp4toannexb -f hls videoone.m3u8

This is my backend code :

var make = path.join(__dirname, 'public');
app.use(express.static(make));

app.get('/api/videop', async (req, res)=>{
    res.sendFile(__dirname+`public/like.m3u8`);
})
0 Answers
Related