Sunday, January 12, 2014

New exec_record_done variables

New variables are added to exec_record_done directive to make setting files and directories easier.
  • filename - file name portion of the path, directory omitted
  • dirname - directory path
  • basename - file name with file extension omitted

Assume path is /tmp/rec/mystream-1389499351.flv. Then filename is mystream-1389499351.flv, dirname is /tmp/rec, basename is mystream-1389499351.

Example of recording mp4 with proper file names.
application myapp {
  live on;
  record all;
  record_path /tmp/rec;
  record_unique on;
  record_interval 30s;
  exec_record_done ffmpeg -i $path -c copy /var/videos/$basename.mp4;
}
Wiki is updated as well.

6 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Hello Roman-

    It is truly amazing work and appreciate it. Is it possible to mix an new audio with Video stream. For example, let us say you are playing ad.mp4. Can I use the audio from title.mp4? This is essentially mixing.

    ReplyDelete
  4. I want to download the live stream. How can I do that? My Streaming url is like rtmp://broadcast-staging.ravelap.com/ravelApp/6c244af2b4e0941931486308477906da?e=1551607980&st=ReH__iFRcCPg3mAwL66k2g

    ReplyDelete
  5. Sir can you please explain the procedure of making m3u8 links for PTV Sports

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete