MP4A Rate

This forum is about all development around libVLC.
thecaptain0220
New Cone
New Cone
Posts: 9
Joined: 05 Dec 2014 16:09

MP4A Rate

Postby thecaptain0220 » 12 Dec 2014 18:02

I am currently writing a demuxer and I am having an issue getting my AAC audio to play at the correct speed. I am using VLC_CODEC_MP4A and setting the rate to 48000.

Code: Select all

audioFmt.audio.i_rate = 48000;
This doesn't seem to have any effect though. I am seeing debug messages that look like it us detecting 44100.

Code: Select all

main debug: using audio volume module "float_mixer" main debug: input 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes main debug: looking for audio filter module matching "scaletempo": 14 candidates
Is there another way I need to set the rate?

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: MP4A Rate

Postby Jean-Baptiste Kempf » 02 Jan 2015 17:02

the decoder could override that.
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.

thecaptain0220
New Cone
New Cone
Posts: 9
Joined: 05 Dec 2014 16:09

Re: MP4A Rate

Postby thecaptain0220 » 18 Feb 2015 17:07

I was able to get the decoder to use the correct rate using i_extra and p_extra. Its strange though, because even with it being at the correct speed it still plays back too fast.

It is 48000Hz. I am starting my initial timestamp at 0 and adding 21333 to each packet. This plays back the audio smoothly, but too fast. If I increase the PTS by a higher value I get a better speed and pitch, but I get gaps where the audio drops out.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 30 guests