Page 1 of 1

Feature Request: Thumbnail VR video files without duplicate L/R images

Posted: 21 Jan 2022, 20:22
by bfbenn@charter.net
I'm starting to collect quite a few Virtual Reality movie files.
I use VTM on just about every video I download or create. It's a fabulous utility by the way, I use it constantly. VERY reliable, as a utility should be.

When I build a thumbnail sheet for new VR videos it does work, but I end up with the images for each eye in all the thumbnails. Not only does it essentially duplicate the two images, it also messes up the aspect ratio of the individual images because of the way the videos are encoded.

It would be a real improvement if there was a way to specify the image layout of a particular VR-encoded video and have VTM parse that image and thumbnail just one of the two images. You lose the 3d effect of course, but maintaining that effect is really pointless in a 2d presentation.

I've found various workarounds for the popular viewers to show just the left or right image, depending on how it's formatted - typically either 180 degree left/right or 360 degree top/bottom (I'm sure there are other formats but those seem to be the most common). That's all well and good, but I'm not really looking to convert or view a 3D video in 2D, I just want to know what's in that video without having to actually open the video itself.

This could be a manual setting per file, but it seems to me that it should not be all that difficult to detect and adjust for these formats automatically (at least for the common formats). I don't know much about how the frames are structured in a video file, but it should be possible to automate the detection and processing required.

VTM is such a well thought-out program that there are not many "missing" features from my perspective, but the ability to properly process VR videos would be a real improvement.

I haven't found any other thumbnail utility that can do this.
It seems like it would be non-trivial but also not-impossible to implement. It also looks to me like 2022 may be the breakthrough year for VR. A utility like this could become very popular.

Re: Feature Request: Thumbnail VR video files without duplicate L/R images

Posted: 22 Jan 2022, 15:46
by admin
Thank you for your feedback.
There are a lot of 3D formats, but for the horizontal stereopair I think it is feasible to separate left and right images and use only one of them according to the current VTM settings.
Need to check.

Re: Feature Request: Thumbnail VR video files without duplicate L/R images

Posted: 07 Apr 2022, 22:38
by VictorZ
I second this request. Being able to view as single, rather than doubled images would be great. Side-by-side pairing is by far the most common.

Re: Feature Request: Thumbnail VR video files without duplicate L/R images

Posted: 21 Jan 2023, 18:16
by solanteelia
Any news on this? I'm awaiting this feature eagerly :)

Re: Feature Request: Thumbnail VR video files without duplicate L/R images

Posted: 22 Jan 2023, 10:24
by admin
It worked too slow when I tried to implement it in the past.
Maybe I should give it another try.

Re: Feature Request: Thumbnail VR video files without duplicate L/R images

Posted: 28 Jun 2024, 20:12
by marsthechemist
I have found the following solution for myself. The PowerShell script below uses ffmpeg, can handle 180° or 360°, left-right or top-bottom VR videos and creates a flattened 640x480 thumbnail image from the middle of the video in less than a second. Perhaps this would be an approach for implementation in Videonizer.

Code: Select all

$VideoDir = "D:\Videos\VR"

Get-ChildItem -Path $VideoDir -Filter *.mp4 | ForEach-Object {
    $inputFile = $_.FullName
    $inputFileInfo = [System.IO.FileInfo]::new($inputFile)
    $outputFilename = [System.IO.Path]::Combine($inputFileInfo.DirectoryName, [System.IO.Path]::ChangeExtension($inputFileInfo.Name, "jpg"))

    $middlePos = 0.5*(ffprobe -v error -show_entries format=duration -of default=nokey=1:noprint_wrappers=1 $inputFile)
    If ($inputFile.Contains("_360")) { $inputProjection = "equirect" } Else { $inputProjection = "hequirect" }
    If ($inputFile.Contains("_TB")) { $inputStereo = "tb" } Else { $inputStereo = "sbs" }

    $ffmpegCommand = "ffmpeg -ss $middlePos -i `"$inputFile`" -filter:v `"v360=input=${inputProjection}:output=flat:in_stereo=${inputStereo}:out_stereo=2d:d_fov=110:w=640:h=480`" -vframes 1 -y -f image2 `"$outputFilename`" -loglevel error"
    Invoke-Expression $ffmpegCommand
}