Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Convert Encode RGB24 Uncompress Avi file to H.264

Omar_Barlas
Beginner
1,718 Views
I'm test Intel Media SDK now.

When I run sample program to encode RGB24 Un-compress avi video toencoded h264 OR MPEG2 file does not played inMedia Player. In VLC file play with show only Color Lines which move Horizontal and Vertical and Framerate also increase from 30 to 60

I convert the RBG24 to YUV420 Formt but result still same.

Encoded File screenshort is below



Thank in Advance


0 Kudos
20 Replies
Nina_K_Intel
Employee
1,692 Views
Hello Omar,

If you are using sample_encode please note that it requires pure raw video stream as input. AVI container contains meta information which being encoded as frame data results in such artifacted stream. As for output stream not playable with Windows Media Player this is again due to the sample specifics - it produces an elementary video stream. WMP is not able to playback elementary h.264 format.

If you would like to convert an AVI to MP4 for example you may use Media SDK Direct Show samples with GraphEdit application (FileSource Async->AVI Splitter->Color Converter -> Intel Media SDK H.264 Encoder -> Intel MSDK MP4 Muxer -> FileWriter)

Regards,
Nina
0 Kudos
gthomaz
Beginner
1,692 Views
And if you have some trouble connecting "Color Converter -> Intel Media SDK H.264 Encoder" (like Nina said), please make a search in this forum.... ;)

Good luck!
0 Kudos
Omar_Barlas
Beginner
1,692 Views
Thanks for Help.

But After convert Avi video to Raw YUV format.Now I got Following Result

Source Video:




Encoded Video:




Tnanks in Advance
0 Kudos
Nina_K_Intel
Employee
1,692 Views
Hi Omar,
Sample_encode requires YUV 420 format and your source is YUY2 (YUV 422) as I see.
Nina
0 Kudos
Omar_Barlas
Beginner
1,692 Views

Thanks for Reply

I Convert RGB to I420 format and then encode to MPEG2. Now Encoded Video Show good result but images are move horizontally as shown in below Image.



Sourc Image:

0 Kudos
Nina_K_Intel
Employee
1,692 Views
The result looks like you have provided wrong resolution to the sample_encode (width/2 instead of actual width). Could you share the command line you are using? Also please share the raw video after color conversion - you may cut several first frames and attach the stream here.

Nina
0 Kudos
gthomaz
Beginner
1,692 Views
Are you using I420 like:


Y0Y1Y4Y5
Y2Y3Y6Y7.....
.....
U...
V....


???

I don't know if I could explain.. but, are you shure that you are setting Y's correctly ?
0 Kudos
Omar_Barlas
Beginner
1,692 Views
command

sample_encode mpeg2 -i 1.yuv -o result.mp4 -w 720 -h 576

and Source and Result File can be Download at following Link
http://www.sonovision2.com/downloads/VideoFile.zip



and one more question is that can i used Intel SDK H264 or Mpeg2 decoderin VB.net or Window Media Player as Decoder?
0 Kudos
Omar_Barlas
Beginner
1,692 Views
Hi gthomaz

I don't kwn what is Y's setting. I convert RGB24 Source Avi file to Raw I420 format using following Command

mencoder.exe -of avi Source.avi -o 1.yuv -vf format=I420 -nosound -ovc raw

0 Kudos
Nina_K_Intel
Employee
1,692 Views
Hi Omar,

As far as the input YUV file for the sample_encode already looks bad this means you are doing something wrong at conversion stage. This is not an encoding problem.

In your command line for mencoder.exe please try removing '-of' option, it is mispaced and probably takes effect and results in avi container at output again.

Try this line
mencoder Source.avi -ovc raw -vf format=i420 -o out.yuv

If this doesn't help please share the Source.avi.

Nina
0 Kudos
Nina_K_Intel
Employee
1,692 Views
Regarding your other questions. As for VB.Net there was an answer posted in your older threadhttp://software.intel.com/en-us/forums/showthread.php?t=82102&o=a&s=lr

As for Windows Media Player it should be possible to use Media SDK decoders through Media Foundation and Direct Show sample decoder plugins. Likely you will need to experiment with GUIDs and merits to make WMP use those plugins, but it should work. Please give it a try.

Regards,
Nina
0 Kudos
Omar_Barlas
Beginner
1,692 Views
Hi Nina

I tried this line
mencoder Source.avi -ovc raw -vf format=i420 -o out.yuv

but result still same. I upload Source and Result Files at following Link
http://www.sonovision2.com/downloads/SourceFile.zip
0 Kudos
Nina_K_Intel
Employee
1,692 Views
Hi Omar,

I checked mencoder at my side - the problem is that the default output container is AVI. To actually get the raw video stream you need to add the option -of rawvideo.

The whole line should be:mencoder Source.avi -of rawvideo -ovc raw -vf format=i420 -o out.yuv

I checked that it provides a raw video stream. The only problem I saw - some corruption on the first several frames. Seems that there's a problem in mencoder's color conversion algorithm.

To overcome this I used VirtualDubMode to change compression inside avi from cvid to IYUV and after that used mencoder to extract raw video from an avi. Having done all that I achieved a totally good looking YUV stream.

Please try. Also be sure to use the correct resolution with sample_encode after that - I noticed that Source.avi has the resolution 1024x768 and you encoded as 720x480.

Best regards,
Nina
0 Kudos
Omar_Barlas
Beginner
1,692 Views
Hi Nina,

Thanks I also get good looking Video but Video movehorizontally and not playback as Video.
How can i solve this issue?

0 Kudos
Nina_K_Intel
Employee
1,692 Views
Hi Omar,

Based on the Source.avi you shared, the raw video after conversion and the encoded video after encoding with sample-encode playback totally fine at my side. Horizontal movement shows that you still get an avi file after conversion. Please check the command line arguments of mencoder.

Regards,
Nina
0 Kudos
Omar_Barlas
Beginner
1,692 Views
Hi Nina

Thanks for help. Issue is Fixed.
0 Kudos
Nina_K_Intel
Employee
1,692 Views
Very glad to hear that!
-Nina
0 Kudos
Work_B_
Beginner
1,692 Views

I use iDealshare VideoGo to convert AVI to H.264, MPEG-4, MPEG-2,

Here is the step by step guide at http://www.idealshare.net/video-converter/avi-to-mp4-converter-mac-windows.html

0 Kudos
Work_B_
Beginner
1,692 Views

Have you tried iDealshare VideoGo which can easily convert AVI to MPEG-2, H.264 or MPEG-4.

0 Kudos
CNeva
Beginner
1,463 Views

Work B. wrote:

Have you tried iDealshare VideoGo which can easily convert AVI to MPEG-2, H.264 or MPEG-4.

The converter you recommend is a shareware, you have to pay for it to get the full version, or else there will be a big watermark in the converted video. To convert video, I'd recommend an online app called Acethinker Video Converter, It's a free web-based application to convert videos, you don't have to install anything. No watermark and limitation.
 

 

0 Kudos
Reply