VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hi anyone,

    I would like to encode from .mxf (sony xdcam hd 422 files) to mjpeg 422

    I have to upload my C0020.mxf file to my dropbox:
    (www.dropbox.com logon into it with this credential: user: mrocchini@email.it password is: centrale forlder: "public")

    General
    Complete name : D:\C0020.mxf
    Format : MXF
    Commercial name : XDCAM HD422
    Format profile : OP-1a
    Format settings : Closed / Complete
    File size : 263 MiB
    Duration : 36s 600ms
    Overall bit rate : 60.3 Mbps
    Encoded date : 2013-05-24 22:12:18.000
    Writing application : SONY Opt 1.22
    Writing library : SONY Opt 1.22

    Video
    ID : 2
    Format : MPEG Video
    Commercial name : XDCAM HD422
    Format version : Version 2
    Format profile : 4:2:2@High
    Format settings, BVOP : Yes
    Format settings, Matrix : Custom
    Format settings, GOP : M=3, N=12
    Format_Settings_Wrapping : Frame
    Duration : 36s 600ms
    Bit rate : 50.0 Mbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 fps
    Standard : Component
    Color space : YUV
    Chroma subsampling : 4:2:2
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Top Field First
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.965
    Stream size : 218 MiB (83%)
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio #1
    ID : 3
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Audio #2
    ID : 4
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Audio #3
    ID : 5
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Audio #4
    ID : 6
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Audio #5
    ID : 7
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Audio #6
    ID : 8
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Audio #7
    ID : 9
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Audio #8
    ID : 10
    Format : PCM
    Format settings, Endianness : Little
    Format_Settings_Wrapping : Frame (AES)
    Duration : 36s 600ms
    Bit rate mode : Constant
    Bit rate : 1 152 Kbps
    Channel(s) : 1 channel
    Sampling rate : 48.0 KHz
    Bit depth : 24 bits
    Stream size : 5.03 MiB (2%)

    Other #1
    ID : 1
    Type : Time code
    Format : MXF TC
    Time code of first frame : 01:34:21:15
    Time code settings : Striped

    Other #2
    Type : Time code
    Format : SMPTE TC
    Muxing mode : SDTI
    Time code of first frame : 01:34:21:15


    Initially I used FFMBC:

    FFMBC -i C0020.mxf -vcodec mjpeg -an output.avi

    but it returns this error message:

    Incompatible pixel format 'yuv422p' for codec 'mjpeg', auto-selecting format 'yuvj420p'


    but I don't want a 4:2:0 file


    So I have try with the zeranoe version of FFMPEG:

    FFMPEG -i c0020.mxf -vcodec mjpeg -q:v 0 -an output.avi


    it produce a mjpeg file but my NLE is not able to read the output.avi

    This is the report of mediainfo:

    General
    Complete name : I:\output.avi
    Format : AVI
    Format/Info : Audio Video Interleave
    File size : 536 MiB
    Duration : 36s 600ms
    Overall bit rate : 123 Mbps
    Writing application : Lavf55.11.100

    Video
    ID : 0
    Format : JPEG
    Codec ID : MJPG
    Duration : 36s 600ms
    Bit rate : 123 Mbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 25.000 fps
    Color space : YUV
    Bit depth : 8 bits
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 2.370
    Stream size : 536 MiB (100%)


    Maybe is unreadable because it is not (clearly) an interlaced output?

    I would like to encode an interlaced mjpeg file, how is the setting of the FFMPEG to encode in interlace mode?

    thanks!




    Quote Quote  
  2. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    looks like ffmpeg thinks the source is progresive - notice the "p" in Incompatible pixel format 'yuv422p'

    can't help with fixing it though, never worked with interlaced mxf.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  3. Originally Posted by aedipuss View Post
    looks like ffmpeg thinks the source is progresive - notice the "p" in Incompatible pixel format 'yuv422p'

    can't help with fixing it though, never worked with interlaced mxf.

    the "p" in yuv422p indicates "planar"


    marcorocchini - this was suggested to you many times, but you should just upgrade your NLE. XDCAM-HD is one of the most popular, commonly used formats (esp. in broadcast)

    I don't think there is any interlaced encoding for mjpeg

    in ffmpeg, generic interlaced switch is usually -flags +ilme+ildct , and -tff for top field first, or -bff for bottom field first. Some builds use -top 0 (bff), or top 1 (tff)
    Quote Quote  
  4. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    oye. anyway downloaded your source and it works fine in vegas pro 12. not sure what you want to do with it?
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  5. Originally Posted by aedipuss View Post
    oye. anyway downloaded your source and it works fine in vegas pro 12. not sure what you want to do with it?
    because i would like use my modifyed In Sync Speed Razor 5.51 NLE
    Quote Quote  
  6. Originally Posted by poisondeathray View Post
    Originally Posted by aedipuss View Post
    looks like ffmpeg thinks the source is progresive - notice the "p" in Incompatible pixel format 'yuv422p'

    can't help with fixing it though, never worked with interlaced mxf.

    the "p" in yuv422p indicates "planar"


    marcorocchini - this was suggested to you many times, but you should just upgrade your NLE. XDCAM-HD is one of the most popular, commonly used formats (esp. in broadcast)

    I don't think there is any interlaced encoding for mjpeg

    in ffmpeg, generic interlaced switch is usually -flags +ilme+ildct , and -tff for top field first, or -bff for bottom field first. Some builds use -top 0 (bff), or top 1 (tff)
    poison, a kindness:

    I have partially solved in this way

    ffmpeg.exe -y -i c0020.mxf -vcodec mjpeg -vf crop=1920:1080:0:0,colormatrix=bt709:bt601 -pix_fmt yuvj422p -intra -q:v 0 -an output4.avi

    but now I have a problem with video levels:

    in FFMPEG is possible to change from 16-235/16-255/0-255 levels?

    thank you
    Quote Quote  
  7. I frist thought that:
    Code:
    -color_primaries   <int>        ED.V.. (from 1 to 8)
      -color_trc         <int>        ED.V.. (from 1 to 7)
      -colorspace        <int>        ED.V.. (from 1 to 8)
      -color_range       <int>        ED.V.. (from 0 to 2)
    might help, but reading http://trac.ffmpeg.org/ticket/443 it seems not the case, so there is probably no way to convert between tv and pc scale or tell ffmpeg that your input is either.
    As far as I know for RGB content ffmpeg assumes pc and for all yuv content tv scale,..
    Quote Quote  
  8. mjpeg is frequently decoded as full range yuv - it's also dependent on the decoder settings in your application. Some mjpeg decoders will clamp to 16-235. "yuvj422p" will be full range YUV. (The "j" indicates full range 0-255), so if you decoder doesn't clamp, it will be 0-255

    I see there is a new curves filter in the ffmpeg 2.0 changelog. If it works like typical curves filters, you should be able to change levels
    Quote Quote  
  9. looking at the different pix_fmts:

    4:2:0, 0-255
    Code:
    -pix_fmt yuvj420p
    4:2:0, 16-235
    Code:
    -pix_fmt yuv420p
    4:2:2, 0-255
    Code:
    -pix_fmt yuvj422p
    4:2:2, 16-235
    Code:
    -pix_fmt yuvj422p
    4:4:4
    Code:
    -pix_fmt yuv444p
    wouldn't ffmpeg do the conversion automatically if set the input and output pix_fmts to different values?

    -> okay, forget that, seems like one can only set the pix_fmt for the output,...
    Last edited by Selur; 11th Jul 2013 at 11:33.
    Quote Quote  
  10. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    i can't find a way to force 422 out of ffmpeg. you could use the utvideo lossless codec. it has a 422 rec709 component.

    Click image for larger version

Name:	2013-07-11_174756.png
Views:	1612
Size:	49.2 KB
ID:	18826
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  11. "-pix_fmt yuv422p" should force 4:2:2 output,...
    Quote Quote  



Similar Threads

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