Skip to content

Commit 78a2106

Browse files
committed
implemented ffmpeg concat
1 parent 57a37ad commit 78a2106

19 files changed

+335
-87
lines changed

concat.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
ffmpeg -f concat -i video_list.txt -c copy concated.mp4

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"start": "node server.js",
7+
"start-serverside": "__public_path__=public_serverside_record node server_ffmpeg_wrapper.js",
8+
"start-clientside": "__public_path__=public_clientside_record node server_mediarecorder.js",
89
"gen-pem": "rm security/cert.* && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout security/cert.key -out security/cert.pem -config security/req.cnf -sha256",
910
"test": "echo \"Error: no test specified\" && exit 1"
1011
},

pc_constants.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ const PEER_CONNECTION_CONFIG = {
22
sdpSemantics: "unified-plan",
33
iceServers: [
44
{
5-
urls: "stun.l.google.com:19302",
5+
urls: "stun:stun.l.google.com:19302",
66
},
77
{
8-
urls: "stun1.l.google.com:19302",
8+
urls: "stun:stun1.l.google.com:19302",
99
},
1010
{
11-
urls: "stun2.l.google.com:19302",
11+
urls: "stun:stun2.l.google.com:19302",
1212
},
1313
{
14-
urls: "stun3.l.google.com:19302",
14+
urls: "stun:stun3.l.google.com:19302",
1515
},
1616
{
17-
urls: "stun4.l.google.com:19302",
17+
urls: "stun:stun4.l.google.com:19302",
1818
},
1919
],
2020
};
File renamed without changes.
File renamed without changes.
File renamed without changes.

public_record/index.js renamed to public_clientside_record/index.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@
1111

1212
"use strict";
1313

14-
document.addEventListener("DOMContentLoaded", () => {
15-
const displayZone = document.getElementById("display_zone");
16-
for (let i = 0; i < 20; i++)
17-
// 240p는 매우 빠르다.
18-
// 720p는 꽤 느리다.
19-
displayZone.innerHTML =
20-
displayZone.innerHTML +
21-
`<video playsinline autoplay muted>
22-
<source src="500_1000kbps.webm" type="video/webm" />
23-
</video>`;
24-
});
14+
// document.addEventListener("DOMContentLoaded", () => {
15+
// const displayZone = document.getElementById("display_zone");
16+
// for (let i = 0; i < 20; i++)
17+
// // 240p는 매우 빠르다.
18+
// // 720p는 꽤 느리다.
19+
// displayZone.innerHTML =
20+
// displayZone.innerHTML +
21+
// `<video playsinline autoplay muted>
22+
// <source src="500_1000kbps.webm" type="video/webm" />
23+
// </video>`;
24+
// });
2525

2626
const RECORDER_UPLOAD_TIME_SLICE = 100; // ms
2727

2828
const VIDEO_CONSTRAINTS_MOBILE = {
2929
width: { ideal: 720 },
3030
height: { ideal: 1280 },
31-
frameRate: { min: 24 },
31+
frameRate: { ideal: 24 },
3232
facingMode: "user",
3333
};
3434

3535
const VIDEO_CONSTRAINTS = {
3636
width: { ideal: 1280 },
3737
height: { ideal: 720 },
38-
frameRate: { min: 24 },
38+
frameRate: { ideal: 24 },
3939
facingMode: "user",
4040
};
4141

@@ -202,9 +202,9 @@ document.querySelector("button#start").addEventListener("click", async () => {
202202
document.querySelector("#echoCancellation").checked;
203203
const constraints = {
204204
audio: {
205-
echoCancellation: { exact: hasEchoCancellation },
205+
echoCancellation: { ideal: hasEchoCancellation },
206206
},
207-
video: VIDEO_CONSTRAINTS,
207+
video: VIDEO_CONSTRAINTS_MOBILE,
208208
};
209209
console.log("Using media constraints:", constraints);
210210
await init(constraints);
File renamed without changes.

0 commit comments

Comments
 (0)