I need help. I am trying to decode rtsp stream from VLC.
- I used the VLC streaming feature to stream a file with tracnscoding activated for Profile: Video - H.264 + MP3 (MP4).
- Then i used ffmpeg avformat_open_input on the rtsp url. And used av_read_frame to receive the bitstream from the rtsp stream.
- 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.
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.
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?
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.