FredTungsten / ScriptPlayer

ScriptPlayer is a video player that controls the Handy and lots of other toys in sync with videos.
GNU General Public License v3.0
163 stars 72 forks source link

Feature request: Generate Preview GIF / VR perspective #243

Open Zalunda opened 2 years ago

Zalunda commented 2 years ago

The Preview Generator Settings already have an "Only use left half" option for VR but it would be nice to have a proper VR perspective available also.

I made the following change in ClipExtractorArguments.cs to "hard code" the feature. It works well. Ideally, the pitch value would be configurable.

        public override string BuildArguments()
        {
            string framerate = Framerate.ToString("F2", CultureInfo.InvariantCulture);
            var width = this.Width >= 0 ? this.Width : this.Height;
            var heigth = this.Height >= 0 ? this.Height : this.Width;

            return
                "-y " + //Yes to override existing files
                $"-ss {StartTimeSpan:hh\\:mm\\:ss\\.ff} " + // Starting Position
                $"-i \"{InputFile}\" " + // Input File
                $"-t {Duration:hh\\:mm\\:ss\\.ff} " + // Duration
                $"-r {framerate} " +
                "-vf " + // video filter parameters" +
                $"\"" +
                $"setpts=PTS-STARTPTS, hqdn3d=10" +
                $", v360=input=he:in_stereo=sbs:pitch=-30:yaw=0:roll=0:output=flat:d_fov=100:w={width}:h={heigth}" + 
                "\" " +
                "-vcodec libx264 -crf 0 " +
                $"\"{OutputFile}\"";
     }
FredTungsten commented 1 year ago

Thanks, I'll try to include this as an option after testing it - but it honestly might take some time. (Feel free to remind me like once a year or so)