diff --git a/Application/Examples/ArmCurl/Model/CreateVideo.any b/Application/Examples/ArmCurl/Model/CreateVideo.any index 950bd5746..a6208953f 100644 --- a/Application/Examples/ArmCurl/Model/CreateVideo.any +++ b/Application/Examples/ArmCurl/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = Main.Model.EnvironmentModel.Bench.Origin; diff --git a/Application/Examples/BenchPress/Model/CreateVideo.any b/Application/Examples/BenchPress/Model/CreateVideo.any index ed30be8ff..e5ba5856f 100644 --- a/Application/Examples/BenchPress/Model/CreateVideo.any +++ b/Application/Examples/BenchPress/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = Main.Model.EnvironmentModel.GlobalRef.Origin; diff --git a/Application/Examples/BikeModel/Model/CreateVideo.any b/Application/Examples/BikeModel/Model/CreateVideo.any index 8d98a0bdb..3a245a906 100644 --- a/Application/Examples/BikeModel/Model/CreateVideo.any +++ b/Application/Examples/BikeModel/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = {0.2,-0.3,0}; diff --git a/Application/Examples/KneeSimulator/Model/CreateVideo.any b/Application/Examples/KneeSimulator/Model/CreateVideo.any index fc8aee993..03ad810e2 100644 --- a/Application/Examples/KneeSimulator/Model/CreateVideo.any +++ b/Application/Examples/KneeSimulator/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = {0.1, 0.45, 0}; diff --git a/Application/Examples/PushUp/Model/CreateVideo.any b/Application/Examples/PushUp/Model/CreateVideo.any index 730a27f70..93b08b998 100644 --- a/Application/Examples/PushUp/Model/CreateVideo.any +++ b/Application/Examples/PushUp/Model/CreateVideo.any @@ -25,11 +25,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = {0.9,0.2,0}; diff --git a/Application/Examples/SeatedHuman/Model/CreateVideo.any b/Application/Examples/SeatedHuman/Model/CreateVideo.any index 39d37f666..c11628478 100644 --- a/Application/Examples/SeatedHuman/Model/CreateVideo.any +++ b/Application/Examples/SeatedHuman/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = {0.2,-0.6,0}; diff --git a/Application/Examples/Squat/Model/CreateVideo.any b/Application/Examples/Squat/Model/CreateVideo.any index 2a6910943..e875eda47 100644 --- a/Application/Examples/Squat/Model/CreateVideo.any +++ b/Application/Examples/Squat/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = {0,0.75,0}; diff --git a/Application/Examples/StandingModel/Model/CreateVideo.any b/Application/Examples/StandingModel/Model/CreateVideo.any index 9afea04a8..846345a85 100644 --- a/Application/Examples/StandingModel/Model/CreateVideo.any +++ b/Application/Examples/StandingModel/Model/CreateVideo.any @@ -26,11 +26,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r+{0,-0.2,0}; diff --git a/Application/Examples/WheelChairRancho/Model/CreateVideo.any b/Application/Examples/WheelChairRancho/Model/CreateVideo.any index 0dee7439a..4a5334ebd 100644 --- a/Application/Examples/WheelChairRancho/Model/CreateVideo.any +++ b/Application/Examples/WheelChairRancho/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = z, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = Main.Model.EnvironmentModel.GlobalRef.Seat.r+{0,0,0.25}; diff --git a/Application/Examples/WheelTurn/Model/CreateVideo.any b/Application/Examples/WheelTurn/Model/CreateVideo.any index 3f092d430..083eee950 100644 --- a/Application/Examples/WheelTurn/Model/CreateVideo.any +++ b/Application/Examples/WheelTurn/Model/CreateVideo.any @@ -24,11 +24,6 @@ VideoLookAtCamera VideoTool (UP_DIRECTION = y, _DEBUG=0) = // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focuses on CameraLookAtPoint = {0.1,0,0}; diff --git a/Application/MocapExamples/Plug-in-gait_MultiTrial_StandingRef/CreateVideo.any b/Application/MocapExamples/Plug-in-gait_MultiTrial_StandingRef/CreateVideo.any index f18da2bdd..3b9c423ef 100644 --- a/Application/MocapExamples/Plug-in-gait_MultiTrial_StandingRef/CreateVideo.any +++ b/Application/MocapExamples/Plug-in-gait_MultiTrial_StandingRef/CreateVideo.any @@ -21,11 +21,6 @@ VIDEO_STUDY = { // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // The point the camera focus on COM CameraLookAtPoint = {0.5, 0.75, 1} ; diff --git a/Application/MocapExamples/Plug-in-gait_Simple/Setup/CreateVideo.any b/Application/MocapExamples/Plug-in-gait_Simple/Setup/CreateVideo.any index 5f0676280..3bf164e9d 100644 --- a/Application/MocapExamples/Plug-in-gait_Simple/Setup/CreateVideo.any +++ b/Application/MocapExamples/Plug-in-gait_Simple/Setup/CreateVideo.any @@ -21,11 +21,6 @@ VIDEO_STUDY = { // is created. This gives much better videos. Especially with lower resolutions VideoInputScale = 2; - // Video codec used in FFMPEG video creation. - // The inlcuded FFMPEG only support free codecs (LGPL). You can replace the FFPEG - // executable in AnyBody's install directory to enable other codecs like "libx264" - VideoCodec = "libvpx-vp9"; - // This fixes the "Look at point" at a specific height while still following the center of mass CameraLookAtPoint = 0.75*CameraUpDirection + mult(Main.HumanModel.BodyModel.Interface.CenterOfMass.Pos, not(CameraUpDirection)); diff --git a/Docs/FullHuman_media.any b/Docs/FullHuman_media.any index 3ab501849..ec18bbf18 100644 --- a/Docs/FullHuman_media.any +++ b/Docs/FullHuman_media.any @@ -40,7 +40,7 @@ Main = { // }; - VideoLookAtCamera RotatingGif(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera RotatingGif(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "_static/Human_rotating_model"; @@ -49,7 +49,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {350,350}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r - {0,0.1,0}; diff --git a/Docs/body/_static/CervicalSpine_media.any b/Docs/body/_static/CervicalSpine_media.any index 96b944aaa..003e9345d 100644 --- a/Docs/body/_static/CervicalSpine_media.any +++ b/Docs/body/_static/CervicalSpine_media.any @@ -32,7 +32,7 @@ Main = { }; - VideoLookAtCamera RotatingGif(UP_DIRECTION=y, _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera RotatingGif(UP_DIRECTION=y, _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "CervicalSpine_rotating_model"; @@ -41,7 +41,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {350,350}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsCervicalSpine.C1Seg.C2C1JntNode.r; diff --git a/Docs/body/_static/DetailedHand_media.any b/Docs/body/_static/DetailedHand_media.any index 7dafcf044..f9df3d185 100644 --- a/Docs/body/_static/DetailedHand_media.any +++ b/Docs/body/_static/DetailedHand_media.any @@ -32,7 +32,7 @@ Main = { }; - VideoLookAtCamera Video(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera Video(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "DetailedHand_ThumbsUp"; @@ -41,7 +41,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {500,350}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = {0.541, 1.27, 0.205}; diff --git a/Docs/body/_static/Leg_media.any b/Docs/body/_static/Leg_media.any index a75ee0cee..975e1d153 100644 --- a/Docs/body/_static/Leg_media.any +++ b/Docs/body/_static/Leg_media.any @@ -32,7 +32,7 @@ Main = { }; - VideoLookAtCamera RotatingVideo(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera RotatingVideo(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "Leg_rotating_model"; @@ -41,7 +41,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {350,350}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r+{0, -0.50, 0}; diff --git a/Docs/body/_static/LumbarSpine_media.any b/Docs/body/_static/LumbarSpine_media.any index 85d7f1d75..5b60d7477 100644 --- a/Docs/body/_static/LumbarSpine_media.any +++ b/Docs/body/_static/LumbarSpine_media.any @@ -58,7 +58,7 @@ Main = { Preview.FileName = VideoName + ".jpg"; }; - VideoLookAtCamera RotatingGif(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera RotatingGif(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "LumbarSpine_rotating_model"; @@ -67,7 +67,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {300,500}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.L1Seg.T12L1JntNode.r + {0,-0.01,0}; diff --git a/Docs/body/_static/ShoulderArm_media.any b/Docs/body/_static/ShoulderArm_media.any index ceb918c58..6d056851d 100644 --- a/Docs/body/_static/ShoulderArm_media.any +++ b/Docs/body/_static/ShoulderArm_media.any @@ -39,7 +39,7 @@ Main = { }; - VideoLookAtCamera RotatingGif(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera RotatingGif(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "ShoulderArm_rotating_model"; @@ -48,7 +48,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {350,350}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r+{0,0.22,0}; diff --git a/Docs/body/_static/TLEM1_media.any b/Docs/body/_static/TLEM1_media.any index fa312babd..a6bb968a0 100644 --- a/Docs/body/_static/TLEM1_media.any +++ b/Docs/body/_static/TLEM1_media.any @@ -28,7 +28,7 @@ Main = { }; - VideoLookAtCamera RotatingVideo(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera RotatingVideo(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "TLEM1_rotating_model"; @@ -37,7 +37,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {350,350}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r+{0, -0.50, 0}; diff --git a/Docs/body/_static/TLEM22_TLEM21_comparison.any b/Docs/body/_static/TLEM22_TLEM21_comparison.any index 3a3660df3..e3485067d 100644 --- a/Docs/body/_static/TLEM22_TLEM21_comparison.any +++ b/Docs/body/_static/TLEM22_TLEM21_comparison.any @@ -381,7 +381,7 @@ Main = { - VideoLookAtCamera RotatingVideo(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF) = + VideoLookAtCamera RotatingVideo(UP_DIRECTION=y , _AUTO_PLAY_VIDEOS=OFF, VIDEO_ENCODER="xvid") = { VideoName = "TLEM22_TLEM21_rotating_model"; @@ -390,7 +390,6 @@ Main = { }; VideoInputScale = 5; VideoResolution = {650,650}; - VideoCodec = "libx264"; VideoInputFrameRate = 30; VideoOutputFrameRate = 30; // CameraLookAtPoint = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg.r+{0, -0.90, 0}; diff --git a/Tests/Cameras.any b/Tests/Cameras.any index d68da675b..7a1dab92a 100644 --- a/Tests/Cameras.any +++ b/Tests/Cameras.any @@ -62,7 +62,7 @@ { AnyOperation& InitPosImage = Main.VideoCam.Create_Video; }; - VideoLookAtCamera VideoCam(_AUTO_PLAY_VIDEOS=_OPEN_PREVIEW) = + VideoLookAtCamera VideoCam(_AUTO_PLAY_VIDEOS=_OPEN_PREVIEW, VIDEO_ENCODER="xvid") = { VideoName = Main.CameraName; Analysis = { @@ -71,8 +71,7 @@ VideoInputScale = 5; VideoResolution = {350,350}; CameraUpDirection = Main.LoadTimeCam.CameraUpDirection; -// VideoCodec = "libx264"; - VideoInputFrameRate = 30; +// VideoInputFrameRate = 30; VideoOutputFrameRate = 30; CameraLookAtPoint = Main.InitPosCam.CameraLookAtPoint; CameraFieldOfView = Main.InitPosCam.CameraFieldOfView; diff --git a/Tools/ModelUtilities/Video/VideoLookAtCamera.any b/Tools/ModelUtilities/Video/VideoLookAtCamera.any index 02383ab91..ccb05aa3c 100644 --- a/Tools/ModelUtilities/Video/VideoLookAtCamera.any +++ b/Tools/ModelUtilities/Video/VideoLookAtCamera.any @@ -61,13 +61,15 @@ To use the class template. #class_template VideoLookAtCamera ( UP_DIRECTION = y, CREATE_GIF = 0, + TRANSPARENT_BACKGROUND=0, _AUTO_PLAY_VIDEOS = 1, _OVER_WRITE = 1, _DEBUG = 0, _CLEAN_UP_IMAGES = 1, _AUTO_OPEN_PREVIEW_ = 1, ENABLE_SAVE_SETTINGS=0, - ENABLE_OVERLAY= 1 + ENABLE_OVERLAY= 1, + VIDEO_ENCODER="vp9" ) { // Arguments: @@ -75,11 +77,19 @@ To use the class template. //VideoLookAtCamera#UP_DIRECTION // The direction of the up vector of the camera. // + //VideoLookAtCamera#TRANSPARENT_BACKGROUND + // Create images and videos with transparent background. + // //VideoLookAtCamera#CREATE_GIF // If set to 1, a gif will be created in addition to the video. // //VideoLookAtCamera#ENABLE_OVERLAY // If set to 1, the settings used to create the video will be saved in a file. + // + //VideoLookAtCamera#VIDEO_ENCODER + // Sets the codec used for encoding the video in FFMPEG. A few options have been + // preconfigured. "xvid" gives mp4 videos encoded with xvid which are highly compatible. + // "vp9" gives "*.webm" videos which have better quality for the size and support transparency. //VideoLookAtCamera @@ -108,7 +118,7 @@ To use the class template. /// The video codec ffmepg will use to create the video. /// Choose "libxvid" for best for compatibility (eg. with PowerPoint) /// or "libvpx-vp9" for best performance - #var AnyString VideoCodec = "libvpx-vp9"; + #var AnyString VideoCodec = ""; //VideoLookAtCamera /// This is the start frame used when creating Videos. This can be used to @@ -189,7 +199,11 @@ To use the class template. AnyFolder CheckInputs = { AnyInt VideoInputFrameRate = assert(gtfun(.VideoInputFrameRate,0), "Video Input frame rate should larger than 0"); + AnyInt deprecated_codec_member = warn(orfun(eqfun(.VideoCodec, "libvpx-vp9"), eqfun(.VideoCodec, "")), strformat("\n") +"Deprecated: The VideoLookAtCamera.VideoCodec member is deprecated. Use class argument VIDEO_ENCODER instead"); + #if VIDEO_ENCODER == "xvid" & TRANSPARENT_BACKGROUND + AnyInt warn_transparent = warn(0, strformat("\nPlease use argument VIDEO_ENCODER=" + strquote("vp9") + " to create videos that support transparency.")); + #endif }; @@ -219,7 +233,7 @@ To use the class template. #endif AnyOperationMacro ResetFilename = { - MacroStr = {"classoperation "+CompleteNameOf(..Camera.Recorder.F)+"ileName "+strquote("Reset Value")}; + MacroStr = {"classoperation "+CompleteNameOf(..Camera.Recorder.F) + "ileName " + strquote("Reset Value")}; }; }; @@ -294,6 +308,10 @@ To use the class template. #var ResetTrig = DesignVar(Off); #var AntiAlias = 16; + #if TRANSPARENT_BACKGROUND + #var TransparentBackgroundOnOff = On; + #endif + FileName = ..VideoOutputPath+ "/"+ ..VideoName + "_" + strval(..Counter , CounterFormat)+ ".png"; @@ -451,9 +469,15 @@ To use the class template. #var FileName = "cmd.exe"; #var AnyStringVar inputfile = ..VideoName + "_" + ..Camera.Recorder.CounterFormat +".png"; + + #var AnyStringVar video_extension = + #if VIDEO_ENCODER == "vp9" + ".webm"; + #else + ".mp4"; + #endif - #var AnyFileVar out_file = ..VideoOutputPath+ "/"+ ..VideoName + ".mp4"; - + #var AnyFileVar out_file = ..VideoOutputPath+ "/"+ ..VideoName + video_extension; #if ENABLE_OVERLAY #var AnyString OverLayFilter = "[bg];[1:v]scale=-2:2*trunc("+strval(..VideoResolution[1])+"*"+strval(..OverlayImageScale)+"/2)[overlay];[bg][overlay]overlay=W-w:H-h"; @@ -472,23 +496,30 @@ To use the class template. " -r " + strval(..VideoInputFrameRate) + " -start_number " + strval(..VideoStartFrame,..Camera.Recorder.CounterFormat) + " -i "+strquote(inputfile) + + #if ENABLE_OVERLAY " -i " + strquote(..OverlayImage) + + #endif " -filter_complex " + strquote("[0:v]fps="+strval(..VideoOutputFrameRate)+ ",scale=trunc(iw/(2*"+strval(InputOutputScale,"%g" )+"))*2:trunc(ih/(2*"+strval(InputOutputScale,"%g" )+"))*2" + OverLayFilter + "[outv]") + " -map [outv]" + " -an" + " -metadata comment=" + strquote("Created with the AnyBody Modeling System.") ; - #var AnyStringVar CodecArgs = " -c:v " + ..VideoCodec + " -crf " + strval(..ConstantRateFactor)+" -level 3.0 -pix_fmt yuv420p -strict experimental -movflags +faststart "; - #var AnyStringVar CodecArgs_VP9 = " -c:v libvpx-vp9" + " -crf " + strval(..ConstantRateFactor)+" -pix_fmt yuv420p -row-mt 1 "; + #var AnyStringVar CodecArgs_default = " -c:v libxvid -crf " + strval(..ConstantRateFactor)+" -level 3.0 -pix_fmt yuv420p -strict experimental -movflags +faststart "; + #var AnyStringVar CodecArgs_vp9 = " -c:v libvpx-vp9 -an -crf " + strval(..ConstantRateFactor)+" -pix_fmt yuva420p -row-mt 1 "; //-metadata:s:v:0 alpha_mode=" + strquote("1") +// #var AnyStringVar CodecArgs_VP9 = " -c:v apng" + " -crf " + strval(..ConstantRateFactor)+" -pix_fmt rgba -row-mt 1 "; #var AnyStringVar OutputArg = strquote(FilePathCompleteOf(out_file)); - #var Arguments = iffun(_DEBUG , "/K","/C") + " TITLE Creating Video && "+iffun(neqfun(..VideoCodec,"libvpx-vp9"), - ffmpegBaseArg + CodecArgs + OutputArg, - ffmpegBaseArg + CodecArgs_VP9 +" -pass 1 -f null NUL && " + ffmpegBaseArg + CodecArgs_VP9 + " -pass 2 " + OutputArg - ) ; + #var Arguments = iffun(_DEBUG , "/K","/C") + " TITLE Creating Video && " + ffmpegBaseArg + #if VIDEO_ENCODER == "vp9" + + CodecArgs_vp9 +" -pass 1 -f null NUL && " + ffmpegBaseArg + CodecArgs_vp9 + " -pass 2 -auto-alt-ref 0 " + #else + + CodecArgs_default + #endif + + OutputArg; + #var WorkDir = ..VideoOutputPath; #var Show = DesignVar(_DEBUG); };