1

I am using ffmpeg command line for getting multiple outputs with tee pseudo-muxer. Commands I have tried:

Case 1- To muxed Video (video.h264) with Audio (audio.aac) in mp4 and send mpegts to udp unicast address:

ffmpeg -i 'video.h264' -i "audio.aac" -vcodec copy -acodec copy -absf aac_adtstoasc -f tee -map 1:v -map 0:a "result.mp4|[f=mpegts]udp://127.0.0.1:2211"

Output 1: Resultant mp4 file has no audio and the udp stream when played is also having no audio.

Case 2- To muxed Video (video.h264) with Audio (audio.aac) in mpegts file and send mpegts to udp unicast address:

ffmpeg -i 'video.h264' -i "audio.aac" -vcodec copy -acodec copy -f tee -map 1:v -map 0:a "[f=mpefts]result.mpeg|[f=mpegts]udp://127.0.0.1:2211"

Output 2: Resultant mpegts file is fine and the udp stream when played is also having audio. NO ISSUE in this.

I have to do Case 1 where i can mux aac and h264 and get two output one is mp4 file dump and second is stream mpegts udp unicast (like udp://127.0.0.1:2211). And both the output should have video+audio.

Can anybody tell me why in Case 1 the output file is not having audio?

llogan
  • 121,796
  • 28
  • 232
  • 243
  • If there's no typo in your commands, then your map assignments are reversed. It should be `-map 0:v -map 1:a` – Gyan Mar 10 '17 at 13:04
  • I tried other - map options: __Command 1 :__ "ffmpeg -i 'video.h264' -i "audio.aac" -vcodec copy -acodec copy -absf aac_adtstoasc -f tee -map 0:v -map 1:a "result.mp4|[f=mpegts]udp://127.0.0.1:2211"" __Output1:__ AAC bitstream not in ADTS format. __Command 2 :__ "ffmpeg -i 'video.h264' -i "audio.aac" -vcodec copy -acodec copy -f tee -map 0:v -map 1:a "result.mp4|[f=mpegts]udp://127.0.0.1:2211" " __Output:__ Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc ' to fix it. av_interleaved_write_frame(): Operation not permitted. – Mohammad Taha Mar 16 '17 at 09:03
  • Can any one help me in doing Tee pseudo muxer by c++ code? – Mohammad Taha Aug 17 '17 at 04:15

0 Answers0