I tried using simple_5_transcode in official tutorial to transcode this video https://1drv.ms/v/s!AvZvArIp3xKtkCd8XtjayCvjJzBv?e=poKR47
I set bitrate to 1500 and framerate to 24/1, when it is ran, it prints out "More input data expected. C:\Users\admin\Documents\MediaSDK-intel-mediasdk-20.5.1\tutorials\simple_5_transcode\src\simple_transcode.cpp 118" and quitted. I checked the code, and it seems that the DecodeHeader function at line 116 has returned MFX_ERR_MORE_DATA.
May I know what caused this error and how could I solve it?
- Library version: Intel® Media Software Development Kit 2020 R1
- OS info and version: Windows 10
- Compiler version: VC16
- GCC or Visual Studio version if applicable: Visual Studio 2019
- Specifics on how to reproduce the problem. Include makefiles, command lines, small test cases, and build instructions：
commandline: simple_transcode.exe -b 1500 -f 24/1 caffe-MobileNetSSD-7000-0624.mp4 outoutout.mp4
Thank you for posting your query in Media (Intel® oneAPI Video Processing Library, Intel Media SDK) forum and providing all the necessary information.
1. The error occurs because you’re trying to transcode .mp4 file.
>Transcodes (decode+encode) H.264 stream to another H.264 stream using system memory surfaces. The program decodes the input frame into the YV12 frame which is the input of the encoder; the encoder encodes the YV12 frame into the H.264 frame with the user input bitrate and frame rate while set the bitrate control to Variable Bitrate(VBR).(Please refer : readme.txt file in simple_5_transcode folder)
Intel Media SDK focuses on video elementary streams (h.264). This is where hardware acceleration is needed the most. Most source content is not in an elementary stream format. Rather it is a combination of both video and audio muxed together into a single file via a container format. It must be demuxed to a video elementary stream before processing.
2. To solve : Convert the .mp4 to h.264 using the below command
ffmpeg -i input.file -vcodec copy -an -f h264 -bsf h264_mp4toannexb video_only.264
Then try running the simple_transcode
~\_build\x64\Debug> simple_transcode.exe -b 1862 -f 30/1 video_only.264 output.264
Expected result would be of the form
Frame number: 30 Execution time: 0.54 s (55.99 fps)
Hope this helps you.
We are assuming the solution worked for you and the issue is resolved. If you need any additional information, please submit a new question as this thread will no longer be monitored.