Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

x213212 #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ io.on('connection', function(socket){
socket._rtmpDestination=m;
socket.emit('message','rtmp destination set to:'+m);
});
socket.on('config_option_size', function (m) {
//var myJSON = JSON.stringify(m);
socket._height = m.height;
socket._width = m.width;
socket.emit('message', 'rtmp size set to:{width: '+m.width+ " : height:"+ + m.height+ '}');
});
//socket._vcodec='libvpx';//from firefox default encoder
socket.on('config_vcodec',function(m){
if(typeof m != 'string'){
Expand Down Expand Up @@ -73,6 +79,7 @@ io.on('connection', function(socket){
'-y', //force to overwrite
'-use_wallclock_as_timestamps', '1', // used for audio sync
'-async', '1', // used for audio sync
'-vf' , "scale = "+socket._width+":"+socket._height,
//'-filter_complex', 'aresample=44100', // resample audio to 44100Hz, needed if input is not 44100
//'-strict', 'experimental',
'-bufsize', '1000',
Expand Down