Live HTTP Streaming to iPhone: Choppy audio

About encoding, codec settings, muxers and filter usage
steveclay
New Cone
New Cone
Posts: 3
Joined: 28 Aug 2009 02:41

Live HTTP Streaming to iPhone: Choppy audio

Postby steveclay » 28 Aug 2009 02:53

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}

steveclay
New Cone
New Cone
Posts: 3
Joined: 28 Aug 2009 02:41

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby steveclay » 29 Aug 2009 20:43

I think I got it -- I needed the "audio-sync" option. All is well now.

-s

spampizza
New Cone
New Cone
Posts: 2
Joined: 31 Aug 2009 18:00

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby spampizza » 01 Sep 2009 00:11

How did you do it? Please share.

c-o-m-m-a-n-d-e-r
New Cone
New Cone
Posts: 2
Joined: 01 Sep 2009 11:03

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby c-o-m-m-a-n-d-e-r » 01 Sep 2009 11:05

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!

steveclay
New Cone
New Cone
Posts: 3
Joined: 28 Aug 2009 02:41

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby steveclay » 02 Sep 2009 03:18

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

c-o-m-m-a-n-d-e-r
New Cone
New Cone
Posts: 2
Joined: 01 Sep 2009 11:03

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby c-o-m-m-a-n-d-e-r » 02 Sep 2009 08:59

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 ... :)

spampizza
New Cone
New Cone
Posts: 2
Joined: 31 Aug 2009 18:00

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby spampizza » 04 Sep 2009 03:37

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.

cajohnson2
New Cone
New Cone
Posts: 1
Joined: 03 Sep 2009 16:19

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby cajohnson2 » 04 Sep 2009 15:38

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.

liverpoolatnight
New Cone
New Cone
Posts: 4
Joined: 28 Sep 2009 11:59
VLC version: 1.02
Operating System: Windows Vista x32
Location: Liverpool - England - UK
Contact:

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby liverpoolatnight » 28 Sep 2009 12:06

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}

victor_diago
New Cone
New Cone
Posts: 7
Joined: 05 Nov 2009 01:08

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby victor_diago » 05 Nov 2009 01:14

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

davidmajors
New Cone
New Cone
Posts: 1
Joined: 25 Oct 2011 10:21

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby davidmajors » 25 Oct 2011 10:25

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

realjobe
Cone that earned his stripes
Cone that earned his stripes
Posts: 175
Joined: 10 Feb 2008 15:40

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby realjobe » 19 Feb 2012 15:13

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>
Last edited by realjobe on 20 Mar 2012 12:21, edited 2 times in total.

davebrian
New Cone
New Cone
Posts: 3
Joined: 29 Feb 2012 09:57

Re: Live HTTP Streaming to iPhone: Choppy audio

Postby davebrian » 29 Feb 2012 10:01

No luck. Doesn't seem to be working for me.
“A true friend is one who thinks you are a good egg even if you are half-cracked.”


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 13 guests