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.
3056 Discussions

simple_6_transcode_opaque ffmpeg sample encode problem

Andreas_S_3
Beginner
354 Views
I have built the sample simple_6_transcode_opaque - async - ffmpeg from the Media SDK tutorial, and I am trying to run a session described in the MediaSDK FFMPEG white paper. Under point 3 it is stated: Encode raw YUV video data into AVC(H.264) video stream. Mux into mp4 container. So I run the example attached to the debugger with sample_encode.exe h264 -i video.yuv -w 640 -h 480 -o out.mp4 -hw -d3d -mux -b 1000 -f 30 I have tried to leave out the -hw -d3d switches. No matter what I try, I always get an error FFmpeg_Reader_Init() - avformat_find_stream_info() returns always -1. Since I could not fine the file video.yuv I used the file test_stream.yuv from the content directory of the Media SDK. Any idea to get a file that runs the sample as described in the white paper would be greatly appreciated. Thanks!
0 Kudos
4 Replies
Petter_L_Intel
Employee
354 Views

Hi Andreas,

Not sure exactly what may be going on.

Is the "simple_6_transcode_opaque - async - ffmpeg" transcode sample working ok? If that is the case, please compare it to the src code you are using for just encode + muxing, there may be some slight differences, requiring updates.

Also, it is possible, that if you are using a recent release of the FFmpeg binaries the FFmpeg APIs may have changed since the creation of this sample, thus resulting in some incompatibility.

Regards,
Petter 

0 Kudos
Andreas_S_3
Beginner
354 Views
Hello Petter, thanks for your note - no, and that is my main problem. Before getting our own sourcecode to work, I want to understand and debug the "simple_6_transcode_opaque - async - ffmpeg" transcode sample . I am using the FFMPEG build from “2012-08-27” as described in the white paper. The problem always is, that FFmpeg_Reader_Init() - avformat_find_stream_info() returns always -1. ffmpeg_integration.cpp line 101. I assume I just use an 'incorrect' input file? I cannot locate the file "video.yuv" that is referred to in the white paper. Here are my command line arguments: sample_encode.exe h264 -i video.yuv -w 176 -h 96 -o out.mp4 -mux -b 1000 -f 30 When I break in ffmpeg_integration.cpp line 101, I have the following information in the Visual Studio command window. [IMGUTILS @ 0045e794] Picture size 0x0 is invalid [IMGUTILS @ 0045e62c] Picture size 0x0 is invalid [rawvideo @ 002e33e0] Could not find codec parameters for stream 0 (Video: rawvi deo, yuv420p): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options [rawvideo @ 002e33e0] Estimating duration from bitrate, this may be inaccurate FFMPEG: Couldn't find stream information Thanks, Andreas
0 Kudos
Petter_L_Intel
Employee
354 Views

Hi Andreas,

Based on your description I do not understand your setup. You refer to two different samples, (1) the transcode sample "simple_6_transcode_opaque - async - ffmpeg" part of the Media SDK tutorial, and (2) the quite old encode sample code that was part of Media SDK muxing with FFmpeg white paper.

The code reference "FFmpeg_Reader_Init" is part of (1) but the line number you refer to is not corresponding to the tutorial sample code which leads me to believe you are using your own modified code.

Note that (1) is a transcode sample and the call to avformat_find_stream_info() in FFmpeg_Reader_Init() is used to parse a media container not a raw YUV file.

Then in your post you abruptly refer to a command line which corresponds to the encode sample (2) ?

Regards,
Petter 

0 Kudos
Andreas_S_3
Beginner
354 Views
Hello Petter, thanks for your note and help. I did indeed get the line numbers in "FFmpeg_Reader_Init", as well as the two different samples for the FFMPEG integration mixed up a bit. I have it all working now. Thanks, Andreas
0 Kudos
Reply