Nodes/fxai-toolkit/凤希AI - 视频转VR
ComfyUI Node

凤希AI - 视频转VR

视频转VR actually just re-wraps your flat video for a headset — here's the honest version

By fxai666·Created 4 months ago·Updated 3 days ago· 35
凤希AI - 视频转VR
    • VR视频路径
    • 保存目录
    视频文件夹路径
    视频索引0
    保存目录VR
    视频序号0
    VR模式180°沉浸
    输出宽度4096
    帧率FPS24
    编码方式CPU-x264

    FxAiVideoToVR (凤希AI - 视频转VR) is the last node in a long-video pipeline: you've generated a flat mp4, and now you want a copy your headset will actually play. It grabs a video from a folder and re-encodes it into one of four VR-friendly layouts using ffmpeg. It ships in the 凤希全能 (fxai-toolkit) pack alongside the segmenters, generators, and mergers, and it sits at the very end - a "produce a VR copy" step, not a generation step.

    Let's get the important thing out of the way, because the name oversells it. This is not a 3D conversion. There's no depth estimation, no stereo warping, no AI anywhere in the code. You feed it a flat 2D video and you get back a video formatted so a VR player treats it as a sphere. The "VR" here means layout, not three-dimensionality. Both eyes see the same frame. That's the honest ceiling of every tool that just remaps flat footage, and people who expect real depth end up disappointed.

    How it works

    Under the hood it's a thin wrapper around ffmpeg. The node picks a file out of your folder, then runs one of four filter chains depending on which VR模式 you chose:

    • 左右分屏SBS / 上下分屏OU - duplicate the frame and stack it side-by-side or over-under, the classic "same picture in both eyes" formats. The source comment about "completely restoring your original, no forced resolution, no stretching" is relevant here: it scales to exactly your requested width instead of letterboxing.
    • 180°沉浸 - wraps the flat image onto a half-dome (180° horizontal and vertical) using ffmpeg's v360 filter and tags the stream as equirectangular.
    • 360°影院 - the same wrap, full 360° sphere.

    Audio gets re-encoded to AAC 192k and +faststart is set so headsets can start playing before the file is fully buffered. It calls system ffmpeg (checking ComfyUI's bundled copy first, falling back to ffmpeg in PATH) and runs it as a subprocess - nothing is loaded into VRAM, which is why it's so light.

    The inputs that matter

    • 视频文件夹路径 and 视频索引 - point at a folder; the node lists video files in sorted order and converts the one at the index (0 is the first). So this doubles as a cheap batch tool: hook the index to a loop and walk the whole folder.
    • VR模式 - the dropdown above. Default is 180°沉浸, and it's the one most headset users actually want for a seated/standing view.
    • 输出宽度 - default 4096, which makes a 4096×2048 equirectangular frame. That's the sweet spot for Quest-class headsets, but see the note below before you encode it on CPU.
    • 编码方式 - CPU-x264 (default), GPU-NVENC, or HEVC-x265. x264 at CRF 18 looks great; NVENC is dramatically faster; x265 is the smaller-file option if your headset decodes HEVC.

    Two more, lower-stakes: 保存目录 sets a subfolder under ComfyUI/fxai/video/ (default VR), and 视频序号 names the output - leave it at 0 and it auto-numbers to the next free slot like 000_vr.mp4.

    Outputs

    Two strings: VR视频路径 (the full path to the finished mp4) and 保存目录. Feed the path into anything that needs a filename - a preview node, a save node, or just read it and open the file yourself.

    Installing it

    This is one node in the fxai-toolkit pack, so install the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fxai666/fxai-toolkit
    

    then restart ComfyUI - or skip all that and search "fxai-toolkit" in ComfyUI Manager. The pack auto-installs soundfile and psutil on first import (harmless; this node doesn't need either). What it does need is a system ffmpeg with the v360 filter, i.e. a reasonably modern build - the ancient one in your Linux distro's repos may not have it.

    Where people get burned

    • Outputs go to ComfyUI/fxai/video/, not your normal output folder. New users hunt for the file and it's sitting in a pack-specific subdirectory.
    • Silent failures. On any error the node just prints to the console and returns empty strings for both outputs. If your path strings come back empty, check the terminal - that's the only place the actual ffmpeg error lives.
    • 4096-wide x264 on CPU is slow. A 10-minute video will take a while. If you're just previewing, drop 输出宽度 to 2048 or switch to GPU-NVENC.
    • Missing ffmpeg throws the same empty-output failure. ffmpeg -version in a terminal should confirm you've got a build new enough for v360 (ffmpeg -filters | grep v360).

    One quirk worth knowing: the source carries a comment about fixing a "yellow picture" in 180° conversion - older flat-to-180 pipelines sometimes output a discolored/wrong-fov frame, and this node's filter chain sidesteps that. For a mono VR copy of your finished video, it's the one you'd reach for. Just don't expect actual depth.

    Category凤希AI/视频

    Inputs (8)

    NameTypeDefaultDescription
    视频文件夹路径STRING
    视频索引INT0
    保存目录STRINGVR
    视频序号INT0
    VR模式COMBO180°沉浸4 options: 左右分屏SBS, 上下分屏OU, 180°沉浸, 360°影院
    输出宽度INT4096512–16384
    帧率FPSINT24
    编码方式COMBOCPU-x2643 options: CPU-x264, GPU-NVENC, HEVC-x265

    Outputs (2)

    NameTypeDescription
    VR视频路径STRING
    保存目录STRING