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.

Why VLC display differently from sample_decode program for the same sample_encode output

yu__leon
Beginner
330 Views
Hi there,
 
I am trying the sample_encode and sample_decode programs from the Media SDK  2018 R1 API version 1.26 on windows 10
 
the input file for encoding can be played by a raw yuv player correctly. 
 
however I have two questions regarding to the generated encoding output file:
 
1.  when trying to play the encoding output file on VLC, it plays only part of the video contents. i.e. the video finishes before the full content as compared to the input yuv file.  However,  the sample_decode -r option does  render the full content  given the same encoding output file.
 
2. the sample_decode renders the video at a much higher frame rate compared to  raw yuv input.  i.e. if the input yuv file plays for 10 seconds, the sample_decode would complete the full video content in 3 seconds.  Is this expected? 
 
 Any advice is greatly appreciated. thank you.
 
here is the command prompt message for sample_encode and sample_decode programs
 
D:\MyProjects\IntelMediaSDK\samples\samples\_build\x64\Debug> .\sample_encode.exe -nv12 -tff -sw h264 -u speed -i "d:
\intelsdk_test\nv12.yuv" -o "d:\intelsdk_test\sample_encode.h264" -w 720 -h 576 -dump "d:\intelsdk_test\config.txt"
Encoding Sample Version 8.3.26.0
 
Input file format       NV12
Output video            AVC
Source picture:
        Resolution      720x576
        Crop X,Y,W,H    0,0,720,576
Destination picture:
        Resolution      720x576
        Crop X,Y,W,H    0,0,720,576
Frame rate      30.00
Bit rate(Kbps)  3000
Gop size        60
Ref dist        4
Ref number      0
Idr Interval    0
Target usage    speed
Memory type     system
Media SDK impl          sw
Media SDK version       1.26
 
Processing started
Frame number: 241
Encoding fps: 74
 
Processing finished
 
 
 
 
PS D:\MyProjects\IntelMediaSDK\samples\samples\_build\x64\Debug> .\sample_decode.exe h264 -sw -i "D:\intelsdk_test\sampl
e_encode.h264" -r
Decoding Sample Version 8.3.26.0
 
 
Input video     AVC
Output format   NV12
Input:
  Resolution    720x576
  Crop X,Y,W,H  0,0,0,0
Output:
  Resolution    720x576
Frame rate      30.00
Memory type             d3d
MediaSDK impl           sw
MediaSDK version        1.26
 
Decoding started
Frame number:  241, fps: 195.018, fread_fps: 0.000, fwrite_fps: 1723.559
Decoding finished
 
 
0 Kudos
2 Replies
Mark_L_Intel1
Moderator
330 Views

Hi Leon,

#1. Media SDK uses the standard raw stream file to input the content which follows the video standard, VLS might have its own parser for the input file, the problem could happen in both side, but the current scenario can't tell me which one has the problem.

#2. Yes, this is expected since you got the full hardware speed. You can use "-f <framerate>" to get the normal rendering rate you expected.

Mark 

 

0 Kudos
yu__leon
Beginner
330 Views

thanks for replying.   the encoded h.264 stream plays correctly after putting into mp4 container. 

0 Kudos
Reply