YUV420 read by beamrtras

Hi,

When specifying the type of input file, what should I use to tell the “beamrtras” that the input is a YUV420 file. Right now I use “provide=RAW;file=$path…” for “i” parameter, but the output is wrong.

Thanks,

Hi,

Try to adjust the ‘colorformat’ option of the input configuration. For YUV 4:2:0 the following values are available: IYUV (default), YV12 or NV12. See the user manual’s 5.4.6 section for more details. The UserGuide.pdf can be found in the ‘docs’ folder of the installation directory (/opt/beamr/transcoder).

Thank you!

Hi,

Thanks, found the user guide.

For the “colorformat” option, it still does not look correct after trying three values. The source raw file should be good, as other encoders can read it correctly. Any other suggestions that may make the tool read YUV420 correctly?

Thanks,

Hi!
Can you share the raw input file somewhere so that we could investigate/debug the problem?
Also, please provide the command line you tried with the file and got the wrong result.

Thank you!

Hi, thanks.

Please kindly let me know how I can share the file with you for debugging the problem.

I will past the command here soon.

Thanks!

Hi,

The command that I used is:

beamrtrans -i “provider=RAW;colorformat=IYUV;file=path/sample_clip.yuv;width=1920;height=1080;fps=23.976;” -o “path/sample_clip.265” -v hevc -vbm CABR -vb 50000 -vmaxb 90000 -vtdb 10 -pi

It is interesting to observe that "even the source YUV420 file only contains 60 frames, the process shows “frames=120” in the end.

Thanks!

Hi!

The wrong number of frames definitely relates to the wrong input format specification.
I’ve sent you an FTP login credentials as a private message that you can use to upload your sample YUV stream.

Thank you!

Hi,

I have uploaded the video clip to the ftp server. Please feel free to advise.

Thanks,

Hi,

Thank you for the sample stream. After having a look at it, I’m just wondering if you are able to open it with any free YUV viewer available on the web? If that is the case, please let us know the combination of settings rendering you a good picture. I mean the picture size (I suppose it must be 1920x1080) and the YUV format (something like YUV 4:2:0 10-bit LE). Unless we have such an information, we won’t be able to configure the transcoder input properly.

Thank you!

Hi,

Thanks for the help in advance!

We are able to open the file using other YUV viewers. Also, other encoders can encode it correctly too.

The command I used is:

beamrtrans -i “provider=RAW;colorformat=IYUV;file=path/sample_clip.yuv;width=1920;height=1080;fps=23.976;” -o “path/sample_clip.265” -v hevc -vbm CABR -vb 50000 -vmaxb 90000 -vtdb 10 -pi

It should be able to tell some of the settings. The depth is 10-bit.

Do you support “P010” YUV format by the way?

Thanks a lot!

  1. We do support planar 4:2:0 10-bit input

  2. Command line to handle the planar 4:2:0 10-bit input should be the following:
    beamrtrans -i "provider=RAW;colorformat=IYUV;databits=10;file=path/sample_clip.yuv;width=1920;height=1080;fps=23.976;" -o "path/sample_clip.265" -v hevc -vbm CABR -vb 50000 -vmaxb 90000 -pi

  3. The sample YUV stream you provided us does not appear to be 1920x1080 planar 4:2:0 10-bit. Here’s how it is displayed by the YUView tool:

Hi,

Thanks for the feedback!

With regard to reading the file, I can open it with other viewers including “Beamr View”.

Thanks,

Hi,

It seems to be encoding properly now. I guess the default “databits” is 8?

Thanks,

Mio

No luck with Beamr View either. Seems to be corrupted during the file transfer:

Cool.

If I want to make sure the output is of 10-bit, is there a parameter to use?

Also, if the input is 10-bit, will the output inherit that by default?

Thanks for your help!

The output will have the same bit-depth as the input stream, unless you use the -vtdb 8 option to convert to 8-bits.

Thanks for the quick reply!

One question with regard to the output, if output needs to be in BT2020 color-space and has PQ encoded code values, what parameter should I use under “HEVC” encoding mode. Currently, I have:

beamrtrans -i “provider=RAW;colorformat=IYUV;colorprofile=HDR10;databits=10;file=./input.yuv;width=1920;height=1080;fps=23.976;” -o “colorprofile=HDR10;file=./output.265” -v hevc -vbm CABR -vb 5000 -vmaxb 10000 -pi

Thanks and have a great day!

No need to make any special settings. If the input is specified as HDR10 then it will be encoded as such automatically. So, the correct command line would be:
beamrtrans -i "provider=RAW;colorformat=IYUV;colorprofile=HDR10;databits=10;file=./input.yuv;width=1920;height=1080;fps=23.976" -o "./output.265" -v hevc -vbm CABR -vb 5000 -vmaxb 10000 -pi

Thanks for the quick reply! I appreciate it.

Here are three more questions:

  1. If the input is of “SDR” in BT.709, should I keep “colorprofile=HDR10” in the output filed in order to convert the code values (PQ in BT.2020) in addition to encoding?

  2. Is there a parameter to control the amount of details (e.g., film-grain) that can be preserved?

  3. In addition to “-videoscenechange”, Is there a parameter that encodes with multiple bitrates within GOP boundaries. In other word, does Beamr have a flexible set of bitrates for different types of scenes?

  1. To force the HEVC encoder to insert HDR10 metadata when encoding SDR input use the following option: -vemd HDR (it won’t result in actual color conversion though, but only in specifying the encoded contents as BT.2020 PQ)
  2. Use the following option for grainy contents: -vemd Cinema. It will enable special grain preserving tool.
  3. Currently no, the next Transcoder version will have CSQ (Constant Subjective Quality) rate control mode that will produce scene-dependent bitrate.