Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the audio doesn't play #3

Open
kaich opened this issue Jul 15, 2013 · 12 comments
Open

the audio doesn't play #3

kaich opened this issue Jul 15, 2013 · 12 comments

Comments

@kaich
Copy link

kaich commented Jul 15, 2013

I use your project , I can run it on my iphone5 . But there is not any music . It only show the video.

the log as below :

2013-07-15 20:20:18.254 DFURTSPPlayer[1290:907] found video stream
2013-07-15 20:20:18.255 DFURTSPPlayer[1290:907] found audio stream
2013-07-15 20:20:18.259 DFURTSPPlayer[1290:907] set up audiodecoder
[swscaler @ 0xde7000] No accelerated colorspace conversion found from yuv420p to rgb24.
2013-07-15 20:20:18.270 DFURTSPPlayer[1290:907] video duration: 596.480000
2013-07-15 20:20:18.271 DFURTSPPlayer[1290:907] video size: 240 x 160
2013-07-15 20:20:20.556 DFURTSPPlayer[1290:907] ready to start audio
2013-07-15 20:20:23.757 DFURTSPPlayer[1290:907] audio format aac (86018) is supported

Looking forward to your reply

@oleganza
Copy link

I have exactly the same issue on iPhone 5 and iOS simulator 6.1

@SEB-Appstore
Copy link

Same issue running the iOS7.0.4: no sound when playing sophie.mov
Any fix for this?

@kimjj81
Copy link

kimjj81 commented Mar 10, 2014

I have same error.
"http://www.wowza.com/_h264/BigBuckBunny_115k.mov" is sample movie.
It can't play sound.

The video taken by my camera is played sound well.
But I can't find any one.

@durfu
Copy link
Owner

durfu commented Mar 11, 2014

I know there are some issues with sound. Unfortunately at the moment I do not have the free time to investigate this. I've put this up together for another project which was discontinued.

@SEB-Appstore
Copy link

By using these settings in the createAudioQueue method of the AudioStreamer:
switch (audioCodecContext->codec_id) {
...
case CODEC_ID_AAC:
{
audioStreamBasicDesc
.mFormatID = kAudioFormatMPEG4AAC;
audioStreamBasicDesc_.mFormatFlags = kMPEG4Object_AAC_LC;
audioStreamBasicDesc_.mSampleRate = audioCodecContext->sample_rate;
audioStreamBasicDesc
.mChannelsPerFrame = audioCodecContext->channels;
audioStreamBasicDesc
.mBitsPerChannel = 0;
audioStreamBasicDesc_.mFramesPerPacket = audioCodecContext->frame_size;
audioStreamBasicDesc
.mBytesPerPacket = 0;
audioStreamBasicDesc_.mBytesPerFrame=audioCodecContext->frame_bits;
audioStreamBasicDesc
.mReserved=0;
NSLog(@"audio format %s (%d) is supported", _audioCodecContext->codec_descriptor-> name, _audioCodecContext->codec_id);
break;
}
...}
you can have the sound of the videos.
However, when settings the AudioQueue this way, the app crashes (when freeing some buffer) if you try to play the http://www.wowza.com/_h264/BigBuckBunny_115k.mov. The video with sound plays fine if you download it play it locally though....
After some tests using these settings, it seems that all local videos (videos saved in the documents folder) with sound are played fine, while the app crashes trying to play remote videos with sound as I haven't found a way to avoid the crash when freeing the buffer...

@durfu
Copy link
Owner

durfu commented Mar 12, 2014

Thanks SEB-Appstore for the info.
About the crash, just from the top of my head, maybe it is something related to the sockets. I believe something is not correctly stopped in that area.

@SEB-Appstore
Copy link

To be more accurate, with the previous settings, the crash occurs in the while loop of the - (OSStatus)enqueueBuffer:(AudioQueueBufferRef)buffer method of the audiostreamer, at the av_free_packet(packet) line.

@vgoltv
Copy link

vgoltv commented Aug 26, 2014

SEB-Appstore, thanks for fix!

zebeurton pushed a commit to zebeurton/DFURTSPPlayer that referenced this issue Mar 25, 2015
Update with SEB-Appstore settings to have sound in application
durfu added a commit that referenced this issue Mar 25, 2015
Correction of issue #3 and update to latest version of FFmpeg
@andrenatal
Copy link

I confirm this issue unfortunately still happen on iOS8 at iphone 4s with the latest commit 6c012d2

I can hear few seconds of audio and then stop play

zebeurton pushed a commit to zebeurton/DFURTSPPlayer that referenced this issue Apr 17, 2015
Update with SEB-Appstore settings to have sound in application
@formoon
Copy link

formoon commented Aug 13, 2015

same problem with SEB-Appstore

@maxcox
Copy link

maxcox commented Aug 16, 2015

I also have the same problem even after SEB-Appstore's fix

@erdemgc
Copy link

erdemgc commented Feb 1, 2017

I also have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants