nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

NGINX RTMP multiple resolution record

Open jhanvi22 opened this issue 3 years ago • 1 comments

Hello. I want to record rtmp with an app, in different resolutions. The record all saves the rtmp, but I want to save it in 640*360 resolution.

application live-record { live on; idle_streams off; drop_idle_publisher 120s; wait_video on; wait_key on; publish_notify on; allow publish all; allow play all; record all; record_unique on; record_interval 720m; record_path /data/live-record; record_max_size 5000M;
hls off; }

jhanvi22 avatar Jun 15 '21 10:06 jhanvi22

You cold try something like this:

rtmp { server { application live { live on; record all; record_path /path/to/recordings; record_unique on; record_suffix .mp4;

        exec_record_done /usr/local/bin/ffmpeg -i $path -vcodec libx264 -preset medium -s 640x360 -acodec copy -f mp4 $path.mp4;
    }
}

}

sebastiantrianamartinez avatar May 03 '23 06:05 sebastiantrianamartinez