From 19fb0fc345c9b0f1f055b537892ceace55e380b2 Mon Sep 17 00:00:00 2001 From: mertalev <101130780+mertalev@users.noreply.github.com> Date: Sat, 2 Sep 2023 00:45:09 -0400 Subject: [PATCH] updated tests --- server/src/domain/media/media.service.spec.ts | 210 ++++++++++++------ 1 file changed, 140 insertions(+), 70 deletions(-) diff --git a/server/src/domain/media/media.service.spec.ts b/server/src/domain/media/media.service.spec.ts index d59da447a..8a67a2774 100644 --- a/server/src/domain/media/media.service.spec.ts +++ b/server/src/domain/media/media.service.spec.ts @@ -311,10 +311,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=yuv420p', '-preset ultrafast', @@ -350,10 +352,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=yuv420p', '-preset ultrafast', @@ -374,10 +378,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -401,10 +407,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=yuv420p', '-preset ultrafast', @@ -426,10 +434,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=720:-2,format=yuv420p', '-preset ultrafast', @@ -451,10 +461,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -476,10 +488,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -525,10 +539,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -555,10 +571,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -582,10 +600,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -611,10 +631,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 vp9', - '-c:a:0 aac', + '-c:v vp9', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-cpu-used 5', @@ -642,10 +664,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 vp9', - '-c:a:0 aac', + '-c:v vp9', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-cpu-used 2', @@ -672,10 +696,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 vp9', - '-c:a:0 aac', + '-c:v vp9', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-row-mt 1', @@ -701,10 +727,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 vp9', - '-c:a:0 aac', + '-c:v vp9', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-cpu-used 5', @@ -729,10 +757,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -757,10 +787,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -785,10 +817,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 hevc', - '-c:a:0 aac', + '-c:v hevc', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -816,10 +850,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 hevc', - '-c:a:0 aac', + '-c:v hevc', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -885,10 +921,12 @@ describe(MediaService.name, () => { '-rc-lookahead 20', '-i_qfactor 0.75', '-b_qfactor 1.1', - `-c:v:0 h264_nvenc`, - '-c:a:0 aac', + `-c:v h264_nvenc`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload_cuda,scale_cuda=-2:720', '-preset p1', @@ -925,10 +963,12 @@ describe(MediaService.name, () => { '-rc-lookahead 20', '-i_qfactor 0.75', '-b_qfactor 1.1', - `-c:v:0 h264_nvenc`, - '-c:a:0 aac', + `-c:v h264_nvenc`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload_cuda,scale_cuda=-2:720', '-preset p1', @@ -961,10 +1001,12 @@ describe(MediaService.name, () => { '-rc-lookahead 20', '-i_qfactor 0.75', '-b_qfactor 1.1', - `-c:v:0 h264_nvenc`, - '-c:a:0 aac', + `-c:v h264_nvenc`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload_cuda,scale_cuda=-2:720', '-preset p1', @@ -998,10 +1040,12 @@ describe(MediaService.name, () => { '-rc-lookahead 20', '-i_qfactor 0.75', '-b_qfactor 1.1', - `-c:v:0 h264_nvenc`, - '-c:a:0 aac', + `-c:v h264_nvenc`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload_cuda,scale_cuda=-2:720', '-cq:v 23', @@ -1031,10 +1075,12 @@ describe(MediaService.name, () => { '-rc-lookahead 20', '-i_qfactor 0.75', '-b_qfactor 1.1', - `-c:v:0 h264_nvenc`, - '-c:a:0 aac', + `-c:v h264_nvenc`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload_cuda,scale_cuda=-2:720', '-preset p1', @@ -1064,10 +1110,12 @@ describe(MediaService.name, () => { '-extbrc 1', '-refs 5', '-bf 7', - `-c:v:0 h264_qsv`, - '-c:a:0 aac', + `-c:v h264_qsv`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload=extra_hw_frames=64,scale_qsv=-1:720', '-preset 7', @@ -1099,10 +1147,12 @@ describe(MediaService.name, () => { '-extbrc 1', '-refs 5', '-bf 7', - `-c:v:0 h264_qsv`, - '-c:a:0 aac', + `-c:v h264_qsv`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload=extra_hw_frames=64,scale_qsv=-1:720', '-global_quality 23', @@ -1131,10 +1181,12 @@ describe(MediaService.name, () => { '-extbrc 1', '-refs 5', '-bf 7', - `-c:v:0 vp9_qsv`, - '-c:a:0 aac', + `-c:v vp9_qsv`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-low_power 1', '-v verbose', '-vf format=nv12,hwupload=extra_hw_frames=64,scale_qsv=-1:720', @@ -1170,10 +1222,12 @@ describe(MediaService.name, () => { { inputOptions: ['-init_hw_device vaapi=accel:/dev/dri/renderD128', '-filter_hw_device accel'], outputOptions: [ - `-c:v:0 h264_vaapi`, - '-c:a:0 aac', + `-c:v h264_vaapi`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload,scale_vaapi=-2:720', '-compression_level 7', @@ -1199,10 +1253,12 @@ describe(MediaService.name, () => { { inputOptions: ['-init_hw_device vaapi=accel:/dev/dri/renderD128', '-filter_hw_device accel'], outputOptions: [ - `-c:v:0 h264_vaapi`, - '-c:a:0 aac', + `-c:v h264_vaapi`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload,scale_vaapi=-2:720', '-compression_level 7', @@ -1230,10 +1286,12 @@ describe(MediaService.name, () => { { inputOptions: ['-init_hw_device vaapi=accel:/dev/dri/renderD128', '-filter_hw_device accel'], outputOptions: [ - `-c:v:0 h264_vaapi`, - '-c:a:0 aac', + `-c:v h264_vaapi`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload,scale_vaapi=-2:720', '-qp 23', @@ -1257,10 +1315,12 @@ describe(MediaService.name, () => { { inputOptions: ['-init_hw_device vaapi=accel:/dev/dri/card1', '-filter_hw_device accel'], outputOptions: [ - `-c:v:0 h264_vaapi`, - '-c:a:0 aac', + `-c:v h264_vaapi`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload,scale_vaapi=-2:720', '-compression_level 7', @@ -1280,10 +1340,12 @@ describe(MediaService.name, () => { { inputOptions: ['-init_hw_device vaapi=accel:/dev/dri/renderD129', '-filter_hw_device accel'], outputOptions: [ - `-c:v:0 h264_vaapi`, - '-c:a:0 aac', + `-c:v h264_vaapi`, + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf format=nv12,hwupload,scale_vaapi=-2:720', '-compression_level 7', @@ -1310,10 +1372,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf scale=-2:720,format=yuv420p', '-preset ultrafast', @@ -1345,10 +1409,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf zscale=t=linear:npl=100,tonemap=hable:desat=0,zscale=p=bt709:t=bt709:m=bt709:range=pc,format=yuv420p', '-preset ultrafast', @@ -1370,10 +1436,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf zscale=t=linear:npl=100,tonemap=hable:desat=0,zscale=p=bt709:t=bt709:m=bt709:range=pc,format=yuv420p', '-preset ultrafast', @@ -1395,10 +1463,12 @@ describe(MediaService.name, () => { { inputOptions: [], outputOptions: [ - '-c:v:0 h264', - '-c:a:0 aac', + '-c:v h264', + '-c:a aac', '-movflags faststart', '-fps_mode passthrough', + '-map 0:v:0', + '-map 0:a:0', '-v verbose', '-vf zscale=t=linear:npl=250,tonemap=mobius:desat=0,zscale=p=bt709:t=bt709:m=bt709:range=pc,format=yuv420p', '-preset ultrafast',