I compiled your remux.c example and everything was OK. I ran it and... "segmentation fault". And what happened? Everything went fine until: line 107 if (in_codecpar->codec_type != AVMEDIA_TYPE_AUDIO &&... in_codecpar had a bad address! 0x200000000 OS: Kubuntu 24.04 LTS