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.

Unable to decode rtsp stream from VLC

Paul_W_2
Beginner
2,277 Views

Hi everyone,

I need help. I am trying to decode rtsp stream from VLC. 

  1. I used the VLC streaming feature to stream a file with tracnscoding activated for Profile: Video - H.264 + MP3 (MP4). 
  2. Then i used ffmpeg avformat_open_input on the rtsp url. And used av_read_frame to receive the bitstream from the rtsp stream.
  3. I push the bitstream into intel decoder and it is not able to find the header and cannot decode.

This is the starting few bytes of each frame. Please help if you can. Really appreciate it.

packet 1: 00 00 00 01 01 9f 7c 69 10 97 1e f2 ...

packet 2: 00 00 00 01 41 9b 7f 49 a8 41 68 99 ...

packet 3: 00 00 00 01 41 9b 82 49 e1 0a 52 65 ...

....

From what i see it streams in NAL annex b format since it has the start codes and is supported by intel decoder. How come it cannot decode anything from VLC rtsp?

Please help. Thanks in advance. 

0 Kudos
5 Replies
Jiandong_Z_Intel
Employee
2,277 Views

Hi Paul,

Are you trying to use FFMPEG call Intel QSV to decode rtsp stream from VLC ?

 

Thanks,

Zachary

 

0 Kudos
Paul_W_2
Beginner
2,277 Views

Hi Zachary,

Thanks for replying. No I am not using FFMPEG to call QSV. I have a standalone intel media sdk decoder. I just used the ffmpeg to extract the rtsp bitstream so that I can feed it into the decoder. I think the rtsp stream sends the sps and pps nal unit only once at the beginning. And ffmpeg consumed them before outputting the rtsp bitstream. I tried an using an axis ip camera. It gives the same problem.

Paul

0 Kudos
Jiandong_Z_Intel
Employee
2,277 Views

Hi Paul,

If possible you dump the rtsp stream to file with ffmpeg, then try to check if the file can be decode ? 

Thanks,

Zachary

0 Kudos
Paul_W_2
Beginner
2,277 Views

Hi Zachary,

I found the issue. But i cannot solve it nicely. The RTSP stream only sends our the SPS and PPS through handshake and not in the bytestream itself. I had to use wireshark to identify the SPS and PPS and hardcode it to send out together with the bytestream. This works and i get the video to decode using intel decoder. 

This might not be a question for this forum, but how can i extract an rtsp SPS and PPS from ffmpeg programatically so i can send it to the decoder?

 

Thanks,

Paul

0 Kudos
Jiandong_Z_Intel
Employee
2,277 Views

Hi Paul,

Actually, RTSP stream is out of range of MSDK support.

Different stream tools may cause different stream feature in my mind. you have selected ffmpeg as rtsp steam receive tools, how about try to use ffmpeg sream tools as your streaming feature to stream a file instead of VLC ? like ffserver in ffmpeg.

 

Thanks,

Zachary

 

0 Kudos
Reply