illuspas / Node-Media-Server

A Node.js implementation of RTMP/HTTP-FLV/WS-FLV/HLS/DASH/MP4 Media Server
https://www.npmjs.com/package/node-media-server
MIT License
5.97k stars 1.52k forks source link

Can't get live video streaming recorded in MP4 #60

Open fastcodecoq opened 6 years ago

fastcodecoq commented 6 years ago

Hi,

Thank you for sharing. I have problems trying to record the video live streaming. I used the configuration recommended in the documentation for record videos, but I can't see the recorded videos in the "media" folder.

Thanks for the help!

sieuhuflit commented 6 years ago

Me too

sieuhuflit commented 6 years ago

The problem is in

 trans: {
    ffmpeg: '/usr/local/bin/ffmpeg',
    tasks: [
      {
        app: 'vod',    <------ This app name should the same as rtmp output url path
        ac: 'aac',
        mp4: true,
        mp4Flags: '[movflags=faststart]',
      }
    ]
  }

The streaming path output should be : rtmp://IP_ADDRESS/vod/test

ghost commented 6 years ago

Yeah but there still appears to be some problems with audio. So I tried turning off audio during streaming with ffmpeg using -an flag to turn off audio. And it worked.

hathemi commented 5 years ago

after a whole year !! have you remember how does it work. i have put the same conf but still cannot get a recorded video.??

BBQ-zhu commented 2 years ago

@hathemi 在ffmpeg官网下载最新的,放入项目中,并将ffmpeg : '../xxxx/bin/ffmpeg.exe'写正确,就可以录制了