Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Paul_W_2
Beginner
154 Views

Unable to decode rtsp stream from VLC

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
154 Views

Hi Paul,

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

 

Thanks,

Zachary

 

Paul_W_2
Beginner
154 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

Jiandong_Z_Intel
Employee
154 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

Paul_W_2
Beginner
154 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

Jiandong_Z_Intel
Employee
154 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