mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-13 04:35:28 +01:00
experiment: added threads to ffmpeg args
This commit is contained in:
parent
df73b8c860
commit
64987c6494
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,7 @@ export function streamLiveRender(streamInfo, res) {
|
||||||
|
|
||||||
let format = streamInfo.filename.split('.')[streamInfo.filename.split('.').length - 1], args = [
|
let format = streamInfo.filename.split('.')[streamInfo.filename.split('.').length - 1], args = [
|
||||||
'-loglevel', '-8',
|
'-loglevel', '-8',
|
||||||
|
'-threads', `${process.env.ffmpegThreads ? process.env.ffmpegThreads : '0'}`,
|
||||||
'-i', streamInfo.urls[0],
|
'-i', streamInfo.urls[0],
|
||||||
'-i', 'pipe:3',
|
'-i', 'pipe:3',
|
||||||
'-map', '0:v',
|
'-map', '0:v',
|
||||||
|
@ -95,6 +96,7 @@ export function streamAudioOnly(streamInfo, res) {
|
||||||
try {
|
try {
|
||||||
let args = [
|
let args = [
|
||||||
'-loglevel', '-8',
|
'-loglevel', '-8',
|
||||||
|
'-threads', `${process.env.ffmpegThreads ? process.env.ffmpegThreads : '0'}`,
|
||||||
'-i', streamInfo.urls
|
'-i', streamInfo.urls
|
||||||
]
|
]
|
||||||
if (streamInfo.metadata) {
|
if (streamInfo.metadata) {
|
||||||
|
@ -141,6 +143,7 @@ export function streamVideoOnly(streamInfo, res) {
|
||||||
try {
|
try {
|
||||||
let format = streamInfo.filename.split('.')[streamInfo.filename.split('.').length - 1], args = [
|
let format = streamInfo.filename.split('.')[streamInfo.filename.split('.').length - 1], args = [
|
||||||
'-loglevel', '-8',
|
'-loglevel', '-8',
|
||||||
|
'-threads', `${process.env.ffmpegThreads ? process.env.ffmpegThreads : '0'}`,
|
||||||
'-i', streamInfo.urls,
|
'-i', streamInfo.urls,
|
||||||
'-c', 'copy'
|
'-c', 'copy'
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue