VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hi cats,

    usually I encode my .mxf files into mjpeg .avi's using virtualdub and the Morgan Mjpeg codec.

    For example I have my source .mxf file [C0716.MXF] that result in a .avi (Morgan Mjpeg codec) of 238 MB and the quality is good.

    But now I would try to encode the same source [C0716.MXF] using ffmpeg and his internal mjpeg codec.

    So I have try this commandline:

    Code:
    ffmpeg -i c0716.mxf -vcodec mjpeg -pix_fmt yuvj422p -q:v 0 -vtag MJPG -an c0716_q0.avi
    but result is a file of 118 MB.

    I wonder: is there a way, in ffmpeg, for improove the bitrate or the quality so I can have a resultant output of 230/250 MB file ?

    thanks
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Your -q: switch should not be 0. Evidently, valid range is 1-31 (lower being better quality).

    Scott
    Quote Quote  
  3. I tested it and: Values below 2 give the same result as 2. Values above 31 give the same result as 31.
    Quote Quote  
  4. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    You could encode every frame from the source clip to a "100%-quality" JPG image with cjpeg,
    and then use ffmpeg only for joining the re-encoded frames...

    Yes, I like to complicate things
    Quote Quote  
  5. mjpg, mpeg1video and mpeg2video in ffmpeg share same codec implementation - perhaps it is feasible to use some features to improve encoding - in past ffmpeg was capable to produce 10 bit dc mjpeg...

    Side to general option there is large list unique mjpeg options in ffmpeg (some of them have no sense (to me) at all):
    Code:
    Encoder mjpeg [MJPEG (Motion JPEG)]:
        General capabilities: threads 
        Threading capabilities: frame and slice
        Supported pixel formats: yuvj420p yuvj422p yuvj444p
    mjpeg encoder AVOptions:
      -mpv_flags         <flags>      E..V.... Flags common for all mpegvideo-based encoders. (default 0)
         skip_rd                      E..V.... RD optimal MB level residual skipping
         strict_gop                   E..V.... Strictly enforce gop size
         qp_rd                        E..V.... Use rate distortion optimization for qp selection
         cbp_rd                       E..V.... use rate distortion optimization for CBP
         naq                          E..V.... normalize adaptive quantization
         mv0                          E..V.... always try a mb with mv=<0,0>
      -luma_elim_threshold <int>        E..V.... single coefficient elimination threshold for luminance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)
      -chroma_elim_threshold <int>        E..V.... single coefficient elimination threshold for chrominance (negative values also consider dc coefficient) (from INT_MIN to INT_MAX) (default 0)
      -quantizer_noise_shaping <int>        E..V.... (from 0 to INT_MAX) (default 0)
      -error_rate        <int>        E..V.... Simulate errors in the bitstream to test error concealment. (from 0 to INT_MAX) (default 0)
      -qsquish           <float>      E..V.... how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) (from 0 to 99) (default 0)
      -rc_qmod_amp       <float>      E..V.... experimental quantizer modulation (from -FLT_MAX to FLT_MAX) (default 0)
      -rc_qmod_freq      <int>        E..V.... experimental quantizer modulation (from INT_MIN to INT_MAX) (default 0)
      -rc_eq             <string>     E..V.... Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex.
      -rc_init_cplx      <float>      E..V.... initial complexity for 1-pass encoding (from -FLT_MAX to FLT_MAX) (default 0)
      -rc_buf_aggressivity <float>      E..V.... currently useless (from -FLT_MAX to FLT_MAX) (default 1)
      -border_mask       <float>      E..V.... increase the quantizer for macroblocks close to borders (from -FLT_MAX to FLT_MAX) (default 0)
      -lmin              <int>        E..V.... minimum Lagrange factor (VBR) (from 0 to INT_MAX) (default 236)
      -lmax              <int>        E..V.... maximum Lagrange factor (VBR) (from 0 to INT_MAX) (default 3658)
      -ibias             <int>        E..V.... intra quant bias (from INT_MIN to INT_MAX) (default 999999)
      -pbias             <int>        E..V.... inter quant bias (from INT_MIN to INT_MAX) (default 999999)
      -rc_strategy       <int>        E..V.... ratecontrol method (from 0 to 1) (default ffmpeg)
         ffmpeg                       E..V.... default native rate control
         xvid                         E..V.... libxvid (2 pass only)
      -motion_est        <int>        E..V.... motion estimation algorithm (from 0 to 2) (default epzs)
         zero                         E..V....
         epzs                         E..V....
         xone                         E..V....
      -force_duplicated_matrix <boolean>    E..V.... Always write luma and chroma matrix for mjpeg, useful for rtp streaming. (default false)
      -b_strategy        <int>        E..V.... Strategy to choose between I/P/B-frames (from 0 to 2) (default 0)
      -b_sensitivity     <int>        E..V.... Adjust sensitivity of b_frame_strategy 1 (from 1 to INT_MAX) (default 40)
      -brd_scale         <int>        E..V.... Downscale frames for dynamic B-frame decision (from 0 to 3) (default 0)
      -skip_threshold    <int>        E..V.... Frame skip threshold (from INT_MIN to INT_MAX) (default 0)
      -skip_factor       <int>        E..V.... Frame skip factor (from INT_MIN to INT_MAX) (default 0)
      -skip_exp          <int>        E..V.... Frame skip exponent (from INT_MIN to INT_MAX) (default 0)
      -skip_cmp          <int>        E..V.... Frame skip compare function (from INT_MIN to INT_MAX) (default dctmax)
         sad                          E..V.... Sum of absolute differences, fast
         sse                          E..V.... Sum of squared errors
         satd                         E..V.... Sum of absolute Hadamard transformed differences
         dct                          E..V.... Sum of absolute DCT transformed differences
         psnr                         E..V.... Sum of squared quantization errors, low quality
         bit                          E..V.... Number of bits needed for the block
         rd                           E..V.... Rate distortion optimal, slow
         zero                         E..V.... Zero
         vsad                         E..V.... Sum of absolute vertical differences
         vsse                         E..V.... Sum of squared vertical differences
         nsse                         E..V.... Noise preserving sum of squared differences
         dct264                       E..V....
         dctmax                       E..V....
         chroma                       E..V....
      -sc_threshold      <int>        E..V.... Scene change threshold (from INT_MIN to INT_MAX) (default 0)
      -noise_reduction   <int>        E..V.... Noise reduction (from INT_MIN to INT_MAX) (default 0)
      -mpeg_quant        <int>        E..V.... Use MPEG quantizers instead of H.263 (from 0 to 1) (default 0)
      -ps                <int>        E..V.... RTP payload size in bytes (from INT_MIN to INT_MAX) (default 0)
      -mepc              <int>        E..V.... Motion estimation bitrate penalty compensation (1.0 = 256) (from INT_MIN to INT_MAX) (default 256)
      -mepre             <int>        E..V.... pre motion estimation (from INT_MIN to INT_MAX) (default 0)
      -pred              <int>        E..V.... Prediction method (from 1 to 3) (default left)
         left                         E..V....
         plane                        E..V....
         median                       E..V....
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!