logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
gotscottgreen  
#1 Posted : Friday, July 31, 2020 1:13:53 AM(UTC)
gotscottgreen

Rank: Member

Groups: Registered
Joined: 2/23/2018(UTC)
Posts: 17
Location: Lewisburg PA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Hey All,

So I am looking to record multiple streams (recording out and multicorder) to a 4:2:2 colorspace. I shot all this weekend to H.264 using 75Mbps and H264High profile and I only show a 4:2:0 colorspace. I am using BM Decklink Quad 2 and cameras that output 4:2:2, so what format do I need to record in to get 4:2:2?

I may do up to 5 cameras, I tried ProRes and it ate a LOT of CPU power for just one camera multicorder and was huge (expected), is there another format (AVI, vMix AVI, FFMPEG, or others) that I can record to that gives me 4:2:2?

I have a Quadtro RTX 4000 so I could do a lot of encoding at once, but thought H264 would do 4:2:2.

Any help is apprciated!

Thanks in advance!
Xavier
DWAM  
#2 Posted : Friday, July 31, 2020 1:45:27 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
H.264 4:2:2 is not natively supported by NVENC HW encodes but 4:4:4 is
https://developer.nvidia...m/nvidia-video-codec-sdk

You can verify this very easily :

Code:
ffmpeg -h encoder=nvenc

>>     Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11

For libx264
ffmpeg -h encoder=libx264

>>     Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray gray10le


You might want to try to add your own recording settings (for 4:4:4) for FFMPEG/NVENC in the ffmpegformats.xml file under the streaming folder of vMix installation folder.

I think vMix AVI codec will do it but on CPU only AFAIK with same quality as ProRes or DNxHD but less resource hungry.
thanks 2 users thanked DWAM for this useful post.
gotscottgreen on 8/11/2020(UTC), stigaard on 8/22/2020(UTC)
gotscottgreen  
#3 Posted : Friday, July 31, 2020 3:58:56 AM(UTC)
gotscottgreen

Rank: Member

Groups: Registered
Joined: 2/23/2018(UTC)
Posts: 17
Location: Lewisburg PA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
I am a little above my level in what you are telling me. Is this a setting in FFMPEG for using NVENC, or do I have to "build my own" preset to get the 4:4:4 quality?
Sorry if I am a little obtuse on this. Really appreciate your help!!

Best
Xavier
DWAM  
#4 Posted : Friday, July 31, 2020 4:03:24 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Check the file I referred to and compare its content to the FFMPEG recording settings in vMix, you will understand
gotscottgreen  
#5 Posted : Wednesday, August 5, 2020 3:57:29 AM(UTC)
gotscottgreen

Rank: Member

Groups: Registered
Joined: 2/23/2018(UTC)
Posts: 17
Location: Lewisburg PA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
I have no clue how to do what you are talking about, I am not familiar with working with XML files or writing code for them.

Any help is appreciated.

Thanks
Xavier
gotscottgreen  
#6 Posted : Tuesday, August 11, 2020 3:28:06 AM(UTC)
gotscottgreen

Rank: Member

Groups: Registered
Joined: 2/23/2018(UTC)
Posts: 17
Location: Lewisburg PA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: DWAM Go to Quoted Post
H.264 4:2:2 is not natively supported by NVENC HW encodes but 4:4:4 is
https://developer.nvidia...m/nvidia-video-codec-sdk

You can verify this very easily :

Code:
ffmpeg -h encoder=nvenc

>>     Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 cuda d3d11

For libx264
ffmpeg -h encoder=libx264

>>     Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le gray gray10le


You might want to try to add your own recording settings (for 4:4:4) for FFMPEG/NVENC in the ffmpegformats.xml file under the streaming folder of vMix installation folder.

I think vMix AVI codec will do it but on CPU only AFAIK with same quality as ProRes or DNxHD but less resource hungry.



This is what is in my ffmpegformats.xml file, what and where would I add the above code you are mentioning?

Thanks so much in advance!!




<?xml version="1.0" encoding="UTF-8"?>

-<formats>


-<format>

<name>MPEG-2</name>


-<extensions>

<extension type="mpegts" ext=".ts" name="Transport Stream (.ts)"/>

<extension type="mpeg" ext=".mpg" name="Program Stream (.mpg)"/>

</extensions>


-<video codec="mpeg2video">

<bitRate>8M</bitRate>

<bitRate>10M</bitRate>

<bitRate>12M</bitRate>

<bitRate>15M</bitRate>

<bitRate>25M</bitRate>

<bitRate>50M</bitRate>

<bitRate>75M</bitRate>

</video>


-<audio codec="mp2">

<bitRate>384k</bitRate>

<bitRate>192k</bitRate>

<bitRate>128k</bitRate>

<bitRate>64k</bitRate>

</audio>

<command>-pix_fmt yuv420p -vcodec {video_codec} -maxrate:v {video_bitrate} -minrate:v {video_bitrate} -b:v {video_bitrate} -acodec {audio_codec} -b:a {audio_bitrate} -f {extension_type}</command>

<interlacedSupported/>

</format>


-<format>

<name>MP4 x264 AAC</name>


-<extensions>

<extension type="mp4 -movflags frag_keyframe" ext=".mp4" name="MP4"/>

<extension type="mp4" ext=".mp4" name="MP4 (Indexed)"/>

</extensions>


-<video codec="libx264">

<bitRate>50M</bitRate>

<bitRate>25M</bitRate>

<bitRate>15M</bitRate>

<bitRate>10M</bitRate>

<bitRate>8M</bitRate>

<bitRate>6M</bitRate>

<bitRate>4M</bitRate>

<bitRate>2M</bitRate>

<bitRate>1500k</bitRate>

</video>


-<audio codec="libfaac">

<bitRate>384k</bitRate>

<bitRate>192k</bitRate>

<bitRate>128k</bitRate>

<bitRate>64k</bitRate>

</audio>

<command>-pix_fmt yuv420p -vcodec {video_codec} -preset:v veryfast -profile:v main -b:v {video_bitrate} -acodec {audio_codec} -b:a {audio_bitrate} -f {extension_type}</command>

</format>


-<format>

<name>MP4 x264 AAC Superfast</name>


-<extensions>

<extension type="mp4 -movflags frag_keyframe" ext=".mp4" name="MP4"/>

<extension type="mp4" ext=".mp4" name="MP4 (Indexed)"/>

</extensions>


-<video codec="libx264">

<bitRate>50M</bitRate>

<bitRate>25M</bitRate>

<bitRate>15M</bitRate>

<bitRate>10M</bitRate>

<bitRate>8M</bitRate>

<bitRate>6M</bitRate>

<bitRate>4M</bitRate>

<bitRate>2M</bitRate>

<bitRate>1500k</bitRate>

</video>


-<audio codec="libfaac">

<bitRate>384k</bitRate>

<bitRate>192k</bitRate>

<bitRate>128k</bitRate>

<bitRate>64k</bitRate>

</audio>

<command>-pix_fmt yuv420p -vcodec {video_codec} -preset:v superfast -profile:v baseline -b:v {video_bitrate} -acodec {audio_codec} -b:a {audio_bitrate} -f {extension_type}</command>

</format>


-<format>

<name>MP4 NVENC AAC</name>


-<extensions>

<extension type="mp4 -movflags frag_keyframe" ext=".mp4" name="MP4"/>

<extension type="mp4" ext=".mp4" name="MP4 (Indexed)"/>

</extensions>


-<video codec="nvenc">

<bitRate>50M</bitRate>

<bitRate>25M</bitRate>

<bitRate>15M</bitRate>

<bitRate>10M</bitRate>

<bitRate>8M</bitRate>

<bitRate>6M</bitRate>

<bitRate>4M</bitRate>

<bitRate>2M</bitRate>

<bitRate>1500k</bitRate>

</video>


-<audio codec="libfaac">

<bitRate>384k</bitRate>

<bitRate>192k</bitRate>

<bitRate>128k</bitRate>

<bitRate>64k</bitRate>

</audio>

<command>-vcodec {video_codec} -pix_fmt:v nv12 -preset:v llhq -b:v {video_bitrate} -acodec {audio_codec} -b:a {audio_bitrate} -f {extension_type}</command>

</format>


-<format>

<name>ProRes</name>


-<extensions>

<extension type="mov -movflags frag_keyframe" ext=".mov" name="MOV"/>

<extension type="mov" ext=".mov" name="MOV (Indexed)"/>

</extensions>


-<video codec="prores">

<bitRate name="Proxy">0</bitRate>

<bitRate name="LT">1</bitRate>

<bitRate name="SQ">2</bitRate>

<bitRate name="HQ">3</bitRate>

</video>


-<audio codec="pcm_s16le">

<bitRate>PCM</bitRate>

</audio>

<command>-vcodec {video_codec} -profile:v {video_bitrate} -acodec pcm_s16le -f {extension_type}</command>

<interlacedSupported/>

</format>


-<format>

<name>VC-3</name>


-<extensions>

<extension type="mov -movflags frag_keyframe" ext=".mov" name="MOV"/>

<extension type="mov" ext=".mov" name="MOV (Indexed)"/>

<extension type="mxf" ext=".mxf" name="MXF"/>

</extensions>


-<video codec="dnxhd">

<bitRate name="220 1080 59.94i 29.97p">220M</bitRate>

<bitRate name="145 1080 59.94i 29.97p">145M</bitRate>

<bitRate name="45 1080 29.97p">45M</bitRate>

<bitRate name="185 1080 50i 25p">185M</bitRate>

<bitRate name="120 1080 50i 25p">120M</bitRate>

<bitRate name="36 1080 25p 24p">36M</bitRate>

<bitRate name="175 1080 24p">175M</bitRate>

<bitRate name="115 1080 24p">115M</bitRate>

<bitRate name="440 1080 59.94p">440M</bitRate>

<bitRate name="290 1080 59.94p">290M</bitRate>

<bitRate name="90 1080 59.94p">90M</bitRate>

<bitRate name="365 1080 50p">365M</bitRate>

<bitRate name="240 1080 50p">240M</bitRate>

<bitRate name="75 1080 50p">75M</bitRate>

<bitRate name="220 720 59.94p">220M</bitRate>

<bitRate name="145 720 59.94p">145M</bitRate>

<bitRate name="180 720 50p">180M</bitRate>

<bitRate name="120 720 50p">120M</bitRate>

<bitRate name="110 720 29.97p">110M</bitRate>

<bitRate name="75 720 29.97p">75M</bitRate>

<bitRate name="90 720 25p 24p">90M</bitRate>

<bitRate name="60 720 25p 24p">60M</bitRate>

</video>


-<audio codec="pcm_s16le">

<bitRate>PCM</bitRate>

</audio>

<command>-vcodec {video_codec} -b:v {video_bitrate} -acodec pcm_s16le -f {extension_type}</command>

<interlacedSupported/>

</format>

</formats>
mavik  
#7 Posted : Tuesday, August 11, 2020 6:58:57 AM(UTC)
mavik

Rank: Advanced Member

Groups: Registered
Joined: 4/23/2017(UTC)
Posts: 1,214
Man
Location: Germany

Thanks: 3 times
Was thanked: 168 time(s) in 150 post(s)
in the libx264 section change from yuv420p to yuvj422p
gotscottgreen  
#8 Posted : Wednesday, August 12, 2020 5:18:25 AM(UTC)
gotscottgreen

Rank: Member

Groups: Registered
Joined: 2/23/2018(UTC)
Posts: 17
Location: Lewisburg PA

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Thanks so much!! You mentioned that the NVENC encoders on the GPU card do 4:4:4 not 4:2:2, should I try that too? I was hoping to utilize the GPU for this if possible. I got a Quadro RTX4000 just for the 16 encoders in 1080p.
would I just add what you put above but with yuv444p?

Really appreciate your input!
Matej S  
#9 Posted : Friday, April 9, 2021 12:22:47 AM(UTC)
Matej S

Rank: Newbie

Groups: Registered
Joined: 12/28/2019(UTC)
Posts: 2
Czech Republic
Location: Prague

Hi, thanks for tips there is my result:

Add this to your ffmpegformats.xml

for GPU acceleration 444:

<format>
<name>MP4 GPU444 NVENC AAC</name>
<extensions>
<extension name="MP4" ext=".mp4" type="mp4 -movflags frag_keyframe" />
<extension name="MP4 (Indexed)" ext=".mp4" type="mp4" />
</extensions>
<video codec="nvenc">
<bitRate>50M</bitRate>
<bitRate>25M</bitRate>
<bitRate>15M</bitRate>
<bitRate>10M</bitRate>
<bitRate>8M</bitRate>
<bitRate>6M</bitRate>
<bitRate>4M</bitRate>
<bitRate>2M</bitRate>
<bitRate>1500k</bitRate>
</video>
<audio codec="libfaac">
<bitRate>384k</bitRate>
<bitRate>192k</bitRate>
<bitRate>128k</bitRate>
<bitRate>64k</bitRate>
</audio>
<command>-vcodec {video_codec} -pix_fmt:v yuv444p -preset:v llhq -profile:v high444p -b:v {video_bitrate} -acodec {audio_codec} -b:a {audio_bitrate} -f {extension_type}</command>
</format>

For CPU 422 acceleration:

<format>
<name>MP4 CPU422 x264 AAC</name>
<extensions>
<extension name="MP4" ext=".mp4" type="mp4 -movflags frag_keyframe" />
<extension name="MP4 (Indexed)" ext=".mp4" type="mp4" />
</extensions>
<video codec="libx264">
<bitRate>50M</bitRate>
<bitRate>25M</bitRate>
<bitRate>15M</bitRate>
<bitRate>10M</bitRate>
<bitRate>8M</bitRate>
<bitRate>6M</bitRate>
<bitRate>4M</bitRate>
<bitRate>2M</bitRate>
<bitRate>1500k</bitRate>
</video>
<audio codec="libfaac">
<bitRate>384k</bitRate>
<bitRate>192k</bitRate>
<bitRate>128k</bitRate>
<bitRate>64k</bitRate>
</audio>
<command>-pix_fmt yuv422p -vcodec {video_codec} -preset:v veryfast -profile:v high422 -b:v {video_bitrate} -acodec {audio_codec} -b:a {audio_bitrate} -f {extension_type}</command>
</format>
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.