1

I'm trying to create an MPEG-2 Program Stream in an mpg wrapper that contains PCM audio. When I run the below command, I get an output that contains MPEG-1 audio.

ffmpeg -i "input.mov" -vcodec mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50000000 -maxrate 50000000 -minrate 50000000 -s 1920x1080 -aspect 16:9 -acodec pcm_s24be "output.mpg"

Does anyone know why this happens and how to get the command working to give me PCM in an MPEG-2 PS file with in an mpg wrapper?

rogerdpack
  • 62,887
  • 36
  • 269
  • 388
DMtd
  • 21
  • 5
  • This question appears to be off-topic because it is not within the bounds of discussion as described in the help center. –  Jan 15 '18 at 14:58
  • Hi Will, in what way is it outside the bounds of discussion? Thanks. – DMtd Jan 15 '18 at 16:44
  • Probably because this doesn't have anything to do with software development. –  Jan 15 '18 at 16:49
  • ffmpeg questions "sometimes" go to superuser instead. It's quite confusing :| – rogerdpack Jan 15 '18 at 17:41
  • 1
    I wasn't aware that the bounds of discussion were for software development only. Seems odd considering the enormous pool of FFMPEG based questions and answers on the site dating back years... – DMtd Jan 17 '18 at 08:56

1 Answers1

1

FFmpeg only supports muxing 16 bit PCM in a MPEG2 PS. Use

ffmpeg -i "input.mov" \
  -c:v mpeg2video -pix_fmt yuv422p -bf 2 -b:v 50M -maxrate 50M -minrate 50M \
  -s 1920x1080 -aspect 16:9 \
  -c:a pcm_s16be -f vob "output.mpg"

The -f vob is needed to force a MPEG-2 PS, else ffmpeg will select MPEG-1 Systems muxer.

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Thanks Mulvya. I did find some info on the -f vob tag, but when I tried it, it changed nothing. I guess it's because I was encoding 24 bit rather than 16. – DMtd Jan 15 '18 at 16:40