mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-29 11:44:00 +01:00
Add configuration to set how many threads each ffmpeg process can use
This commit is contained in:
parent
15d217453b
commit
ed13f53060
@ -160,6 +160,7 @@ HLS_DIR = os.path.join(MEDIA_ROOT, "hls/")
|
|||||||
|
|
||||||
FFMPEG_COMMAND = "ffmpeg" # this is the path
|
FFMPEG_COMMAND = "ffmpeg" # this is the path
|
||||||
FFPROBE_COMMAND = "ffprobe" # this is the path
|
FFPROBE_COMMAND = "ffprobe" # this is the path
|
||||||
|
FFMPEG_THREADS = 0 # default - use optimal number of threads
|
||||||
MP4HLS = "mp4hls"
|
MP4HLS = "mp4hls"
|
||||||
|
|
||||||
MASK_IPS_FOR_ACTIONS = True
|
MASK_IPS_FOR_ACTIONS = True
|
||||||
|
@ -554,6 +554,8 @@ def get_base_ffmpeg_command(
|
|||||||
|
|
||||||
base_cmd = [
|
base_cmd = [
|
||||||
settings.FFMPEG_COMMAND,
|
settings.FFMPEG_COMMAND,
|
||||||
|
"-threads",
|
||||||
|
str(settings.FFMPEG_THREADS),
|
||||||
"-y",
|
"-y",
|
||||||
"-i",
|
"-i",
|
||||||
input_file,
|
input_file,
|
||||||
|
@ -1482,6 +1482,8 @@ def encoding_file_save(sender, instance, created, **kwargs):
|
|||||||
ff.write("file {}\n".format(f))
|
ff.write("file {}\n".format(f))
|
||||||
cmd = [
|
cmd = [
|
||||||
settings.FFMPEG_COMMAND,
|
settings.FFMPEG_COMMAND,
|
||||||
|
"-threads",
|
||||||
|
str(settings.FFMPEG_THREADS),
|
||||||
"-y",
|
"-y",
|
||||||
"-f",
|
"-f",
|
||||||
"concat",
|
"concat",
|
||||||
|
@ -62,6 +62,8 @@ def chunkize_media(self, friendly_token, profiles, force=True):
|
|||||||
chunks_file_name += ".mkv"
|
chunks_file_name += ".mkv"
|
||||||
cmd = [
|
cmd = [
|
||||||
settings.FFMPEG_COMMAND,
|
settings.FFMPEG_COMMAND,
|
||||||
|
"-threads",
|
||||||
|
str(settings.FFMPEG_THREADS),
|
||||||
"-y",
|
"-y",
|
||||||
"-i",
|
"-i",
|
||||||
media.media_file.path,
|
media.media_file.path,
|
||||||
|
Loading…
Reference in New Issue
Block a user