Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Mike_D_1
Beginner
97 Views

Recommended method of generating H264 input, and rendering YUV output from the sample_decode tutorial

Jump to solution

I've been investigating multiple issues related to the Intel Media SDK sample H.264 encoder and decoder DirechtShow filters. For references, see https://software.intel.com/en-us/forums/topic/532362.

Since it was suggested in the comments to test the decoder and encoder separate from the direct show filters, I have started to look at the tutorial samples. In particular the sample_decode tutorial provided in the http://software.intel.com/sites/default/files/mediasdk-tutorials-0.0.3.zip package.

The tutorial expects an H.264 elementary stream but it is not clear the exact format that is expected (as far as I know there is no standard way of storing H.264 bitstream). After fiddling with multiple method of generating a suitable input stream I successfully extracted such a stream from an MP4 file I had previously recorded from the webcam. The method that worked was to use ffmpeg with the following set of paramters:

ffmpeg.exe -i input_file.mp4 -vcodec copy -vbsf h264_mp4toannexb -an -f h264 video_stream.h264

Nonetheless I'd like to know if there is a recommended method (perhaps easier) to generate the H.264 stream required by the sample.

Once I had a valid H.264 input stream I ran the sample_decode example on it to produce a decoded stream:

sample_decode.exe video_stream.h264 video_frames.yuv

This appears to have been successful, and it generated an output file that supposedly contains raw YUV frames.

How can I verify that these frames were correctly decoded (meaning that they correctly represent the original video)?

I've been searching for a method to render the YUV stream using DirectShow or some other method without success.

OS: Windows 7 x64
MFX: software mode
Processor: Intel Core i7 (first generation)

0 Kudos
1 Solution
97 Views

"Nonetheless I'd like to know if there is a recommended method (perhaps easier) to generate the H.264 stream required by the sample." -> I have used YAMB software so far to extract streams from MP4 files, and it works great.

"How can I verify that these frames were correctly decoded (meaning that they correctly represent the original video)? " -> YUVPlayer is a very good utility for viewing YUV files. (http://www.yuvplayer.com/)

View solution in original post

2 Replies
98 Views

"Nonetheless I'd like to know if there is a recommended method (perhaps easier) to generate the H.264 stream required by the sample." -> I have used YAMB software so far to extract streams from MP4 files, and it works great.

"How can I verify that these frames were correctly decoded (meaning that they correctly represent the original video)? " -> YUVPlayer is a very good utility for viewing YUV files. (http://www.yuvplayer.com/)

View solution in original post

Mike_D_1
Beginner
97 Views

Thanks for pointing me towards both tools.

Using Yamb to extract the H264 stream is definitely a bit easier than manually typing the parameters for ffmpeg.

As far as the YUVPlayer, that did the trick and I was able to determine that the output format from sample_decode is YUV420.

As a side note, it turns out that the decoded frames look good which means that there is yet another problem with the sample Direct Show filters. The H.264 decoder filter produces several artifacts (solid green pathes) when decoding the source file but that is best left for a separate thread, after I've had some time to investigate more.

Reply