[Live-devel] Help streaming over HTTP to Apple devices

chingmlai at rcn.com chingmlai at rcn.com
Thu Dec 15 20:33:02 PST 2016


Hi,
     I have been using Live555 tools to deliver RTSP from h264 and AAC streams or from mp4 file with very satisfied results.  My ultimate client is Apple mobile devices.  As we know, Apple accepts only HTTP Transport Streaming (TS).  Live555 tool can do that.  I have downloaded Live555 test files bipbop-gear1-all.ts and bipbop-gear1-all.tsx, and use DynamicRTSPServer to deliver the AV streams through TunnellingOverHTTP.  The AvPlayer of iPhone client can receive them and playback them nicely.  I also used MPEG2TransportStreamIndexer function to generate tsx file from bipbop-gear1-all.ts.  It generated the exact same data as the downloaded bipbop-gear1-all.tsx file.  The indexer function is working correctly.

     In the next step, I downloaded Live555 test files, test.264 and test.aac.  I followed the example of testH264VideoToTransportStream to create a H264VideoStreamFramer from test.264 as the video source.  I also created ADTSAudioFileSource from test.acc as the audio source.  Then I created a MPEG2TransportStreamFromESSource filter by adding the video source and the audio source to generate the TS file “out.ts”.  The VLC can play this TS file but the  audio is silent with error message of “Multiple blocks per frame in ADTS not supported”.  With that in mind, I went ahead to generate the out.tsx file from out.ts.   Both file sizes are in expected range.  But when they are used to stream over HTTP, the iPhone cannot play it out (it popped a No-Play icon on the screen).  However,  it apparently had downloaded all the segments and it showed the video duration correctly as 58 seconds.

     The Apple AvPlayer error message is brief with Code=-11800 "The operation could not be completed".  Apple provides a program,  MediaStreamValidator, to debug the transport stream content.  When I run that, the error message is also brief with “Error injecting segment data”.  Thus, I cannot determine the source of the problem.  In any case, iPhone did not accept the ts file.  When I prepared the ts file with the video source only, the AvPlayer could not complete the loading process.  It is possibly due to the requirement that both video and audio streams must be present or stream audio only.  I cannot stream audio alone, because the indexer function generates nothing from audio ts file.

    It is very desirable if LIve555 can make this work.  Currently, LIve555 also does not have a function to convert AAC from non-ADTS  (as in the mp4 file) to ADTS.  It will be very useful for the developers, if Live555 can provide a “testMP4AudioVideoToTransportStream” program, or the like, to demonstrate that h246 video and AAC can be multiplexed and streamed over HTTP and accepted by Apple devices.

   Maybe I missed something or did not do it right.  Please help me with instructions or suggestions to make it works.

     Holden



More information about the live-devel mailing list