VideoHelp Forum

+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member
    Join Date
    Mar 2023
    Location
    Switzerland
    Search PM
    Hi all

    I'm working on a 10sec animation made in AE. It's for a gang advertising shown around a football field.
    My issue: The agency asks for a MP4 or MOV file (H264) in the format 24800 x 90 px (!). When exporting my animation out of AE it reduces the size to 16384 x 58 px.

    Is there a work around? How can I export the animation in full size?

    Thank you very much for your help!
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    That is not really possible with your current setup.

    The h264 codec's resolution capabilities is governed by the choice of "Level".
    ref: https://en.wikipedia.org/wiki/Advanced_Video_Coding
    However, even at its highest level setting (6.2), the max listed is 8,1924,320. Now underlying this is decode bitrate/buffer constraints, so it MIGHT be possible to expand one dimension and reduce another and still stay within the max bitrate constraint, but you would have to find a specific encoder the could handle this. It sounds like the standard one used by AE (MainConcepts still?) cannot.

    In checking, I see this interesting conversation over in reddit: https://www.reddit.com/r/editors/comments/255bvb/h264_resolution_limits_and_some_strange_led_specs/. This makes me think that you should either give them pieces to stitch together, or you should give them a complete clip in a dfferent codec, which the client/agency should TELL you how they have successfully gotten to use previously.

    Scott
    Last edited by Cornucopia; 28th Mar 2023 at 17:31. Reason: typo
    Quote Quote  
  3. Member
    Join Date
    Mar 2023
    Location
    Switzerland
    Search PM
    Hi Scott

    Thank you for your answer and your help!
    I'll go through the reddit discussion and will contact the agency anyway.
    If I have a solution I will post it here.
    Quote Quote  
  4. However, even at its highest level setting (6.2), the max listed is 8,1924,320
    Looking at https://en.wikipedia.org/wiki/Advanced_Video_Coding#Levels
    Level 6.2 allows 139 264 frame size (macro blocks)
    81924320 are 512*270 = 138 240 macro blocks.
    24800x90 are 1150*6 = 9300 macro blocks
    Level 6.2 allows a maximum decoding speed (macroblocks/s) of 16 711 680
    So, for 81924320 with 138 240 macro blocks that are 120fps.
    For 24800x90 with 9300 macro blocks that are 1796 fps.

    The problem issue is not the standard, but finding an encoder which supports such a high resolution.
    As far as I know, at least x264 will abort if either width or height are >= 16834.
    => one would need a modified x264 version or another H.264 encoder which supports such resolutions.
    side notes:
    • iirc. x265 stops at when either width or height are above 8192 , not sure whether this is a restriction by the x265 folks or through the standard (later is unlikely, but possible)
    • decoding such a stream might also be tricky, since most hardware decoders probably won't support such a resolution either.

    Small follow-up, adjusting:
    https://code.videolan.org/videolan/x264/-/blob/master/x264cli.h#L35
    and
    https://code.videolan.org/videolan/x264/-/blob/master/encoder/encoder.c#L467
    in x264 is probably enough to support this.



    Cu Selur
    Last edited by Selur; 28th Mar 2023 at 12:10.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. The x264 command line encoder can deal with 24800x58. The version I have can't output to MP4 so I output to MKV, then remuxed with ffmpeg to MP4. I created a 24800x58 source using AviSynth:

    Code:
    "g:\program files\x264\x264-64bit.exe" --preset=veryfast --crf=18 --sar=1:1 --slices 250 --keyint 50 --colormatrix smpte170m --range=tv --stitchable --output "intermediate.mkv" "24800x58.avs"
    ffmpeg -i "intermediate.mkv" -c:v copy "output.mp4"
    Image Attached Files
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    @jagabo, does it work with the 24800x90 that the OP was wanting?
    Also, is that a standard build of CLI x264?

    Scott
    Quote Quote  
  7. Originally Posted by Cornucopia View Post
    @jagabo, does it work with the 24800x90 that the OP was wanting?
    Oops. I got the numbers mixed up. Yes, it works with 24800x90 too. Sample attached.

    Code:
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L6.2
    Format settings                          : CABAC / 4 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 4 s 0 ms
    Bit rate                                 : 20.2 Mb/s
    Width                                    : 24 800 pixels
    Height                                   : 90 pixels
    Display aspect ratio                     : 275.556
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.362
    Stream size                              : 9.64 MiB (100%)
    Writing library                          : x264 core 157 r2969 d4099dd
    Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=3 / lookahead_threads=1 / sliced_threads=0 / slices=6 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=50 / keyint_min=5 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Language                                 : English
    Color range                              : Limited
    Matrix coefficients                      : BT.601
    Codec configuration box                  : avcC
    Note that ffmpeg refuses to encode the video directly with libx264, complaining that the max width is 16384.

    Originally Posted by Cornucopia View Post
    Also, is that a standard build of CLI x264?
    I believe so. I haven't updated it in a long time. It's from 2019 and says "x264 core:157 r2969 d4099dd" on startup.
    Image Attached Files
    Last edited by jagabo; 28th Mar 2023 at 19:27.
    Quote Quote  
  8. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Cool! Yeah, I would not be surprised if the 16k max was hardcoded into libx264.

    With the CLI x264 and ffmpeg to mux/remux, it shouldn't be too hard for the OP to export lossless from AE, encode to h264, and end up in mp4. Though, one would expect the OP's client to specify asset specs & valid workflows ahead of time. That's just the professional way of doing business.

    <Edit>Plus, I would still want them to clarify that they can take Level 6.2.


    Scott
    Quote Quote  
  9. Current x264 cli with:
    Code:
    ffmpeg -y -loglevel fatal -noautorotate -i "G:\TestClips&Co\test.avi" -map 0:0 -an -sn -vf scale=24800:90,zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -sws_flags spline -f rawvideo - | x264 --crf 18.00 --profile high --level 5.2 --vbv-maxrate 300000 --vbv-bufsize 300000 --sar 1:1 --non-deterministic --range tv --colormatrix bt470bg --demuxer raw --input-res 24800x90 --input-csp i420 --input-range tv --input-depth 8 --fps 25/1 --output-depth 8 --output "J:\tmp\2023-03-29@04_02_53_9410_01.264" -
    shows:
    Code:
    raw [info]: 24800x90p 1:1 @ 25/1 fps (cfr)
    x264 [error]: invalid width x height (24800x90)
    for me. (same when removing '--profile high --level 5.2 --vbv-maxrate 300000 --vbv-bufsize 30000')
    Using y4mpegpipe instead of raw input:
    Code:
    ffmpeg -y -loglevel fatal -noautorotate -i "G:\TestClips&Co\test.avi" -map 0:0 -an -sn -vf scale=24800:90,zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0 -sws_flags spline -f yuv4mpegpipe - | x264 --crf 18.00 --profile high --level 5.2 --vbv-maxrate 300000 --vbv-bufsize 300000 --sar 1:1 --non-deterministic --range tv --colormatrix bt470bg --demuxer y4m --fps 25/1 --output-depth 8 --output "J:\tmp\2023-03-29@04_02_53_9410_01.264" -
    gives the same.


    https://code.videolan.org/videolan/x264/-/commit/7923c5818b50a3d8816eed222a7c43b418a73b36
    added the limitation.

    Cu Selur

    Ps.: added a post over at doom9s 'x264 development'-thread.
    PPs.: iirc level 6.0-6.2 should be supported by x264. (Hybrid doesn't atm. since I never needed it. )
    Last edited by Selur; 28th Mar 2023 at 21:24.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  10. Argh, I forgot about H.264s
    f) PicWidthInMbs <= Sqrt( MaxFS * 8 )
    g) FrameHeightInMbs <= Sqrt( MaxFS * 8 )
    restriction. Which for The highest MaxFS, on Level 6(.1/.2) is 139264 macro blocks, so both frame width and height are allowed to be at most sqrt(139264 * 8) = 1055 Mbs or 16880 pix.
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads