Page 1 of 1

Live HTTP Streaming to iPhone: Choppy audio

Posted: 28 Aug 2009 02:53
by steveclay
Hi folks,

Appreciate any help here, as I'm pulling my hair out. I'm on a Win32 box, using VLC to transcode a dshow:// input for (Apple's Media Stream Segmenter and then upload to a web server and then) HTTP streaming to an iPhone. I've got everything working perfectly, except the audio is choppy -- it cuts out every tenth of a second or so. The video piece is just fine. (If I output the transcode to an .mp4 file instead, and play it in VLC or WMP, it sounds great.)

I've struggled with all the reading I've done about ffmpeg and its encoding of AAC-LC, and I've uninstalled and reinstalled several versions, to no avail (from 0.8.6i to 0.9.9 to 1.0.1). Actually, if I really do have the latest version of ffmpeg, AAC encoding shouldn't work at all, right? So I'd love some pointers in the right direction, (especially around what version of VLC and of ffmpeg would work for this task), whether it's from looking at the command line or (if anyone reading this has an iPhone) by pointing your iPhone browser to http://jumbocast.net/iPhoneBadAudio/prog_index.m3u8 and listening. Thanks so much.

-steve

Here's the command line. I've set all the x264 options in the GUI, and as I say, the video looks great, so I've left them out of the command line.

Code: Select all

vlc.exe -vvv -I rc --ttl 12 dshow:// vdev="Osprey-100 Video Device 1" adev="Realtek HD Audio Input" --sout=#transcode{vcodec=h264,vb=600,scale=1,aenc=ffmpeg{aac-profile="low"},acodec=mp4a,ab=64,channels=2,samplerate=48000}:std{access=udp,mux=ts,dst=192.168.1.110:1234}

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 29 Aug 2009 20:43
by steveclay
I think I got it -- I needed the "audio-sync" option. All is well now.

-s

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 01 Sep 2009 00:11
by spampizza
How did you do it? Please share.

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 01 Sep 2009 11:05
by c-o-m-m-a-n-d-e-r
Is it possible to give the VLC the option to stream to iphone live streams?

I will try it with this open source segmenter code http://svn.assembla.com/svn/legend/segm ... egmenter.c

but if it will be possible directly with VLC this would be great :)

thanks a lot!

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 02 Sep 2009 03:18
by steveclay
c-o-m-m-a-n-d-e-r: The only two segmenters I know of (other than those already baked into hardware or software products) are the one you mentioned and Apple's beta Media Stream Segmenter, which will only run on Mac OS X (and I think you have to be in the iPhone Developers' Program, although I'm not 100% sure about that). VLC will not do the segmenting.

spampizza: Briefly: VLC to capture and encode an H.264/AAC stream (with the options I mentioned, plus the addition of "audio-sync" to the #transcode options), pushed via UDP to an instance of Apple's segmenter, which creates local files that I then push up to a web host.

-steve

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 02 Sep 2009 08:59
by c-o-m-m-a-n-d-e-r
yes thats the problem! cause the apple segmenter runs only on Mac! this is why i´m talking bout giving VLC the ability to segment Streams :)

would be a great feature ... :)

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 04 Sep 2009 03:37
by spampizza
So I'm confused. In your original message you talked about win32 box. I guess you have a mac box too? So you push UDP from your win32 box to the mac to segment and then back to your win32 web server? I'd like to see the web code.

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 04 Sep 2009 15:38
by cajohnson2
There really isn't any needed web code for this. The apple segmenter creates all the necessary files as it creates the segments. Apple Does provide a sample page that you can embed the video on instead of linking directly to the file and its code looks similar to this

Code: Select all

<object type='application/x-mpegURL' width='150' height='140' style='width:50%; height:40%; padding:25px; margin:25px'> <param name='src' value='http://eample.com/iphone/prog_index.m3u8' />         <param name='scale' value='aspect' />         <param name='autoplay' value='true' />         <param name='controller' value='false' /> </object>
When the video is selected on the iphone it will open quicktime full screen and play it.

From my experience the current downside the the apple segmenter is that is has to have direct access (ie a mounted drive or share accessible via the file system) to the web-server.

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 28 Sep 2009 12:06
by liverpoolatnight
There really isn't any needed web code for this. The apple segmenter creates all the necessary files as it creates the segments. Apple Does provide a sample page that you can embed the video on instead of linking directly to the file and its code looks similar to this
When the video is selected on the iphone it will open quicktime full screen and play it.
From my experience the current downside the the apple segmenter is that is has to have direct access (ie a mounted drive or share accessible via the file system) to the web-server.
I know orb works and the file output is a .flv and thats with video

im trying to setup a dvb-t using

Source: dvb-t://frequency=754000000
Type: dvb-t


UPDATE 28th/09/2009 at 17:30pm BST

After i have playing about with different applications the best one for streaming is Openstreamer you will find it in cydia. When you have installed it add the URL into bookmarks for example http://192.168.1.2:83

and my VLC stream output

:sout=#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=24,channels=2,samplerate=44100}:std{access=http,mux=ts,dst=192.168.1.2:83}

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 05 Nov 2009 01:14
by victor_diago
Hi all

Steveclay, pleeeeease....

Im trying to stream (transcode) an rtsp to an iphone and embed the video on a webpage...

i have read this http://homepage.mac.com/qt4web/embedforiphone.html and tried with

Code: Select all

--sout=#transcode{vcodec=h264,vb=600,scale=1,aenc=ffmpeg{aac-profile="low"},acodec=mp4a,ab=64,channels=2,samplerate=48000}:std{access=http,mux=ts,dst=75.125.196.18:1234/stream.mp4}
But it doesnt works.

Have you found a solution to stream live to an iphone ???? i have read your topic but did not understand how you can access the stream inside the iphone !

I would like to embed it into a webpage. Could you please help me with that ?

Thanks a lot.

Best Regards

Victor Diago

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 25 Oct 2011 10:25
by davidmajors
I think I got it -- I needed the "audio-sync" option. All is well now.

-s
Dear Steve,

I am facing the same issue with chuppy audio streaming to iphone. Please provide me with a complete command line with the audio synch you mentioned.

Truly,
David

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 19 Feb 2012 15:13
by realjobe
VLC 2.0.1 is released.. Does this resolve some of the problems?
Isn't the html suppose to have html5 like this?

Code: Select all

<html> <head> <title>Video Test</title> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/> </head> <body style="background-color:#FFFFFF; "> Audio/Video Stream:<br/> <center> <video width='150' height='150' src="http://mydomain.com/streaming/mystream.m3u8" /> </center> </body> </html>

Re: Live HTTP Streaming to iPhone: Choppy audio

Posted: 29 Feb 2012 10:01
by davebrian
No luck. Doesn't seem to be working for me.