Community
cancel
Showing results for 
Search instead for 
Did you mean: 
david123456
Beginner
77 Views

How to encoding a raw video to N streams using EXT LA BRC

Hi,

We want to encode a raw video (from capture card) to N streams using EXT LA BRC for web use.  Only see multi-transcode sample tell us how to transcode one stream to N streams. Could you give us a multi-encode sample?

0 Kudos
8 Replies
Jiandong_Z_Intel
Employee
77 Views

Hi There,

Currently, we have no multi-encode sample. You can base on MSDK sample_encode create your application.

If you want to test multi-encode, you can also start multiple sample_encode process for test.

 

Thanks,

Zachary

Wei_F_
Beginner
77 Views

I also came across to this problem. I was hope to put raw video data to the decoded surfaces, but found that in the original demo the decoded surfaces was empty, the data points are zero. So I wonder if I found the wrong place? Could you please tell me where did the multi-encode sample put the decoded data. Thank you.

david123456
Beginner
77 Views

Our application is one to N encode scenario. Sample_encode dosn't deal with ext_LA. Start multiple sample_encode may excute LA multiple times. It is low efficiency.

See Mediasdk-man.pdf page146 as follow:

Standalone LA by ENC class of functions is executed only once for input bitstream in contrast to the integrated LA where LA is executed for each of output streams. 

david123456
Beginner
77 Views

Hi Zachary,

Could you give me a sample_encode with ext_la BRC or tel me how to add ext_la BRC in sample_encode?

Jiandong_Z_Intel
Employee
77 Views

Hi There,

sample_encode support Look Ahead MFX_RATECONTROL_LA  for H264, you can try following command line

#./sample_encode h264  -hw -i water.yuv -o water-la-out.h264 -w 720 -h 480 -la -lad 20
 

Thanks,

Zachary

david123456
Beginner
77 Views

Hi Zachary,

Yes,  sample_encode support Look Ahead MFX_RATECONTROL_LA.

But we want LA_EXT for 1:N scenario, not LA.

 

 

david123456
Beginner
77 Views

Hi intel,

Who can help me?

Jiandong_Z_Intel
Employee
77 Views

Hi,

Merge some code from sample_multi_trancode to sample_encode, I think is mfxExtLAControl a key structure.

$ find -type f | xargs grep -e m_ExtLAControl -n
./samples/sample_multi_transcode/include/pipeline_transcode.h:510: mfxExtLAControl m_ExtLAControl;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:135: MSDK_ZERO_MEMORY(m_ExtLAControl);
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1840: mfxU16 num_resolutions = m_ExtLAControl.NumOutStream;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1842: sizeof(mfxLAFrameInfo)*num_resolutions*m_ExtLAControl.LookAheadDepth;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1860: pExtBuffer->NumAlloc = num_resolutions*m_ExtLAControl.LookAheadDepth;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1921: MSDK_ZERO_MEMORY(m_ExtLAControl);
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1922: m_ExtLAControl.Header.BufferId = MFX_EXTBUFF_LOOKAHEAD_CTRL;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1923: m_ExtLAControl.Header.BufferSz = sizeof(m_ExtLAControl);
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1924: m_ExtLAControl.LookAheadDepth = pInParams->nLADepth? pInParams->nLADepth : 40;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1925: m_ExtLAControl.NumOutStream = 0;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1926: m_ExtLAControl.BPyramid = (mfxU16)(pInParams->bEnableBPyramid ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF);
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1940: m_PreEncExtParams.push_back((mfxExtBuffer *)&m_ExtLAControl);
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1954: mfxU32 num = m_ExtLAControl.NumOutStream;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1958: if (m_ExtLAControl.OutStream.Width == width && m_ExtLAControl.OutStream.Height == height)
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1961: MSDK_CHECK_RESULT((sizeof(m_ExtLAControl.OutStream) / sizeof(m_ExtLAControl.OutStream[0])),num + 1 , MFX_ERR_UNSUPPORTED);
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1962: m_ExtLAControl.OutStream[num].Width = width;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1963: m_ExtLAControl.OutStream[num].Height = height;
./samples/sample_multi_transcode/src/pipeline_transcode.cpp:1964: m_ExtLAControl.NumOutStream = (mfxU16)num + 1;

hope it helpful.

Thanks,

Zachary

Reply