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

Sample passing FFmpeg and base stream of MPEG-4 to VPL decoder?

parksh
New Contributor I
1,098 Views

Hi,

 

You answered my question last time.
Let me ask you another question.

 

https://community.intel.com/t5/Media-Intel-oneAPI-Video/Can-I-use-both-MFXInit-and-MFXLoad-in-one-application/m-p/1455754/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufExFNEg5Q0I4NjJUR1hUfDE0NTU3NTR8U1VCU0NSSVBUSU9OU3xoSw

 

Can I get a sample that delivers the basic stream of FFmpeg and MPEG-4 to the VPL decoder?

Even if it is not FFMPEG-4 processing, I would also like to get a sample that delivers the basic stream supported by VPL to VPL.

 

Thank you in advance.

0 Kudos
8 Replies
AlekhyaV_Intel
Moderator
1,059 Views

Hi,

 

Thank you for posting in Intel Communities. We apologize to inform you that MPEG-4 is not supported by oneVPL at present. However, MPEG-2 is supported.

We have provided the list of supported codecs for oneVPL.

https://www.intel.com/content/www/us/en/docs/onevpl/upgrade-from-msdk/2021-3/supported-codecs.html

 

We have passed MPEG-2 video file to VPL decoder using sample_encode sample. Please find the steps below:

1. Converted a mp4 video to mpeg-2 video file

 

ffmpeg -i input.mp4 -c:v mpeg2video output-mpeg2.mp4

 

 

2. sample_decode.exe, along with other executables(encode, vpp, etc.), is available in /bin/ folder in VPL installed directory. You could try the below command to pass MPEG-2 video file to VPL decoder.

 

sample_decode.exe mpeg2 -i output-mpeg2.mp4 -o output.raw

 

 

3. A raw video file would be generated. Below command would be used to play that raw video.

 

ffplay -v info -f rawvideo -pixel_format nv12 -video_size 1920x1080 output.raw

 

 

If this resolved your issue, make sure to accept it as a solution. This helps others with similar issue. Thanks in advance!

 

Regards,

Alekhya

 

0 Kudos
parksh
New Contributor I
1,034 Views

Thank you for your answer

ffmpeg to the vpl decoder, c++ code sample required
Do you have any samples of c++ code?

 

Thanks in advance!

0 Kudos
AlekhyaV_Intel
Moderator
1,018 Views

Hi,


All the VPL samples are written in C++. Could you please elaborate the below sentence?

Ffmpeg to VPL decoder, code sample required.

We have samples to for decoding, encoding, transcoding and applying VPP filters. You could download Base Toolkit or oneVPL standalone library to get samples.(https://www.intel.com/content/www/us/en/developer/tools/oneapi/onevpl.html)


Regards,

Alekhya


0 Kudos
parksh
New Contributor I
1,014 Views

use VPL for MPEG-4 decoding, you have to use a splitter(container->elementary) like FFmpeg on MPEG-4 and pass the elementary stream to VPL decoder.

-> You gave me this answer

 

I was wondering if there is any c++ code that passes the unsupported codec, the FFMPEG-4 codec, to the VPL using FFMPEG.

 

I'm sorry that it's not smmoth because I ased using translattion.

 

Thank you!

0 Kudos
AlekhyaV_Intel
Moderator
1,000 Views

Hi,

 

We apologize that there's no sample for converting the unsupported codec and passing it to VPL decoder. But here's a workaround to convert mpeg-4 file to mpeg-2 video file using FFMPEG commands and pass it to VPL decoder.

 

Please find the below command which converts an MPEG-4 video file to MPEG-2 file:

ffmpeg -i input.mp4 -c:v mpeg2video -b:v 8000k -c:a mp2 -b:a 384k output.mpg

 

Here's what each option in the command does:

  • -i input.mp4: Specifies the input file, which is the MPEG-4 file you want to convert.
  • -c:v mpeg2video: Sets the video codec to MPEG-2.
  • -b:v 8000k: Specifies the video bitrate to 8000 kilobits per second.
  • -c:a mp2: Sets the audio codec to MPEG-1 Audio Layer II (MP2).
  • -b:a 384k: Specifies the audio bitrate to 384 kilobits per second.
  • output.mpg: Specifies the output file, which is the MPEG-2 file you want to create.

 

If this resolves your doubts/issues, make sure to accept this as a solution. This helps others with similar issue. Thanks in advance!
 
Regards,
Alekhya
0 Kudos
AlekhyaV_Intel
Moderator
954 Views

Hi,


Has the solution provided helped? Could you please give us an update regarding this issue?


Regards,

Alekhya


0 Kudos
parksh
New Contributor I
903 Views
0 Kudos
AlekhyaV_Intel
Moderator
884 Views

Hi,


Thank you for getting back to us. As your issue is resolved, we are closing this thread now. If you need any further assistance, please post a new question as this thread will no longer be monitored by Intel.


Regards,

Alekhya


0 Kudos
Reply