VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Member
    Join Date
    Jul 2007
    Location
    Uruguay
    Search Comp PM
    Hello,
    I need your help please.
    How can I change the chroma subsampling from 4:2:2 to 4:2:0 on this file?
    I donīt need to change anything else
    I remember doing something similar with ffmpeg a long time ago, but I cannot remember the syntax.
    Thanks for your help!!

    Format : BDAV
    Format/Info : Blu-ray Video
    File size : 26.9 GiB
    Duration : 2h 27mn
    Overall bit rate mode : Variable
    Overall bit rate : 26.1 Mbps
    Maximum Overall bit rate : 35.5 Mbps

    Video
    ID : 4113 (0x1011)
    Menu ID : 1 (0x1)
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High 4:2:2@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3 frames
    Codec ID : 27
    Duration : 2h 27mn
    Bit rate mode : Constant
    Bit rate : 24.5 Mbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:2
    Bit depth : 8 bits
    Scan type : MBAFF
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.394
    Stream size : 25.4 GiB (95%)
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 4352 (0x1100)
    Menu ID : 1 (0x1)
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 2
    Mode : Dual mono
    Codec ID : 4
    Duration : 2h 27mn
    Bit rate mode : Constant
    Bit rate : 384 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Delay relative to video : 79ms
    Stream size : 406 MiB (1%)
    Language : English
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    That's a very odd piece of video you've got there. If it were truly consumer BDAV, it should only be 4:2:0.
    But there could be some XDCAM-like camcorders that might record to BD, maybe this is one of those. But those are mainly MPEG2, not AVC.
    And MP2 audio?

    While it might be theoretically possible to maintain the luminance channel unharmed, what you're doing in the chrominance channels basically amounts to resizing the vertical in 1/2, and any time you resize you have to re-encode.

    So re-encode the whole thing (audio and video) to something that is much more modern consumer-friendly.

    ********

    I'm on my phone now so can't give you an ffmpeg script though I know it's possible (I would use ffmbc & cliptoolz, IIRC).

    Scott
    Quote Quote  
  3. Member
    Join Date
    Jul 2007
    Location
    Uruguay
    Search Comp PM
    Thanks a lot for your reply.
    Actually the original video is AVC

    Format : MPEG-TS
    File size : 28.8 GiB
    Duration : 2h 27mn
    Overall bit rate mode : Variable
    Overall bit rate : 27.9 Mbps

    Video
    ID : 512 (0x200)
    Menu ID : 1 (0x1)
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High 4:2:2@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 3 frames
    Codec ID : 27
    Duration : 2h 27mn
    Bit rate mode : Constant
    Bit rate : 24.5 Mbps
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:2
    Bit depth : 8 bits
    Scan type : MBAFF
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.394
    Stream size : 24.6 GiB (85%)
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio #1
    ID : 4112 (0x1010)
    Menu ID : 1 (0x1)
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 2
    Mode : Dual mono
    Codec ID : 3
    Duration : 2h 27mn
    Bit rate mode : Constant
    Bit rate : 384 Kbps
    Channel(s) : 2 channels
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Delay relative to video : 12ms
    Stream size : 406 MiB (1%)
    Language : English
    Language, more info : Clean effects

    Audio #2
    ID : 4128 (0x1020)
    Menu ID : 1 (0x1)
    Format : Dolby E
    Mode : 20
    Format settings, Endianness : Little
    Muxing mode : AES3
    Codec ID : 6
    Duration : 2h 27mn
    Bit rate mode : Constant
    Bit rate : 2 304 Kbps
    Bit depth : 20 bits
    Stream size : 2.38 GiB (8%)
    Language : English
    Language, more info : Clean effects


    So I somehow managed to convert it to AVCHD but I suppose I can get the original file.
    And then reencode or whatever needs to be done to change the chrome subsampling to consumer specs 4:2:0
    So I can later use an authoring program to add chapters and menues and finally burn to BD-R

    Thanks again.
    That ffmpeg script would be wonderful, when you can. Thanks!
    Quote Quote  
  4. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    In avisynth you can do

    Code:
    Converttoyv12(interlaced=true)
    I can't help with ffmpeg.
    Quote Quote  
  5. The syntax for the 422=>420 part requires the "interlaced scaling" flag, because the chroma channels are being scaled and it must be done in an interlaced fashion, otherwise you will get chroma artifacts

    -vf scale=w=-1:h=-1:interl=1 ...... means don't scale the dimensions, but do scaling operations in an interlaced fashion
    -pix_fmt yuv420p ..... means YUV 4:2:0

    The rest of the other arguments depend on what you're trying to do exactly, what target, what settings, what device, what restrictions (e.g .bitrates), what scenario etc..
    Quote Quote  
  6. Originally Posted by yescool2002 View Post

    So I can later use an authoring program to add chapters and menues and finally burn to BD-R

    Oops I missed this

    Was this for BD ? Authored BD ?

    If so, you should plan ahead in terms of chapters , to tell the encoder to set IDR (keyframes) at the chapter points. Otherwise the seekpoints might be slightly "off". You would do that with a qp file. FFMpeg libx264 doesn't support qpfile, you would have to use x264 CLI .
    Quote Quote  
  7. Member
    Join Date
    Jul 2007
    Location
    Uruguay
    Search Comp PM
    Thanks a lot.
    Sorry, but I do not understand most of what you wrote. I am a newbie.
    I have a TS file of a rock concert but itīs in 4:2:2.
    So I cannot run it thru TMPGENC to add chapters, etc.

    How do I convert this TS 4:2:2 file to a TS 4:2:0, if possible without changing anything else so the synthax and process are as simple as possible?

    Thanks again
    Quote Quote  
  8. Which TMPGEnc ? Is this tmpgenc authoring works or mastering works ? Won't mastering works convert it to 4:2:0 for BD?

    You want to make it proper for BD specs the first time around, otherwise you unnecessarily lose quality if the program re-encodes it again to comply with BD specs. Or maybe you don't care about that ?

    If you don't know what is going on or what it's doing in tmpgenc, maybe another option is to use a temporary lossless intermediate converted to 4:2:0 and use that as input and let the program re-encode it with the proper chapters / keyframes ? The problem is a lossless intermediate requires lots of HDD space. Can the TMPGEnc version you're using encode video ?
    Quote Quote  
  9. Member
    Join Date
    Jul 2007
    Location
    Uruguay
    Search Comp PM
    Iīve got both. I cannot find an option in Mastering Works that converts to 4:2:0

    Maybe if I run it and choose BD as output it will change the chrome from 4:2:2 to 4:2:0

    Iīve got plenty of drive space.

    I think ffmpeg should work because I once did it with a similar 422 file. But I canīt find the correct synthax, I should have saved it more carefully for future use.

    Thanks again
    Quote Quote  
  10. If you choose a "BD" setting it should convert it for you to 4:2:0 . 4:2:2 is non compliant for BD

    Doesn't authoring works encode non compliant assets as well ? When you're setting chapters, it should be done during/along with the encoding, otherwise you might get parts from the last scene when you navigate

    The switches I listed above convert to 4:2:0 in ffmpeg, with interlaced scaling (since your file is interlaced, you should use this) , but all the other commands depend on what you are doing
    Quote Quote  
  11. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by poisondeathray View Post
    Doesn't authoring works encode non compliant assets as well ?
    Nope. Outputs compliant video for the output format chosen. If the video isn't compliant for that format, TAW5 re-encodes. If the input is already format compliant, it passes thru unaltered. If the input is format compliant and cuts/joins are made, it smart renders only the cut to meet compliance.

    TMPGenc Smart Renderer can work with compliant and non-compliant video. However, if you ask for BluRay, DVD, etc., it will hold strictly to the format's requirements and re-encode non-compliant input. It will smart-render non-compliant input if the specified output is the same format as the input (e.g, a 250-frame GOP mp4 will be smart-rendered only on the cut GOP's if you specify the same output format. If you input 250-GOP video and ask for BluRay, it will re-encode for compliant BD).
    - My sister Ann's brother
    Quote Quote  
  12. Originally Posted by LMotlow View Post
    Originally Posted by poisondeathray View Post
    Doesn't authoring works encode non compliant assets as well ?
    Nope. Outputs compliant video for the output format chosen. If the video isn't compliant for that format, TAW5 re-encodes. If the input is already format compliant, it passes thru unaltered. If the input is format compliant and cuts/joins are made, it smart renders only the cut to meet compliance.
    This is what I meant - ie. does it have the ability to encode, not just author. Most consumer level authoring programs do this. So you should be able to import directly and it should encode the non compliant assets to BD spec . That would be the easiest way

    If you do it without planning or in another program, the chapter points might not match the proper points in the video bitstream and chapter navigation might be off
    Quote Quote  
  13. Member
    Join Date
    May 2014
    Location
    Memphis TN, US
    Search PM
    Originally Posted by poisondeathray View Post
    Originally Posted by LMotlow View Post
    Originally Posted by poisondeathray View Post
    Doesn't authoring works encode non compliant assets as well ?
    Nope. Outputs compliant video for the output format chosen. If the video isn't compliant for that format, TAW5 re-encodes. If the input is already format compliant, it passes thru unaltered. If the input is format compliant and cuts/joins are made, it smart renders only the cut to meet compliance.
    This is what I meant - ie. does it have the ability to encode, not just author.
    Yes. TAW5 accepts a whole bunch of input formats including lossless (if you have the codec installed) and it can encode or re-encode noncompliant input, as well as smart-render compliant input. It can use MPEG or its x264 encoder. But its output must be specified as one of AVCHD (for HDD / Memory, DVD, or Progressive), Blu-ray (BDMV), or DVD (DVD-Video). In other words, you can't use it to encode 250-frame GOP's as mp4 with 4:2:2 color. It's picky about output specs, such as colorspace and audio. http://tmpgenc.pegasys-inc.com/en/product/taw5_spec.html . For additional output formats/containers, try Mastering Works.
    Last edited by LMotlow; 3rd Apr 2016 at 11:43.
    - My sister Ann's brother
    Quote Quote  



Similar Threads

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