Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

Simple_player in Ipp-samples\\audio-video-codecs\\application...

Gaiger_Chen
New Contributor I
1,717 Views
Hi

I have builded the example code of ipp-samples\\audio-video-codecs\\application\\simple_player.

I would like to use the player to play H.264 movie, (Xmen.mkv )

I typed :

simple_player.exe Xmen.mkv.

the error message said :
"Failed to initialize splitter."

then the player is stop.

by my traced, the is failed on

umcRes = rpSplitter->Init(*lpSplParams);
the umcRes is UMC_ERR_INVALID_STREAM

What should I do to play the H.264 format movie??

Is the movie format simple_player doest not support ?

By KM player, the movie information is :


General
Complete name : C:\\Documents and Settings\\gaigerchen\\My Documents\\IPP ref\\ipp-samples\\audio-video-codecs\\application\\simple_player\\Xmen.mkv
Format : Matroska
File size : 1.67 GiB
Duration : 1h 47mn
Overall bit rate : 2 223 Kbps
Encoded date : UTC 2009-08-18 02:08:20
Writing application : mkvmerge v1.7.0 ('What Do You Take Me For') built on Apr 28 2006 17:20:19
Writing library : libebml v0.7.7 + libmatroska v0.8.0
Video #1
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 1 frame
Muxing mode : Container profile=Unknown@3.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 47mn
Bit rate : 1 859 Kbps
Nominal bit rate : 1 900 Kbps
Width : 1 024 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.131
Stream size : 1.39 GiB (84%)
Writing library : x264 core 67 r1139M 1024283
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6 / psy_rd=1.0:0.0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=0 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=1900 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00
Language : English
Audio #2
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Codec ID : A_AC3
Duration : 1h 47mn
Bit rate mode : Constant
Bit rate : 320 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Stream size : 246 MiB (14%)



thank you.
0 Kudos
33 Replies
Chao_Y_Intel
Moderator
1,269 Views

Hello,

mkv splitter is not supported in the UMC sample. AVI, MP4, and MPEG TS stream are supported.

Thanks,
Chao

0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views

HI

thank your support, I have change other movie for testing.

There is audio on, but video is not been rendering.

I do not know if my input parameter is suitable, I just input

simple_player vod.mp4
or
simple_player vod.mp4 -n

How should I do now to let the player could render screen ?


Properties of the movie is :



General
Complete name : C:\Documents and Settings\gaigerchen\My Documents\IPP ref\ipp-samples\audio-video-codecs\application\simple_player\vod.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 57.5 MiB
Duration : 2mn 49s
Overall bit rate : 2 848 Kbps
Encoded date : UTC 2008-03-28 15:45:26
Tagged date : UTC 2008-03-28 15:45:26
Video #1
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L4.2
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2mn 49s
Bit rate mode : Variable
Bit rate : 2 687 Kbps
Width : 720 pixels
Height : 406 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Standard : NTSC
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.307
Stream size : 54.3 MiB (94%)
Language : English
Encoded date : UTC 2008-03-28 15:45:26
Tagged date : UTC 2008-03-28 15:45:26
Audio #2
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 2mn 49s
Bit rate mode : Variable
Bit rate : 157 Kbps
Maximum bit rate : 209 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 3.18 MiB (6%)
Language : English
Encoded date : UTC 2008-03-28 15:45:26
Tagged date : UTC 2008-03-28 15:45:26
0 Kudos
Chao_Y_Intel
Moderator
1,269 Views
Hi,

Can you try to add "-vdx" in the command line?

>simple_player -vdxvod.mp4

Thanks,
Chao
0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
HI:

I have write do the input in the code :


#define GAIGER

#ifdef GAIGER
int main(void)
#else
int main(Ipp32s argc, vm_char* argv[])
#endif
{

#ifdef GAIGER
Ipp32s argc = 3;
vm_char* argv[5];

argv[1] = (vm_char*)malloc(256*sizeof(vm_char));
swprintf(argv[1],TEXT("-nvdx"));

argv[2] = (vm_char*)malloc(256*sizeof(vm_char));
swprintf(argv[2],TEXT("vod.mp4"));

#endif
:
:

there is still audio only......

I has tried trace the video code... but, it is too complex...

So, Mr. , could you give me a hint?

thank you.

0 Kudos
Chao_Y_Intel
Moderator
1,269 Views
HI,

I saw, it use "-nvdx":
swprintf(argv[1],TEXT("-nvdx"));

should it be "-vdx"?

Thanks,
Chao
0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
Hi:

I have also tried the H.264 decoder, (in audio-video-codecs\application\umc_h264_dec_con)

similiar last post, I modify the code as :



#define GAIGER

#ifndef GAIGER
int vm_main(Ipp32s argc, const vm_char **argv)
#else
int vm_main(void)
#endif
{

#ifdef GAIGER
Ipp32s argc = 3;
vm_char *argv[5];

argv[1] = (vm_char*)malloc(256*sizeof(vm_char));
swprintf(argv[1],TEXT("-i"));

argv[2] = (vm_char*)malloc(256*sizeof(vm_char));
swprintf(argv[2],TEXT("Taipei101 sunset WMV HD 720.mp4"));
#endif
:
:



Of course, I has also modify function void CommandLine::Parse(Ipp32s argc, const vm_char** argv) to
Parse(Ipp32s argc, vm_char** argv) .

Then the program CRASH in the line :

if( UMC_OK != splitter->Init(splParams) ) (about Ln 334 )

debug assertion failed:
:
expression : auto_ptr not dereferencable


my input file is :

General
Complete name : C:\Documents and Settings\gaigerchen\My Documents\IPP ref\ipp-samples\audio-video-codecs\application\umc_h264_dec_con\Taipei101 sunset WMV HD 720.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 12.9 MiB
Duration : 1mn 54s
Overall bit rate : 947 Kbps
Encoded date : UTC 2008-03-26 20:17:24
Tagged date : UTC 2008-03-26 20:17:24
Video #1
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1mn 53s
Bit rate mode : Variable
Bit rate : 818 Kbps
Nominal bit rate : 800 Kbps
Maximum bit rate : 1 656 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.035
Stream size : 11.1 MiB (86%)
Writing library : x264 core 58
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x133 / me=hex / subme=5 / brdo=0 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=0 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=abr / bitrate=800 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30
Encoded date : UTC 2008-03-26 20:17:24
Tagged date : UTC 2008-03-26 20:17:24
Audio #2
ID : 2
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Format_Settings_Mode : Joint stereo
Codec ID : 6B
Duration : 1mn 54s
Bit rate mode : Constant
Bit rate : 128 Kbps
Maximum bit rate : 134 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Resolution : 16 bits
Stream size : 1.74 MiB (14%)
Writing library : LAME3.98b
Encoding settings : -m j -V 4 -q 3 -lowpass 17 -b 128
Encoded date : UTC 2008-03-26 20:17:24
Tagged date : UTC 2008-03-26 20:17:24


(by Pure codec)


I don know how to input the parameter, may you just give me a handle ?

Or point out a workable moive with a set of parameter.
thank you lots.

Liger


0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
Hi
Yes, I have trie the 2 case, but there is no video

The simple_player output is :

Audio Render : DSOUND
Video Render : NULL
-RenderFormat: YV12

Stream Type : MP4ATOM
Video Info :
-Video Type : H264
-Resolution : 720x406
-Frame Rate : 29.97
Audio Info :
-Audio Type : AAC_MP4
-S.Frequency : 48000
-Num.Channel : 2
-BitPerSample: 16

DecRate:40.96 fps(Dec 22.33ms/f + Conv 2.08ms/f = 24.41ms/f) RndrRate 52.58fps A
udio Dec 27.21chnls
DecRate:68.69 fps(Dec 14.15ms/f + Conv 0.41ms/f = 14.56ms/f) RndrRate 30.68fps A
udio Dec 50.96chnls
:
:

(f the movie format , the simple_play does not support ?( ?)

Thank you.

0 Kudos
Chao_Y_Intel
Moderator
1,269 Views

Hello,

Could you attach the video stream? so we can have a check here.
There was an old issue on the rendering here:
http://software.intel.com/en-us/articles/the-directx-render-in-umc-sample-failing-at-windows-7-or-windows-vista/

Is this the problem?

Thanks,
Chao
0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
HI :

My OS is windows XP sp3, Should modiy my player code?

This attahment is movie for umc_h264_dec_con.

The main function on umc_h264_dec_con. has been modify as :

#define GAIGER

#ifndef GAIGER
int vm_main(Ipp32s argc, const vm_char **argv)
#else
int vm_main(void)
#endif
{

#ifdef GAIGER
Ipp32s argc = 3;
vm_char *argv[5];

argv[1] = (vm_char*)malloc(256*sizeof(vm_char));
swprintf(argv[1],TEXT("-i"));

argv[2] = (vm_char*)malloc(256*sizeof(vm_char));
swprintf(argv[2],TEXT("Taipei101 sunset WMV HD 720.mp4"));
#endif

and :

#if(0)
CommandLine(Ipp32s argc, const vm_char** argv) { Parse(argc, argv); }
#else
CommandLine(Ipp32s argc, vm_char** argv) { Parse(argc, argv); }
#endif

(just writedown the input filename directly.)

thank you.



0 Kudos
Chao_Y_Intel
Moderator
1,269 Views

Hello,

umc_h264_dec_con appliction does not include the render. The simple player application does.
I just checked your attaced file. I can see the video inthescreenwiththe following command line:

\>simple_player.exe -vdx "Taipei101+sunset+WMV+HD+720.mp4"

Could you please check if it works for you there if you run the simple player?

Thanks,
Chao


0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
HI:

That is my mistake, I use the "build32.bat" to build library, and use standard visual studio IDE

to build the simple_player without rebuild all.

after I clean and rebuild, the simple_player works.

anyway, thank your help !!





0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
Hi

About the umc_h264_dec_con, I input in command line:


umc_h264_dec_con -f yuv420 -i "Taipei101+sunset WMV +HD+720.mp4" -o AA.yuv

or just

umc_h264_dec_con -i "Taipei101+sunset WMV +HD+720.mp4"

the out put is : Video Decoder creation fail


By my trace, that is fail in the line :


if (UMC_OK != h264Decoder->GetInfo(&params))

it is becouse (in umc_h264_task_supplier.cpp):


if (m_CurrentSeqParamSet == -1 && !m_bSeqParamSetRead)
{
return UMC_ERR_NOT_INITIALIZED;
}


/*the m_bSeqParamSetRead is -1*/

so, what command I should input, to convert the movie as yuv format?

thank you.
0 Kudos
Chao_Y_Intel
Moderator
1,269 Views

Hi,

You need to use simple play application.

\>simple_player.exe -vfwf out.yuv "Taipei101+sunset+WMV+HD+720.mp4"

umc_h264_dec only decodes the rawH.264 file. The file you attached also needs MP4 splitter.

Thanks,
Chao

0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
hi

thank you, it do work.

but there are some problem:

1. As your instruction, it does decode to YUV(420) format, but the simplay_player seem go into

a infinite loop . When the out.yuv file has done(~ 3.84G), and I have waited about 30mins, the command

line (dos) does not back to command prompt (C:\...\>).


2. I have use 2 YUV player to render the out.yuv :

http://www.yuvplayer.com/

http://dcmc.ee.ncku.edu.tw/~wjh94m/YUVplayer/index.html

(set h = 1280, w = 720 and format = yuv420)

I found that, the color of the movie became very strange in both player (as below).

Do you know where I get wrong ?

Thank you again.

Original screen from H.264:

Taipei101_H264.JPG


The screen after YUV decode:










0 Kudos
Chao_Y_Intel
Moderator
1,269 Views


From the attached the picture, it looks that the U and V plane order is reversed.

When I play the output YUV data with IYUV format, it looks fine. What format did you use to play the output file?

Thanks,
Chao

0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
Hi

Sorry, I got noob.

May I ask what yuv player you use? The 2 players which I list above seem do not support "IYUV" (just YUV 444 420 ..etc).

Or, may the simple_player could output the file with swapped U and V component?

thank you lots again...


0 Kudos
Chao_Y_Intel
Moderator
1,269 Views

Hi,

I tried to set the output as yuv420, not YV12. It can be played.

See if the following command line works for you?

\>simple_player.exe -fyuv420 -vfwf out.yuv "Taipei101+sunset+WMV+HD+720.mp4"

Thanks,
Chao

0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
:


,





0 Kudos
Gaiger_Chen
New Contributor I
1,269 Views
HI:

The simple player could not render again.

I just do as before:

simple_player -vdx Taipei101.mp4

I found that that is the driver initializing fail:


umcRes = (Status)pParams->m_pDrvSpec->drvInit(&m_Driver,
pParams->m_pDrvParams);



the umcRes is VM_NOT_INITIALIZED

line 105, in unified_video_render.cpp


it is becouse in the dx_drv.cpp :

if ((NULL == drv->dd_obj) || (false == drv->dd_support_overlay))
{
ERR_SET(VM_NOT_INITIALIZED, "initialization");
}
the drv->dd_support_overlay is false.

it is ,

caps.dwCaps = 0x002000000
DDCAPS_OVERLAY = 0x000008001




so the video render is NULL:

Audio Render : DSOUND
Video Render : NULL
-RenderFormat: YV12

Stream Type : MP4ATOM
Video Info :
-Video Type : H264
-Resolution : 1280x720
-Frame Rate : 25.00
Audio Info :
-Audio Type : MP1L3
-S.Frequency : 44100
-Num.Channel : 2
-BitPerSample: 16



Then, what may be this wrong?
driver fail ?

my system :

windows XP sp3.

but in other players or game, the driver works normally.

thank your instruction.



/////
Oh, it is my noob, I use dxdiag, I found that my computer does not be turned on directShow/directX acceleration !!

anyway, that works. :)
0 Kudos
Gaiger_Chen
New Contributor I
1,173 Views
Hi Chao:

I tried to use umc_video_enc_con.exe to encode the Taipei101.yuv which been generated by

simple_player -fyuv420 -vfwf Taipei101.yuv Taipei101+sunset+WMV+HD+720.mp4.


I type :

umc_video_enc_con.exe h264 -i Taipei101.yuv -f 25 -w 1280 -h 720 -o Taipei101.mp4


The Taipei101.mp4, could been played by simple_player

but could not been play by pure codec or media player. (they said, lost decoder).

and the size is 66.8MB, much bigger than original (13.6MB).

So, could you talk me, what parameter I should input, to modified the H264 output?

thank you.
0 Kudos
Reply