VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Member
    Join Date
    Mar 2018
    Location
    Brazil
    Search PM
    Hello, first thank you all for reading this

    I need to use x265 to encode sports videos (soccer, NASCAR), so they are fast moving videos.

    I wanted to know if anyone already has done tests with sports videos and know a good command line config to use x265 to encode these kind of videos... I'm kind of a noob on that and to be honest I don't really know where to start. I have to use x265 and not Handbrake for example because being command line is good in my case.

    I will encode these videos for my work, they demanded it for me to encode several samples of the same video, one with 1,5Mbps, 7,5Mbps, 12MBPs, and 15Mbps, all CBR (It has to be CBR becasue my boss want to charge the guy/company based on amount of time stored and you know, can't question the boss).

    Can anyone help me with this one? Anyone already figured out a good configuration for this specific kind of video?

    Thank you all already for helping me!!!!
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    What are the specs of the source? Interlaced, progressive? Etc, etc
    Perhaps open the source in mediainfo and post the text results (view>text) in the thread here
    Quote Quote  
  3. Member
    Join Date
    Mar 2018
    Location
    Brazil
    Search PM
    General
    Format : MXF
    Commercial name : XDCAM HD422
    Format version : 1.2
    Format profile : OP-1a
    Format settings : Closed / Complete
    File size : 436 MiB
    Duration : 1 min 0 s
    Overall bit rate : 60.3 Mb/s
    Encoded date : 2018-03-15 19:13:25.000
    Writing application : AVID TRMG 3.01

    Video
    ID : 2
    Format : MPEG Video
    Commercial name : XDCAM HD422
    Format version : Version 2
    Format profile : 4:2:2@High
    Format settings : BVOP
    Format settings, BVOP : Yes
    Format settings, Matrix : Default
    Format settings, GOP : M=3, N=15
    Format settings, picture struc : Frame
    Format settings, wrapping mode : Frame
    Codec ID : 0D01030102046001-0401020201040300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 50.0 Mb/s
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate : 29.970 (30000/1001) FPS
    Standard : NTSC
    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.805
    Time code of first frame : 01:00:00:00
    Time code source : Group of pictures header
    GOP, Open/Closed : Open
    GOP, Open/Closed of first fram : Closed
    Stream size : 361 MiB (83%)
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio #1
    ID : 3
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Audio #2
    ID : 4
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Audio #3
    ID : 5
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Audio #4
    ID : 6
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Audio #5
    ID : 7
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Audio #6
    ID : 8
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Audio #7
    ID : 9
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Audio #8
    ID : 10
    Format : PCM
    Format settings : Little
    Format settings, wrapping mode : Frame (AES)
    Codec ID : 0D01030102060300
    Duration : 1 min 0 s
    Bit rate mode : Constant
    Bit rate : 1 152 kb/s
    Channel(s) : 1 channel
    Sampling rate : 48.0 kHz
    Frame rate : 29.970 FPS (1601.6 SPF)
    Bit depth : 24 bits
    Stream size : 8.33 MiB (2%)
    Locked : Yes

    Other #1
    ID : 1-Material
    Type : Time code
    Format : MXF TC
    Time code of first frame : 01:00:00:00
    Time code settings : Material Package
    Time code, striped : Yes

    Other #2
    ID : 1-Source
    Type : Time code
    Format : MXF TC
    Time code of first frame : 01:00:00:00
    Time code settings : Source Package
    Time code, striped : Yes

    Other #3
    Type : Time code
    Format : SMPTE TC
    Muxing mode : SDTI
    Time code of first frame : 01:00:00:00
    Quote Quote  
  4. Member
    Join Date
    Mar 2018
    Location
    Brazil
    Search PM
    Oh, also forgot to mention that it needs to be 10bit color, even if the source is 8bit.

    And I have to deinterlace.

    Thanks!
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Well if you bob deinterlace at least you'll preserve the fluidity, important for sports video.
    Easy enough to do in Avisynth, but not sure about elsewhere.
    I know nothing about x265 options so I'll leave that for somebody else.
    Quote Quote  
  6. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Pretty much just use the slowest x265 preset you can stand. Slower settings provide better encoding efficiency but obviously take longer. So use the slowest that still fits within your deadlines. I would not suggest placebo, and probably not veryslow.

    --preset slow

    https://x265.readthedocs.io/en/default/presets.html#presets


    For content that you know will mostly be high action content, then you might want to test with smaller GOPs. Larger GOPs are more efficient but can introduce artifacts and pulses of quality where one GOP ends and another starts. Especially with CBR content. As the I-frame (start of a GOP) is the best quality frame and is used as a reference for the rest of the GOP. But if the video changes rapidly from the start of the GOP to the end of the GOP, then the quality is going to drop by the end of the GOP and then when the next I-frame starts there's a pulse of a higher quality frame. Having smaller GOPs can help to tame this. Most over the air content in the USA is also CBR (or limited VBR) and so they use small GOPs, ranging from 20-60 frames. They also do this to help with quick changing between channels.

    --keyint 60

    https://x265.readthedocs.io/en/default/cli.html?highlight=scene#slice-decision-options



    Might also consider using a larger look ahead, to help x265 make better decisions on where to end and start GOPs. This puts uncompressed frames into your RAM, so if you are RAM limited then you are going to need to lower this value.

    --rc-lookahead 60


    If you are setting --keyint, then the value for --rc-lookahead should be equal or less than --keyint. Otherwise you are just wasting RAM. But it won't hurt the encoding.

    https://x265.readthedocs.io/en/default/cli.html?highlight=scene#slice-decision-options



    Only you can test these settings with your content and just find what works best in your case.
    Last edited by KarMa; 25th Mar 2018 at 22:11.
    Quote Quote  
  7. Originally Posted by horus_ View Post
    several samples of the same video, one with 1,5Mbps, 7,5Mbps, 12MBPs, and 15Mbps, all CBR (It has to be CBR )
    for 1.5 Mbit video might be good idea to change resolution to 1280x720,
    otherwise deiterlace all to 59.940p,
    to simulate CBR encoding (I did not get that explanation why anyway) you might consider using 1pass crf, using very low value and setting buffers appropriately to cut the peaks off to your bitrate - a bit lower than that bitrate because encoder might shoot a bit higher, but I do not know x265, how exactly it would end up, short tests would tell you more, for example for 1.5Mbit stream try, this works for x264, so it might with x265:
    x265 --crf 12 --vbv-bufsize 1400 --vbv-maxrate 1400
    Quote Quote  



Similar Threads

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