Incorrect field order in playback of interlaced MPEG2 stream from DVB on a Mac (OpenGL sink)
I've been using
gst-launch playbin uri=... to play MPEG transport streams from DVB. On a Mac, playback of SD video (576i) is unwatchable. It looks as if it's treating the video as 50Hz progressive, but crucially it's playing the fields in reverse order, so all movement rapidly jerks backwards and forwards. The same video plays back correctly on Arch Linux (with xv sink), and HD video also plays correctly on the Mac. Both OS's are using gstreamer 1.18.0.
I've uploaded .dot files and SVGs for the respective pipelines to http://realh.co.uk/gst/. The
mac_ ones are for faulty SD on the Mac,
hd_ for correct HD on the Mac, and
linux_ for correct SD on Linux.
The crucial part seems to be the GstDeinterlace stage, which is used on both OS's for software decoding of SD streams. On Linux the input is
interlace-mode: mixed and output is
interlace-mode: progressive, while on the Mac the output is also
I think HD broadcasts here are usually 1080i rather than progressive, but the HD pipeline doesn't show an interlace mode for the H264 packets, and it uses hardware decoding with progressive output. The Mac's video sink is OpenGL in both cases.