Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
webpage_recorder
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
8 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7935136a7baff9186fb1be8b78dcb68c22d837e4
7935136a
1 parent
62e003a5
add -h and -w to input width and heigh
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
11 行增加
和
1 行删除
main.js
main.js
查看文件 @
7935136
...
...
@@ -65,6 +65,14 @@ if(!argv.f){//framerate
argv
.
f
=
"20"
;
}
if
(
!
argv
.
w
){
//width
argv
.
w
=
"800"
;
}
if
(
!
argv
.
h
){
//width
argv
.
h
=
"600"
;
}
function
startFFmpeg
(
videosize
)
{
const
args
=
[
'-y'
,
'-f'
,
'rawvideo'
,
'-pix_fmt'
,
'bgra'
,
'-s'
];
...
...
@@ -93,6 +101,8 @@ app.disableHardwareAcceleration()
let
win
app
.
once
(
'ready'
,
()
=>
{
win
=
new
BrowserWindow
({
width
:
argv
.
w
,
height
:
argv
.
h
,
webPreferences
:
{
offscreen
:
true
}
...
...
@@ -119,7 +129,7 @@ win.webContents.executeJavaScript('const ipcToMain = require("electron").ipcRend
streamIn
=
null
;
}
console
.
log
(
"done"
)
if
(
elapsed
>
duration
+
5000
){
//delay 5s after closing pipe ,then close
if
(
elapsed
>
duration
+
5000
){
//delay 5s after closing
Sgit l
pipe ,then close
win
.
webContents
.
executeJavaScript
(
'require("electron").ipcRenderer.send("close-main-window")'
);
}
}
...
...
请
注册
或
登录
后发表评论