How to process raw UDP packets so that they can be decoded by a decoder filter in a directshow source filter

Peace of cake! 1. Get the data As I can see, you already know how to do that (start RTSP session, SETUP a RTP/AVP/UDP;unicast; transport, and get user datagrams)… but if you are in doubt, ask. No matter the transport (UDP or TCP) the data format is mainly the same: RTP data: [RTP Header – …

Read more

Possible Locations for Sequence/Picture Parameter Set(s) for H.264 Stream

First off, it’s important to understand that there is no single standard H.264 elementary bitstream format. The specification document does contain an Annex, specifically Annex B, that describes one possible format, but it is not an actual requirement. The standard specifies how video is encoded into individual packets. How these packets are stored and transmitted …

Read more

FFMPEG (libx264) “height not divisible by 2”

The answer to the original question should not scale the video but instead fix the height not divisible by 2 error. This can be achieve using this filter: -vf “pad=ceil(iw/2)*2:ceil(ih/2)*2” Full command: ffmpeg -i frame_%05d.jpg -vcodec libx264 \ -vf “pad=ceil(iw/2)*2:ceil(ih/2)*2” -r 24 \ -y -an video.mp4 Basically, .h264 needs even dimensions so this filter will: …

Read more