Torc HTTP Streaming problem with Sound

82 views
Skip to first unread message

Ceaser Larry

unread,
Apr 27, 2013, 4:14:03 AM4/27/13
to torc-f...@googlegroups.com
I've bought this app a few weeks ago and been trying to isolate why HLS doesn't work properly in Torc. I've read through this group about complaints about the sound and it reads like you consider this issue to be a backend issue. I don't believe that is the case because HLS works on every other platform but Torc for iOS.

When using "MythTV Android Frontend" and "DicePlayer" on a older HTC Inspire and a LG Ally HLS plays flawlessly. Directly streaming from the backend also works with Safari on a second gen "Apple Mac Book Air".

I've recorded a few videos to show the problem with the sound in OS. From the recording you should be able to hear a pattern where the sound completely drop out for a sec. But doesn't on the HTC. Both videos have a resolution of 360p.


I've also written a example application in Xcode and installed it on my iPhone. it also streams video from same server without any issues, including the stream Torc creates. So It doesn't look like its an issue with the Apple supplied MediaPlayer.

I don't know what the issue is, but Torc is the only application that has a problem.

Robert McNamara

unread,
Apr 27, 2013, 10:42:04 AM4/27/13
to torc-f...@googlegroups.com
Hi Larry,

Thanks for your feedback.  I don't make conclusions that the issue is on the server lightly, in each case I try to give the user the means to prove it by testing the streams.  Here's what I'd like to do in your case:

a) Have you tested the streams in Safari on the device you are running Torc on?  If so, this is the first thing to try.

b) Can you please provide access to the code for your test app?  I can tell you where any differences lie between your implementation and my own, and if there is a difference there, maybe we can try to narrow down what it is.

As I've said before, there's no "native" playback code whatsoever in Torc-- I create an instance of MPMoviePlayerViewController and pass the playlist URL to it (after setting trivial options like fullscreen).  The entirety of the "playback" code is probably 20 lines, and the only setting which pertains to audio is the one which says to use an application audio session (basically, to ignore the silence switch on the side, added in 1.04).  It's difficult to imagine how this could be affected by the app, other than the fact that the app may be much more resource intensive than your test app, and if you're using a lower memory device (iPhone 3G maybe?) perhaps you're running into resource issues.  That's a wild guess, though, since I do all my iPhone testing on a 3GS and don't have any audio skipping issues.  Make sure to let me know what model of phone you're working with.

Robert


--
You received this message because you are subscribed to the Google Groups "Torc for iOS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torc-for-ios...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Ceaser Larry

unread,
Apr 28, 2013, 3:54:54 AM4/28/13
to torc-f...@googlegroups.com
The backend is around 30-40% CPU utilization, 6% memory usage and 1% disk utilization when the video is encoding. The average time in the disk read queue is between 5 and 12 milliseconds.

I tried Safari on my phone and it plays the stream without any issues.

I published my test application at https://github.com/ceaser/hls_test.

Thanks
Ceaser

Robert McNamara

unread,
Apr 28, 2013, 10:18:02 AM4/28/13
to torc-f...@googlegroups.com
Hi Larry,

Something seems funny in your test application-- are you sure you are playing a stream which was requested by Torc?  I ask because it is not using any video or audio bitrate which the application is capable of requesting.  (Your app is hardcoded to play a video stream of 500 Kb/s and audio of 96 Kb/s... But Torc doesn't use either of these bitrates with any profile).

Robert

Ceaser Larry

unread,
Apr 28, 2013, 1:55:22 PM4/28/13
to torc-f...@googlegroups.com
That url was from the Android client. I was testing a few different profiles and lost track of the last one I tested.

I went back and retested the different streams and it turns every profile Torc uses doesn't work in my test application. I've notice you're using 64kb/s audio bit rate  on every profile, but the Android client is using different bit rates for each profile, but every one of them is  larger than 64kb/s. 

So when I use the follow URL the sound drops out

/Content/GetFile?StorageGroup=Streaming&FileName=1209_20130428020000.mpg.640x368_600kV_64kA.m3u8

But if I increase the audio bit rate the problem goes away.

/Content/GetFile?StorageGroup=Streaming&FileName=1209_20130428020000.mpg.640x368_600kV_96kA.m3u8

I've been able to stream using 720p and a 192kb/s audio bit rate without any issues. It would be nice to be able to use a profile like this in Torc.

/Content/GetFile?StorageGroup=Streaming&FileName=1209_20130428020000.mpg.1280x720_2000kV_192kA.m3u8

I hope that clears things up.

Ceaser

Robert McNamara

unread,
Apr 28, 2013, 2:11:53 PM4/28/13
to torc-f...@googlegroups.com
Hi Larry,

Interesting observation, and more or less what I was alluding to in my last mail.  It looks like for whatever reason, your iOS isn't able to handle the mp3 output put out by your backend when at 64 Kb.  64 Kb is in line with Apple's specified guidelines for streaming media audio streams which may be used over the cellular network (and complying with them was a big hurdle in getting the app approved-- I had to make numerous modifications to bitrates to bring them in line with those strict requirements before Apple would approve the app-- four go-rounds in the approval process initially).

That said, since most people don't have this issue, I'm interested to see whether the compatibility issue might actually be with the version of libmp3lame you are using on your system.  Is your backend self compiled?  If so, can you confirm that you are enabling libmp3lame, and the version installed on your system?

In the next version, I can probably get away with sneaking in a change to 96 Kb with the HBR profiles (Since I can still make the excuse that the low BR profiles are compliant with their cellular requirements) so that people don't have to do too much to work around the issue.

Robert



--

Robert McNamara

unread,
Apr 28, 2013, 2:15:56 PM4/28/13
to torc-f...@googlegroups.com
I've added 96 Kb audio to the HBR profiles in my code.  When I push another version, this will be included.  In the short term, maybe we can get some group input and find out of there's a compatibility issue in some versions of libmp3lame.

Robert

Ceaser Larry

unread,
Apr 28, 2013, 2:53:50 PM4/28/13
to torc-f...@googlegroups.com
I'm using the latest Mythbuntu. It looks like it's using libmp3lame v3.99.3.

$ dpkg -l | grep libmp3lame
ii  libmp3lame0                          3.99.3+repack1-1                                    MP3 encoding library

I tested connecting through the cellphone network with 1 bar. Torc displays only the Quicktime logo, surpassingly the audio doesn't drop out.

So I tried testing with the Network Link Conditioner under Settings > Developer.

Very Bad Network preset:
No picture, but the audio is steady.

3G preset
Picture, but the audio drops

Edge preset:
Brief picture at the beginning then no picture and the audio is steady.

So It looks like MythTV is providing an alternative audio only stream to fail back on and it works.

Maybe providing HBR for Wifi connections and using the current bit rates for a Cellphone connection would get it through the process and provide a better experience for end users. 

Ceaser

Ceaser Larry

unread,
Apr 28, 2013, 3:19:19 PM4/28/13
to torc-f...@googlegroups.com
I can't duplicate the problem on other clients. It appears to be something with iOS.

I retested Safari and the Android client at they don't have the same problem.

I tested Safari by starting a stream with Torc, then clicking Play on the backend HTTP Live Streaming url .e.g. http://192.168.1.41: 6544.

In Android I changed the profile to use

Width: 640
Height: 368
VBR: 600000
ABR: 64000
ASR: 48000 (I've also tested 44100)

Ceaser

Anthony Giggins

unread,
Apr 29, 2013, 7:17:28 PM4/29/13
to torc-f...@googlegroups.com
I'm running the same version of libmp3lame

Yes mythtv does provide a audio only stream to fail back on as per the HLS Streaming specification from Apple, however personally I'd much rather get buffering then loose video.


--

Ceaser Larry

unread,
Apr 29, 2013, 7:33:14 PM4/29/13
to torc-f...@googlegroups.com
From what I've read on Apple's tech notes the audio fall back meets the minimal requirement and would allow you to provide higher bit rates since there is a fall back. But your experience sounds like that isn't the case. 

What would be nice is to have various profiles of different bit rates encoded on the backend so user doesn't have to buffer or lose picture. Just have it fall back to a lower bit rate on the fly like other HTTP Live streaming implementations. 

Ceaser
You received this message because you are subscribed to a topic in the Google Groups "Torc for iOS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/torc-for-ios/yhc7bLiG_Zc/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to torc-for-ios...@googlegroups.com.

kelsie...@gmail.com

unread,
May 31, 2013, 5:50:12 PM5/31/13
to torc-f...@googlegroups.com
Hello,
I bought the app last week and have audio issues too. I first tried a myth25 backend on my Xen Server(E4700@2.4)( thinking the problem was cpu/io related. I upgraded my main box from 24.3 to 25.3 using Axel's ATRPMS for EL6.

After trying a second box, my ipad mini stream audio stutters and pauses. I've played with the profiles in the torc app but even the lowest taxing one pauses occasionally.
Current, Backend CPU is a 64...@2.13GHz.

I would like to join in on this testing you and Larry are working on... to get this app working on my iDevices. Can I get  the latest version with the profile changes with audio >64kbps to try?

I would be glad to build some EL6 rpms from your sources for torc and see if this makes any difference as well, if it would matter.
 Do you happen to have a good RPM Spec file to start with for torc or does one need to be created?


Thanks,
Kelsie


MythTV Version : v0.25.3
MythTV Branch :
Network Protocol : 72
Library API : 0.25.20130225-1
QT Version : 4.7.2
Options compiled in:
 linux release use_hidesyms using_alsa using_jack using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_bindings_php using_crystalhd using_dvb using_firewire using_frontend using_hdhomerun using_ceton using_hdpvr using_iptv using_ivtv using_joystick_menu using_libcrypto using_libdns_sd using_libfftw3 using_libxml2 using_lirc using_mheg using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_v4l1 using_x11 using_xrandr using_xv using_bindings_perl using_bindings_python using_bindings_php using_mythtranscode using_ffmpeg_threads using_live using_mheg using_libass using_libxml2

Robert McNamara

unread,
Jun 1, 2013, 12:15:41 AM6/1/13
to torc-f...@googlegroups.com
Hi Kelsie,

The next version will be available when I'm able to test it through my QA process and get it approved through the app store.  Unfortunately because of code signing requirements any update to user's devices needs to be through the normal update method.  I'll definitely let you guys know when I've submitted a new version.

Robert

kelsie...@gmail.com

unread,
Jun 2, 2013, 4:30:14 PM6/2/13
to torc-f...@googlegroups.com
Ok thx about the update on ios .

I would like to build torc server side from your sources and see if the sound issue still occurs.
I'll report back if its the same or works.

Robert McNamara

unread,
Jun 2, 2013, 6:17:57 PM6/2/13
to torc-f...@googlegroups.com
Kelsie,

The Torc open source project has diverged completely from MythTV now (all code has been thrown away and started over), so the iOS app is no longer compatible with it.  The iOS app is only a client for MythTV at this point, so no point in compiling the PC Torc app.

Robert


kelsie...@gmail.com

unread,
Jun 3, 2013, 2:18:33 PM6/3/13
to torc-f...@googlegroups.com
Thanks Robert,

I already built the torc sources on Fedora 18.  From what I gather Mark and team has a custom frontend and the supporting libs done including a ffserver backend for testing the frontend(torc-client) components.

So your right, this isn't what I expected initially.... but it's interesting to me nonetheless.   

Should the Apple App ad content still say that you can use the app with " TORC's dev sources or mythtv-.25(see below)"? I would be very surprised if many of your users are going to try and install a torc dev backend and try it. But then again I did based on the description below. . I could technically build a torc-dev system from this setup but as you pointed out it's not really a comparison anymore with the new code.
>>>
from:

Description

Torc is a streaming video platform, remote control, DVR frontend, and DVR manager all in one! Torc allows users of MythTV 0.25 and development versions of Torc, the popular open source DVR and media center platforms, to browse and view content at home or on the road.

>>>


I look forward to experimenting with torc in the future.
Regards,
Kelsie

kelsie...@gmail.com

unread,
Aug 7, 2013, 2:38:13 PM8/7/13
to torc-f...@googlegroups.com
Hey Robert,

My first ELmythOS LiveCD will be based around 25.3 and hence will be compatible with your app.

Regards,
Kelsie

ELmythOS.org
Reply all
Reply to author
Forward
0 new messages