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

macOS specific usage questions
catskytw
New Cone
New Cone
Posts: 6
Joined: 04 Oct 2013 05:45

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

Postby catskytw » 05 Nov 2013 10:31

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

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

Postby Jean-Baptiste Kempf » 05 Nov 2013 22:50

1. What is the audio codec?
2. Please share a sample.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

catskytw
New Cone
New Cone
Posts: 6
Joined: 04 Oct 2013 05:45

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

Postby catskytw » 06 Nov 2013 10:07

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.

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

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

Postby fkuehne » 06 Nov 2013 14:03

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.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

catskytw
New Cone
New Cone
Posts: 6
Joined: 04 Oct 2013 05:45

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

Postby catskytw » 07 Nov 2013 03:47

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?

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

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

Postby fkuehne » 07 Nov 2013 13:07

This is hard to say without seeing all your code. Can you share a link?
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 8 guests