record: write valid mpeg ts header

SDT, PAT and PMT are written to the file