Author Topic: Muxing elementary streams  (Read 488 times)

TCmullet

  • Jr. Member
  • **
  • Posts: 71
Muxing elementary streams
« on: November 08, 2016, 04:58:40 AM »
I have a pair of files, elementary streams.  One is video with ".264", and the other is audio, ".ac3".  I can't figure out how to make Avidemux mux them together into a transport stream.  What am I missing?

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1302
Re: Muxing elementary streams
« Reply #1 on: November 08, 2016, 07:14:05 AM »
If Avidemux can load the video, you can add audio from the "Audio" menu: "Select Track" --> Track 1 (x) Enabled --> [...Add audio track]. If Avidemux can't load the video because it is really a raw video stream: use ffmpeg. The following command should do it:

Code: [Select]
ffmpeg -f rawvideo -pixel_format PIXEL_FORMAT -video_size WIDTHxHEIGHT -i your_raw_video_stream.h264 -i your_audio_stream.ac3 -c copy output.mkv
If the pixel format is yuv420p (the default value), you can omit -pixel_format completely.

TCmullet

  • Jr. Member
  • **
  • Posts: 71
Re: Muxing elementary streams
« Reply #2 on: December 23, 2016, 06:16:48 PM »
If Avidemux can load the video, you can add audio from the "Audio" menu: "Select Track" --> Track 1 (x) Enabled --> [...Add audio track]. If Avidemux can't load the video because it is really a raw video stream: use ffmpeg. The following command should do it:

Code: [Select]
ffmpeg -f rawvideo -pixel_format PIXEL_FORMAT -video_size WIDTHxHEIGHT -i your_raw_video_stream.h264 -i your_audio_stream.ac3 -c copy output.mkv
If the pixel format is yuv420p (the default value), you can omit -pixel_format completely.
The first option worked well.  Amazing what features might lie hidden somewhere.  I never would have turned on the check mark as I thought that was for selecting existing ones.  Thanks very much, Eumagga0x2a!