Page 1 of 1

no sound while .mpeg4 files and crashed while .rm files

Posted: 05 Nov 2013 10:31
by catskytw
Hello guys:
I built the libMediaLibrary and libMobileVLCKit from VLC iOS 2.1.1 for my OWN project and write my multimedia app after reading the VLC-iOS project's source code.
There are two problems in my project which are not happened in VLC-iOS project.
1. no sound while playing .mpeg4 files in device
2. crash while playing .rm files in device

but everything is all right in simulator and vlc-ios project in device.

I appreciate if any idea or suggestion.

Re: no sound while .mpeg4 files and crashed while .rm files

Posted: 05 Nov 2013 22:50
by Jean-Baptiste Kempf
1. What is the audio codec?
2. Please share a sample.

Re: no sound while .mpeg4 files and crashed while .rm files

Posted: 06 Nov 2013 10:07
by catskytw
Dear Jean:
1.
In .mpeg4 file,
audio codec: MPEG AAC Audio(mp4a)

In .rm file,
audio codec: A52 Audio(aka AC3)(a52)

crashed in audio.c line 287 avcodec_decode_audio4()

2.
Here is my source code:

in appDelegate.m:

Code: Select all

+ (void)initialize { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSNumber *skipLoopFilterDefaultValue; int deviceSpeedCategory = [[UIDevice currentDevice] speedCategory]; if (deviceSpeedCategory < 3) skipLoopFilterDefaultValue = kVLCSettingSkipLoopFilterNonKey; else skipLoopFilterDefaultValue = kVLCSettingSkipLoopFilterNonRef; NSDictionary *appDefaults = @{kVLCSettingPasscodeKey : @"", kVLCSettingPasscodeOnKey : @(NO), kVLCSettingContinueAudioInBackgroundKey : @(YES), kVLCSettingStretchAudio : @(NO), kVLCSettingTextEncoding : kVLCSettingTextEncodingDefaultValue, kVLCSettingSkipLoopFilter : skipLoopFilterDefaultValue, kVLCSettingSubtitlesFont : kVLCSettingSubtitlesFontDefaultValue, kVLCSettingSubtitlesFontColor : kVLCSettingSubtitlesFontColorDefaultValue, kVLCSettingSubtitlesFontSize : kVLCSettingSubtitlesFontSizeDefaultValue, kVLCSettingDeinterlace : kVLCSettingDeinterlaceDefaultValue}; [defaults registerDefaults:appDefaults]; }
In my playList(UITableViewController)

Code: Select all

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ if([indexPath section] == 0){ //TODO 判斷是iphone or ipad VLCMovieViewController *videoPlayer = [[VLCMovieViewController alloc] initWithNibName:@"VLCMovieViewController~ipad" bundle:nil]; UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath]; /** _foundMedia is an array fetched by [MLFile allFiles] */ videoPlayer.mediaItem = [_foundMedia objectAtIndex:[indexPath row]]; [self presentViewController:videoPlayer animated:YES completion:nil]; }
Is anything I did wrong?
1. What is the audio codec?
2. Please share a sample.

Re: no sound while .mpeg4 files and crashed while .rm files

Posted: 06 Nov 2013 14:03
by fkuehne
First of all, keep in mind that VLCMovieViewController is licensed under the GPLv2 and the MPLv2, which basically means that you may only use it in free and open-source apps. It's prohibited to use it in closed-source applications.

Regarding your playback issues, it smells like the vlc.git compilation failed for libav / FFmpeg, so you are lacking the codecs. Try to re-compile.

Re: no sound while .mpeg4 files and crashed while .rm files

Posted: 07 Nov 2013 03:47
by catskytw
Dear Felix:
Thank for your reply.
Please don't worry about the license problem; I have put my source code on github as a public repository while the initial of my project.

Back to my issue, after recompiling in serval times, this issue is still existing.
It's weird, why does not VLC-iOS project have this issue?

Re: no sound while .mpeg4 files and crashed while .rm files

Posted: 07 Nov 2013 13:07
by fkuehne
This is hard to say without seeing all your code. Can you share a link?