[FFmpeg-user] Generate MPEG Transport stream from audio files only

Pierre Pasquet pierrepsqt at icloud.com
Fri Mar 9 03:03:16 EET 2018

All right, here’s a detailed presentation of what’s happening : 

First of all, everything is on local. I am using the default Mac OS apache server

- I launch a process that listens on port 5555 and segments incoming media for deployment using HTTP Live Streaming with : 
mediastreamsegmenter -f /Library/WebServer/Documents/live

In theory, when receiving an input file, the segmenter should generate a playlist .m3u8 and create subsequent .aac files (because we are dealing only with audio)

- Then, I **try** to wrap the audio in a MPEG-2 transport stream and send it over UDP to port 5555 with the following command (on a different terminal tab) : 
ffmpeg -re -i test.aac -vcodec copy -vbsf h264_mp4toannexb -acodec copy -f mpegts udp://

At this point, here’s what happens : 

- on the segmenter tab : 

Mar  9 2018 00:59:49.627: audio pid set at 100
Mar  9 2018 00:59:49.928: audio pid change to 100
Mar  9 2018 00:59:50.396: audio pid change to 100
Mar  9 2018 00:59:50.718: audio pid change to 100

And so on … (same prompt)

- on the ffmpeg tab : 

[aac @ 0x7fd242009400] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'test.aac':
  Duration: 00:01:08.37, bitrate: 139 kb/s
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 139 kb/s
[mpegts @ 0x7fd24200a000] frame size not set
Output #0, mpegts, to 'udp://':
    encoder         : Lavf57.83.100
    Stream #0:0: Audio: aac (LC), 44100 Hz, stereo, fltp, 139 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=      75kB time=00:00:04.06 bitrate= 151.0kbits/s speed=   1x 

At this point, there should be a .m3u8 playlist file under /Library/WebServer/Documents/live and appropriate .aac files. But it’s not the case. 
Eventually, the ffmpeg tab will return this : 

video:0kB audio:1165kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 12.020084%

And the segmenter tab will return : 

Mar  9 2018 01:02:00.582: Warning: no data received for 0.5 seconds.
Mar  9 2018 01:02:01.083: Warning: no data received for 1.0 seconds.
Mar  9 2018 01:02:01.583: Warning: no data received for 1.5 seconds.
Mar  9 2018 01:02:02.084: Warning: no data received for 2.0 seconds.
Mar  9 2018 01:02:02.589: Warning: no data received for 2.5 seconds.
Mar  9 2018 01:02:03.090: Warning: no data received for 3.0 seconds.
Mar  9 2018 01:02:03.591: Warning: no data received for 3.5 seconds.
Mar  9 2018 01:02:04.095: Warning: no data received for 4.0 seconds.

But still no files were created. 

I know that the ffmpeg command is not write because it applies to video files, but I can’t come up with an equivalent command for audio only! 

Thanks for your help, 


> On 8 Mar 2018, at 16:17, Moritz Barsnick <barsnick at gmx.net> wrote:
> On Thu, Mar 08, 2018 at 14:25:54 +0000, Pierre Pasquet wrote:
>> Not sure to identify what is missing. This command works for a .m4v file and doesn’t for a .aac file located in the same directory.
> As Carl Eugen tried to point out: What is missing is that you provide
> your actual (non-working) command line and its complete, uncut console
> output. These provide a lot of valuable information, and will help to
> analyze your issue.
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-user mailing list