How to save stream in mp4 format?

5,800

As far as I know you can't do it on fly. On the other hand, you can just resave it in mp4. You can try to use directly ffmpeg as it supports output https://www.ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment Some sort of this, might go: ffmpeg -i rtsp://admin:[email protected]:554/ch1-s1 -c copy -map 0 -f segment -segment_time 600 -segment_format mp4 "out%03d.mp4"

Share:
5,800

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    By default nginx rtmp module records video stream in .flv format if record option is enabled, but I need .mp4

    I found that video can be converted to .mp4 when record has finished with exec_record_done callback and ffmpeg

    Is there any way to record video in .mp4 format or at least convert it to this format on the fly?