Node-Media-Server icon indicating copy to clipboard operation
Node-Media-Server copied to clipboard

Record all streams - Important

Open abresihjj opened this issue 5 years ago • 6 comments

Hello dear friends I want it to start recording whenever the stream starts and save it in a folder

From

      {
        app: 'live',
        mp4: true,
        mp4Flags: '[movflags=frag_keyframe+empty_moov]',
      }

I used it but nothing was stored anywhere? Where is it stored? Records all streams?

Please help It is very important and necessary and I think it is a question of many

Thanks Please reply

abresihjj avatar Jan 02 '21 11:01 abresihjj

too me!

nguyenminhan avatar Apr 08 '21 03:04 nguyenminhan

it get stored on mediaroot in ur http http: { port: 8888, mediaroot: './server/media', allow_origin: '*' },

bikash-s-bhandari avatar Dec 29 '21 06:12 bikash-s-bhandari

前提是你得安装好ffmpeg,它才是录制工具,应该去官网下载,然后放入到项目中,配置处修改好正确路径

BBQ-zhu avatar Dec 31 '21 00:12 BBQ-zhu

it get stored on mediaroot in ur http http: { port: 8888, mediaroot: './server/media', allow_origin: '*' },

I can't find this folder anywhere. Can you elaborate a bit on this? Is it a setting I need to enable?

sylvesterroos avatar Jun 07 '22 11:06 sylvesterroos

so lets say your folder structure is like /src/config where config contains a file for node-media-server config file so ./server/media will be like this '/src/server/medi' don't forget "./"

siddhantranjan avatar Dec 08 '22 14:12 siddhantranjan

I confirm it works fine. App name you have the same as rtmp for example: rtmp://localhost/live_stream. that would set app live_stream and mediaroot correctly.

const config = {
  logType: 3, // 0=keine Log, 1=Error, 2=Error+Info, 3=alles
  rtmp: {
    port: 1980,
    chunk_size: 60000,
    gop_cache: true,
    ping: 30,
    ping_timeout: 180
  },
  http: {
    port: 8010,
    allow_origin: '*',
    mediaroot: './media',
  },
  trans: {
    ffmpeg: '/usr/bin/ffmpeg',
    tasks: [
      {
        app: 'live_stream',
        mp4: true,
        mp4Flags: '[movflags=frag_keyframe+empty_moov]',
      }
    ]
  }
};

kkm avatar Jan 09 '23 23:01 kkm