Multiple FFmpeg output streams from single render

  • Need to render the same project in Vegas Pro into multiple output formats (h.265, h.264, MPEG2 DVD, AVC Bluray, AC-3 audio). Biggest bottleneck is Vegas' rendering itself, not the encoding. Any way to allow Vegas to render to a single high-quality stream, and encode that single stream simultaneously into multiple formats using Voukoder?

    Hardware is not a limitation here, but Vegas is. Duplicating the rendering workload seems completely pointless to me.

  • Vouk 5. August 2022 um 07:20

    Hat das Thema freigeschaltet.
  • In that case you can even skip Voukoder, just render a lossless footage and write multiple commands in a batch file (asuming you are on Windows) to use x265/x264/SVT-AV1/QAAC encoders one by one, and multiplex with ffmpeg, roughly such as:

    Code
    ::Video Encode
    ffmpeg -i "Sequence 01.mp4" -an -f yuv4mpegpipe -strict unofficial - | x265.exe --y4m - --output "v0.100.hevc"
    
    ::Audio Encode
    qaac64.exe --cvbr 320 -b 16 -r 44100 --threading -o "v0.100.aac" "Sequence 01.wav"
    
    ::Multiplex
    D:\ffmpeg.exe -i "v0.100.hevc" -i "v0.100.aac" -c copy "Complete_Product.mp4"
  • PlasmPlayer and iAvoe:

    The problem is that Vegas itself takes a lot of horsepower to render the raw frames, and this is needlessly duplicated if I need to have the same render encoded as 3-4 different formats. Vegas renders the raw frame, then encodes it to whatever format you specify.

    No point in Vegas rendering the identical raw frame 3-4 times, which is what a batch render or script would do. This is extremely inefficient in a big render/encode op that takes many hours.

    Einmal editiert, zuletzt von Joe24 (25. Dezember 2022 um 06:51)

  • PlasmPlayer and iAvoe:

    The problem is that Vegas itself takes a lot of horsepower to render the raw frames, and this is needlessly duplicated if I need to have the same render encoded as 3-4 different formats. Vegas renders the raw frame, then encodes it to whatever format you specify.

    No point in Vegas rendering the identical raw frame 3-4 times, which is what a batch render or script would do. This is extremely inefficient in a big render/encode op that takes many hours.

    Yep, that's why I suggest you to export first, and then encode into different formats

  • Yep, that's why I suggest you to export first, and then encode into different formats

    You suggest that I export 19 hrs of uncompressed 1080p video . . . okay, let's run some numbers, shall we?

    Ignoring the PCM audio stream, at 100MiB/s uncompressed video-only data rate, that's around 6.2 TiB of data. A SUSTAINED write speed of 1.4 GiB/s would be needed to store the data fast enough (more on that in a minute). That's a respectable hard drive!

    As is, let's take a 7-hr block of video for example (a pair of 3.5 hr videos). I currently run 4 instances of Vegas in parallel (dual-CPU system). Each instance of Vegas is running Voukoder and hardware-encoding the output. The first 2 Vegas instances are encoding the first 3.5 hr video to 2 different formats, and the second 2 Vegas instances are encoding the second 3.5 hr video to 2 different formats. This all completes in 1h55m.

    A tandem-encode function in Voukoder would drop the render/encode time to about 1 hr. GPU hardware is not an issue; I would throw a second card at it, which would more than keep up. Vegas would have literally half the work to do: 2 renders instead of 4.

    So this 'ideal' 1 hr render/encode time is what we're trying to match by using your 'suggestion of exporting first, then encoding'.

    To do this 1 hr render/encode in the way you've suggested, let's say we spend 30 min rendering our master file (2.4 TiB written at 1.4 GiB/s on our amazing hard drive), and then we spend another 30 min encoding. Total time 1 hr. Except that Vegas would take 1 hr just to render the master file. And Vegas is not currently using any compression (it's just firing the raw frames to Voukoder), so Vegas render times are as fast as possible already.

    But maybe you could reduce the impact of the data size by adding some lightweight fast compression, right? Explain to me how you would manage to double Vegas' render speed . . . while adding file compression. Even if you used a compression format that Voukoder offers, you still would need to DOUBLE Vegas' render speed to make your idea work. As mentioned, Vegas is rendering as fast as possible already.

    All that . . . just to match what a tandem encode function in Voukoder could do.

    Yep.

    12 Mal editiert, zuletzt von Joe24 (13. Januar 2023 um 11:56)