Replicate Sony's XAVC I-S format

  • The Sony a7siii uses the "XAVC I-S" format, which is just an h.264 intra format with their own special XAVC name, from what I understand. It's a great balance of quality and editability while keeping file sizes Much smaller than ProRes.

    This is what the video portion of the format looks like with ffprobe.

    Stream #0:0[0x1](und): Video: h264 (High 4:2:2 Intra) (avc1 / 0x31637661), yuv422p10le(tv, bt709, progressive), 3840x2160 [SAR 1:1 DAR 16:9], 229419 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)

    Metadata:

    creation_time : 2023-02-09T20:24:19.000000Z

    handler_name : Video Media Handler

    vendor_id : [0][0][0][0]

    encoder : AVC Coding

    Ideally, I'd like to render things fairly quickly. The camera is obviously doing this in real-time. Of course, it's also doing this using 230MB/s. I assume I could achieve something a Bit smaller if it doesn't have to encode in real-time.

    Many of these settings are a bit daunting to me. From my understanding, intra formats are only i-frames?

    I see the 444 general purpose 10bit prores alternative, but there are quite a few settings being used that I was surprised to see in use like Noise Reduction. But I don't know, maybe ProRes Does that?

    So how do I get Intra frame? Can I just change the I-P ratio to 1.0? Is that forcing only i-frames?

    If I'm being dumb, no need to point that out. I'm aware :rolleyes:

    I'm just trying to store some time lapse image sequences into a single format to save a bit of space, but keep editing nice and easy. The images are 37.7GB. ProRes LT is 37.7GB. I'd Like to get that between 4-16GB and still have something that I can scrub the timeline in Premiere without hanging. Also, the frames are 5568x4176. ProRes and the images scrub fine, like butter. The computer is sufficient. I often edit RED 8k raw footage, just because that's what I'm given (we don't have that camera). So the sponginess from the footage is definitely coming from the compression format. That sony footage slides around incredibly smooth as well, and from what I'm reading, Intra formats are the way to go if you want to edit h.264 footage.

    Ideally, I'd use CUDA to render also. It seems to be Quite a bit faster. But it also looks to be much more limited in the options available.

  • Vouk 9. Februar 2023 um 22:38

    Hat das Thema freigeschaltet.
  • Well, I've had to move back to just regular media encoder for now, but I'd still like to figure this out. AME was rendering the 5:30 footage in about 22 minutes, where voukoder was taking much longer.

    I've got timelapse footage that is 5568x4176. Already, ffmpeg won't let you use Cuda for that, so neither will Voukoder right? But my graphics card, nvidia 3080 Ti, can output and encode at least 6k. But maybe not in h.264.

    I ended up using AME, using Main 10, High Tier, and a key frame distance of 1, H.265. After importing that footage into a NLE, it feels just as smooth as ProRes. I thought H.265 was more demanding, so I was surprised that footage was so smooth.

    That being said, even with the "Render at Maximum Depth" checkbox, the footage is limited to 4.2.0, but the original is 4.2.2

    For Voukoder, I looked at all of the H.264 codecs, but found that the (x264) codec had the most options. I know many options only show up if you have another option selected, but I hadn't been able to get a key frame interval to appear.

    But ideally, I'd want to use GPU to render, so now I'm looking at HEVC (NVIDIA NVENC).

    From seeing what is available in Voukoder 12.2, if I want YUV422, I'll actually have to use YUV444. Is that correct?

    But I still can't figure out how to get all i-frames. I've done that in ffmpeg, using H.265, which doesn't limit me to 4096 width, but I have to use yuv444 there as well. But also, there's something else to making the video smooth in Premiere because I Did get all i-frames, and the correct bit depth, and I'm not losing to yuv420, but it's still not smooth when moving the playhead around, and that's the goal...to keep a decent the color info in tact, and just control the compression quality and resolution to control the size. This way, it would work really well for ProRes alternatives in terms of Actual editability, and also for scrubbing with smaller proxies.

  • Thank you. That worked, sort of. Voukoder still won't let me export video with my graphics card if the footage is wider than 4096. That seems to be true in ffmpeg for h.264, but not for h.265 with hevc_nvenc

    But also, it didn't fix the issue I'm having with Premiere. But this is likely an ffmpeg question at this point.

    Something about the export, premiere just doesn't like. It Works, but it doesn't scrub smoothly. I'll let you know if I figure that one out eventually. With XAVC S-I becoming a more popular edit format, I think we'll see more and more professionals preferring it since it Significantly reduces our storage issues.

  • Anything over 10-bit 4:2:0 is not going to work with GPU decoding (unless you use an Intel IGPU or ARC card) on the HEVC side or over 8-bit 4:2:0 on the AVC side so that might be source of poor playback performance. GPU makers have moved on to support for HEVC and newer formats.

    What H.264 and H.265 Hardware Decoding is Supported in Premiere Pro?
    Premiere Pro supports hardware-based decoding for H.264 and H.265 (HEVC) which can significantly improve performance with these codecs, but not all "flavors"…
    www.pugetsystems.com
    • Offizieller Beitrag

    I never understood why lossy and high compressed formats became so popular as intermediate codecs. Yes, they save space and money but it's a pain to edit and work with them. Imagine to work with MagicYUV or ProRes ... scrubbing is so much with these codecs. Once cutting is finished export them as h264 or AV1 as the final file.

    People have already asked me why Premiere can't import AV1. It'll be even worse to work with it ...

  • To encode XAVC I using ffmpeg, you need to have the following command line

    ffmpeg.exe -i input -c:v libx264 -avcintra-class 480 -pix_fmt yuv422p10le -preset ultrafast -x264opts avcintra-flavor=sony -c:a pcm_s24le -ar 48k output.mxf