0

h264 codec on osx not working ?

I'm new to the software but i'm trying to convert a sequence of exr frames with RVIO to a h264 quicktime movie. While the default quicktime agrument seems to be working and giving the proper output, adding the -codec switch and then the name of the codec i want to use results in an error. Even the example form the manual does not seem to be working. 

 

The example from the manual is as follows: 

 

rvio foo.#.tga -codec H.264 -outkeyinteval 20 \

       -outdatarate 2500000 -o foo.mov -quality 1.0

 

I change it to 

 

rvio *.exr -codec H.264 -outkeyinteval 20 \

       -outdatarate 2500000 -o foo.mov -quality 1.0

 

and get the following message: 

rvio *.exr -codec H.264 -outkeyinteval 20 -outdatarate 2500000 -o foo.mov -quality 1.0

unrecognized arg: -outkeyinteval

use the -help option for usage information

 

changing the command to:

rvio -v  *.exr -codec H.264 -scale 0.25 -out709 -o test.mov 

 

produces the following error:

/Applications/RV64.app/Contents/MacOS/rvio

Version 3.10.11, built on Feb 24 2011 at 20:52:52 (64bit). (L)

Copyright (c) 2008-2011 Tweak Software. All rights reserved.

INFO: exr requires plugin io_exr.dylib

INFO: shot4_0-192#.exr

INFO: mov requires plugin mio_libquicktime.dylib

INFO: writing test.mov

INFO: output compressor H.264

INFO: output codec H.264

ERROR: Unsupported video codec: H.264

 

Any tips would be great

5 comments

  • 0
    Avatar
    Jim Hourihan

    Hi D2, first of all if you downloaded the mac 64 3.10.11 soon after it was announced you may want to delete it and re-download it. We had a problem with the build/uploads which created some problems. If you get it again now it should be ok.

    The codec situation is still complex for rvio with respect to platform support. As of 3.10.11 it looks like this:

    32 bit mac: apple quicktime encoding/decoding. H.264 encoding works but is not great. Use the codec name "avc1" (this is the actual name of the H.264 video codec)

    64 bit mac: uses ffmpeg+libquicktime and in 3.10.11 x264 for H.264 encoding. For this use -codec x264. There are a lot of options for x264 and getting the color output correct can be tricky with H.264 encoded files for use in other players. More on this below.

    32 bit windows: similar to 32 bit mac. Uses apple quicktime

    64 bit windows: no movie encoding or decoding currently

    64 bit linux: ffmpeg + libquicktime encoding using x264. Similar to mac 64 use -codec x264

    So in your case -- which looks like its 64 bit mac -- you can x264 to do the encoding. This is brand new so we have no UI or docs on it yet. We literally got it in with hours to go. So you can try this:

    rvio_hw -codec x264 -o test_h264.mov -outsrgb  -v *.exr

    that will produce a variable rate h264 movie file with no colr or gama atom. The -outkeyinterval, etc, are not used by x264 since it has its own parameters, but we'll look at hooking it up somehow.  Its possible to have it create a colr atom too, but it looks like the quicktime player does not agree with rv regarding the correct color from x264 -- we'll try and figure out why that is.

    You can control the bitrate with x264 by doing this:

    rvio_hw -codec x264 -o test_h264.mov -outsrgb  -v *.exr -outparams x264_i_bitrate=N

    where N is in kilobits/sec. The default value (0) means use a variable rate. The x264 settings can be added to the command line like

    -outparams x264_...=something x264_...=something 

    etc, etc. Here are all of the possible -outparam settings:

     

    x264_i_keyint_max :: Maximum GOP size (int, default=250)
    x264_i_keyint_min :: Minimum GOP size (int, default=25)
    x264_i_scenecut_threshold :: How aggressively to insert extra I-frames (int, default=40)
    x264_i_bframe :: Number of B-frames between I and P (int, default=0)
    x264_i_bframe_adaptive :: Adaptive B-frame decision (string, default="Fast", values="None","Fast","Trellis")
    x264_i_bframe_bias :: Influences how often B-frames are used (int, default=0)
    x264_i_bframe_pyramid :: Keep some B-frames as references (int, default=0)
    x264_i_rc_method :: Ratecontrol method:
            Constant quality: Specify a quantizer parameter below
            Average bitrate: Specify a bitrate below
            CRF based VBR: Specify a rate factor below
            Selecting 2-pass encoding will force Average bitrate. (string, default="Constant quality", values="Constant quality","Average bitrate","CRF based VBR")
    x264_i_bitrate :: Bitrate in kbit/s. 0 means VBR (recommended) (int, default=0)
    x264_f_rate_tolerance :: Allowed variance of average bitrate (float, default=1)
    x264_i_vbv_max_bitrate :: Sets a maximum local bitrate in kbits/s. (int, default=0)
    x264_i_vbv_buffer_size :: Averaging period for the maximum local bitrate. Measured in kbits. (int, default=0)
    x264_f_vbv_buffer_init :: Sets the initial VBV buffer occupancy as a fraction of the buffer size. (float, default=0.9)
    x264_f_psy_rd :: Strength of psychovisual optimization: RD (requires Partition decision >= 6) (float, default=1)
    x264_f_psy_trellis :: Strength of psychovisual optimization (requires trellis) (float, default=0)
    x264_b_mb_tree :: Macroblock-tree ratecontrol (int, default=1)
    x264_i_lookahead :: Number of frames for frametype lookahead (int, default=40)
    x264_f_rf_constant :: This selects the nominal quantizer to use (1 to 51). Lower values result in better fidelity, but higher bitrates. 26 is a good default value. 0 means lossless. (float, default=26)
    x264_i_qp_constant :: This selects the quantizer to use (1 to 51). Lower values result in better fidelity, but higher bitrates. 26 is a good default value. 0 means lossless. (int, default=26)
    x264_i_qp_min :: Minimum quantizer parameter (int, default=10)
    x264_i_qp_max :: Maximum quantizer parameter (int, default=51)
    x264_i_qp_step :: Maximum quantizer step (int, default=4)
    x264_f_ip_factor :: QP factor between I and P (float, default=1.4)
    x264_f_pb_factor :: QP factor between P and B (float, default=1.3)
    x264_i_aq_mode :: Adaptive quantization (string, default="None", values="None","Variance AQ (complexity mask)","Autovariance AQ (experimental)")
    x264_f_aq_strength :: Adaptive quantization strength:
            Reduces blocking and blurring in flat and
            textured areas (float, default=1)
    x264_analyse_8x8_transform :: 8x8 transform (int, default=0)
    x264_analyse_psub16x16 :: 8x16, 16x8 and 8x8 P-frame search (int, default=1)
    x264_analyse_bsub16x16 :: 8x16, 16x8 and 8x8 B-frame search (int, default=1)
    x264_analyse_psub8x8 :: 4x8, 8x4 and 4x4 P-frame search (int, default=0)
    x264_analyse_i8x8 :: 8x8 Intra search requires 8x8 transform (int, default=1)
    x264_analyse_i4x4 :: 4x4 Intra search (int, default=1)
    x264_i_me_method :: Motion estimation method
           Diamond search: fastest
           Hexagonal search: default setting
            Uneven Multi-Hexagon: better but slower
            Exhaustive search: extremely slow, primarily for testing (string, default="Hexagonal search", values="Diamond search","Hexagonal search","Uneven Multi-Hexagon","Exhaustive search","Hadamard exhaustive search (slow)")
    x264_i_subpel_refine :: Subpixel motion estimation and partition decision quality: 1=fast, 9=best. (int, default=5)
    x264_i_me_range :: Maximum distance to search for motion estimation, measured from predicted position(s).             Default of 16 is good for most footage, high motion sequences may benefit from settings between 24-32. (int, default=16)
    x264_i_frame_reference :: This is effective in Anime, but seems to make little difference in live-action source material. Some decoders are unable to deal with large frameref values. (int, default=1)
    x264_b_chroma_me :: Chroma motion estimation (int, default=0)
    x264_b_mixed_references :: Allow each MB partition in P-frames to have it's own reference number (int, default=0)
    x264_b_weighted_bipred :: Implicit weighting for B-frames (int, default=0)
    x264_i_direct_mv_pred :: Direct MV prediction mode (string, default="Spatial", values="None","Spatial","Temporal","Auto")
    x264_b_deblocking_filter :: Use deblocking loop filter (increases quality). (int, default=1)
    x264_i_deblocking_filter_alphac0 :: Loop filter AlphaC0 parameter (int, default=0)
    x264_i_deblocking_filter_beta :: Loop filter Beta parameter (int, default=0)
    x264_b_cabac :: Enable CABAC (Context-Adaptive Binary Arithmetic Coding). Slightly slows down encoding and decoding, but should save 10-15% bitrate. (int, default=1)
    x264_i_trellis :: Trellis RD quantization. Requires CABAC. Can be enabled either for the final encode of a MB or for all mode desisions (string, default="Disabled", values="Disabled","Enabled (final)","Enabled (always)")
    x264_i_noise_reduction :: Noise reduction (int, default=0)
    x264_i_threads :: Number of threads (int, default=1)

     

    x264_i_keyint_max :: Maximum GOP size (int, default=250)
    x264_i_bframe :: Number of B-frames between I and P (int, default=0)
    x264_i_bframe_adaptive :: Adaptive B-frame decision (string, default="Fast", values="None","Fast","Trellis")
    x264_i_bframe_bias :: Influences how often B-frames are used (int, default=0)
    x264_i_bframe_pyramid :: Keep some B-frames as references (int, default=0)
    x264_i_rc_method :: Ratecontrol method:
    Constant quality: Specify a quantizer parameter below
    Average bitrate: Specify a bitrate below
    CRF based VBR: Specify a rate factor below
    Selecting 2-pass encoding will force Average bitrate. (string, default="Constant quality", values="Constant quality","Average bitrate","CRF based VBR")
    x264_i_bitrate :: Bitrate in kbit/s. 0 means VBR (recommended) (int, default=0)
    x264_f_rate_tolerance :: Allowed variance of average bitrate (float, default=1)
    x264_i_vbv_max_bitrate :: Sets a maximum local bitrate in kbits/s. (int, default=0)
    x264_i_vbv_buffer_size :: Averaging period for the maximum local bitrate. Measured in kbits. (int, default=0)
    x264_f_vbv_buffer_init :: Sets the initial VBV buffer occupancy as a fraction of the buffer size. (float, default=0.9)
    x264_f_psy_rd :: Strength of psychovisual optimization: RD (requires Partition decision >= 6) (float, default=1)
    x264_f_psy_trellis :: Strength of psychovisual optimization (requires trellis) (float, default=0)
    x264_b_mb_tree :: Macroblock-tree ratecontrol (int, default=1)
    x264_i_lookahead :: Number of frames for frametype lookahead (int, default=40)
    x264_f_rf_constant :: This selects the nominal quantizer to use (1 to 51). Lower values result in better fidelity, but higher bitrates. 26 is a good default value. 0 means lossless. (float, default=26)
    x264_i_qp_constant :: This selects the quantizer to use (1 to 51). Lower values result in better fidelity, but higher bitrates. 26 is a good default value. 0 means lossless. (int, default=26)
    x264_i_qp_min :: Minimum quantizer parameter (int, default=10)
    x264_i_qp_max :: Maximum quantizer parameter (int, default=51)
    x264_i_qp_step :: Maximum quantizer step (int, default=4)
    x264_f_ip_factor :: QP factor between I and P (float, default=1.4)
    x264_f_pb_factor :: QP factor between P and B (float, default=1.3)
    x264_i_aq_mode :: Adaptive quantization (string, default="None", values="None","Variance AQ (complexity mask)","Autovariance AQ (experimental)")
    x264_f_aq_strength :: Adaptive quantization strength:
    Reduces blocking and blurring in flat and
    textured areas (float, default=1)
    x264_analyse_8x8_transform :: 8x8 transform (int, default=0)
    x264_analyse_psub16x16 :: 8x16, 16x8 and 8x8 P-frame search (int, default=1)
    x264_analyse_bsub16x16 :: 8x16, 16x8 and 8x8 B-frame search (int, default=1)
    x264_analyse_psub8x8 :: 4x8, 8x4 and 4x4 P-frame search (int, default=0)
    x264_analyse_i8x8 :: 8x8 Intra search requires 8x8 transform (int, default=1)
    x264_analyse_i4x4 :: 4x4 Intra search (int, default=1)
    x264_i_me_method :: Motion estimation method
    Diamond search: fastest
    Hexagonal search: default setting
    Uneven Multi-Hexagon: better but slower
    Exhaustive search: extremely slow, primarily for testing (string, default="Hexagonal search", values="Diamond search","Hexagonal search","Uneven Multi-Hexagon","Exhaustive search","Hadamard exhaustive search (slow)")
    x264_i_subpel_refine :: Subpixel motion estimation and partition decision quality: 1=fast, 9=best. (int, default=5)
    x264_i_me_range :: Maximum distance to search for motion estimation, measured from predicted position(s). Default of 16 is good for most footage, high motion sequences may benefit from settings between 24-32. (int, default=16)
    x264_i_frame_reference :: This is effective in Anime, but seems to make little difference in live-action source material. Some decoders are unable to deal with large frameref values. (int, default=1)
    x264_b_chroma_me :: Chroma motion estimation (int, default=0)
    x264_b_mixed_references :: Allow each MB partition in P-frames to have it's own reference number (int, default=0)
    x264_b_weighted_bipred :: Implicit weighting for B-frames (int, default=0)
    x264_i_direct_mv_pred :: Direct MV prediction mode (string, default="Spatial", values="None","Spatial","Temporal","Auto")
    x264_b_deblocking_filter :: Use deblocking loop filter (increases quality). (int, default=1)
    x264_i_deblocking_filter_alphac0 :: Loop filter AlphaC0 parameter (int, default=0)
    x264_i_deblocking_filter_beta :: Loop filter Beta parameter (int, default=0)
    x264_b_cabac :: Enable CABAC (Context-Adaptive Binary Arithmetic Coding). Slightly slows down encoding and decoding, but should save 10-15% bitrate. (int, default=1)
    x264_i_trellis :: Trellis RD quantization. Requires CABAC. Can be enabled either for the final encode of a MB or for all mode desisions (string, default="Disabled", values="Disabled","Enabled (final)","Enabled (always)")
    x264_i_noise_reduction :: Noise reduction (int, default=0)
    x264_i_threads :: Number of threads (int, default=1)
  • 0
    Avatar
    Frank Rueter

    thanks for that Jim. I marked this post bright red in my inbox as I know I will come back to it very soon and re-adjust my publishing to use this.

    So when are you guys are going to come up with a reliable video format to replace quicktime? ;)

  • 0
    Avatar
    Jim Hourihan

    Holy C$#P I don't know what's worse -- quicktime or the edit box for these comments!

    I think if we tried to replace quicktime it would have to be in conjunction with a lot other interested parties. Open source it, etc. It might be worth making a thread someplace (maybe in a more reputable website!) for a wish list. I have a good list going myself.

    Personally, I would be glad to contribute to such an effort. I have a prototype for something from a while back which used GTO as the base, but I think there are probably better alternatives now.

      -Jim

  • 0
    Avatar
    Frank Rueter

    I reckon whoever comes up with such a format should have the Academy's technical achievement award reserved in their name(s) for the next decade.

    We could take it to Apple's dev list... or maybe not...

  • 0
    Avatar
    Kirchhoffer

    Hello,

    After reading this post, i'm trying to use x264 codec on 64 bits Mac. It's working but i can't set the bitrate.

    here is my command line :

    rvio mys/image/sequence_#####.tga -fps 25 -vv -codec x264 -outparams x264_i_rc_method="Average bitrate" x264_i_bitrate=1000 -outres 640 360 -o /my/h264/quicktime.mov

    But the bitrate is always the same : 18,9 Mbits / s

     

    Thank you for your help!

Please sign in to leave a comment.