nginx-rtmp-module
nginx-rtmp-module copied to clipboard
NGINX RTMP multiple resolution record
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;
}
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;
}
}
}