Use same resolutions and bitrates as set in Elemental.

This commit is contained in:
Orne Brocaar 2015-03-10 11:30:24 -03:00
parent 5707e66719
commit f8abd66c13

View File

@ -13,9 +13,12 @@ rtmp {
live on; live on;
exec ffmpeg -i rtmp://localhost:1935/encoder/$name exec ffmpeg -i rtmp://localhost:1935/encoder/$name
-c:a libfdk_aac -b:a 32k -c:v libx264 -b:v 128K -f flv -g 30 rtmp://localhost:1935/hls/$name_low -c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 2500k -f flv -g 30 -r 30 -s 1280x720 rtmp://localhost:1935/hls/$name_720p2564kbs
-c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 256k -f flv -g 30 rtmp://localhost:1935/hls/$name_mid -c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 1800k -f flv -g 30 -r 30 -s 960x540 rtmp://localhost:1935/hls/$name_540p1864kbs
-c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 512K -f flv -g 30 rtmp://localhost:1935/hls/$name_hi; -c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 1200k -f flv -g 30 -r 30 -s 640x360 rtmp://localhost:1935/hls/$name_360p1264kbs
-c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 686k -f flv -g 30 -r 30 -s 640x360 rtmp://localhost:1935/hls/$name_360p750kbs
-c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 400k -f flv -g 15 -r 15 -s 480x270 rtmp://localhost:1935/hls/$name_270p464kbs
-c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 200k -f flv -g 15 -r 15 -s 480x270 rtmp://localhost:1935/hls/$name_270p264kbs;
} }
application hls { application hls {
@ -26,9 +29,12 @@ rtmp {
hls_path /data/hls; hls_path /data/hls;
hls_nested on; hls_nested on;
hls_variant _low BANDWIDTH=160000; hls_variant _720p2564kbs BANDWIDTH=2564000,RESOLUTION=1280x720;
hls_variant _mid BANDWIDTH=320000; hls_variant _540p1864kbs BANDWIDTH=1864000,RESOLUTION=960x540;
hls_variant _hi BANDWIDTH=640000; hls_variant _360p1264kbs BANDWIDTH=1264000,RESOLUTION=640x360;
hls_variant _360p750kbs BANDWIDTH=750000,RESOLUTION=640x360;
hls_variant _270p464kbs BANDWIDTH=464000,RESOLUTION=480x270;
hls_variant _270p264kbs BANDWIDTH=264000,RESOLUTION=480x270;
} }
} }
} }