2

I am using VideoToolbox on iOS to encode video from iPhone camera. In the callback for the compressed frames I convert from AVCC to Annex B. The result is transport stream which I can successfully play back in VLC if I save it in a .264 file. This is based on Apple's WWDC video (https://developer.apple.com/videos/play/wwdc2014/513/), and demos such as (https://github.com/manishganvir/iOS-h264Hw-Toolbox).

Now I need to package the elementary streams into transport streams to enable live streaming of the camera output: ES -> PES -> Mpeg2ts

Can anybody point to any library / sample code (in Objective-C, Swift, C/C++) to package elementary stream to packaged elementary stream, and then mux PES to TS?

sigrem
  • 57
  • 1
  • 5
  • Would be a usage of ffmpeg or gstream command line application useful solution? – stuhlo Mar 21 '17 at 22:07
  • Thanks stuhlo. I need to generate the .ts files on the device so command line is not an option. I could integrate ffmpeg but am looking for a lighter solution. Does ffmpeg have any function to get the ES data as input and create PES as output? Muxing PES items to Mpeg2ts? – sigrem Mar 21 '17 at 22:15

0 Answers0