Demuxer and AAC

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

Demuxer and AAC

Postby thecaptain0220 » 05 Dec 2014 16:12

I am currently working on a Demuxer and I am having an issue with AAC audio. The problem is that with the format I am working with I only have a pts for the video. Since I dont have a pts for audio I cant get it to play back properly. Is there a way that I can get VLC to play back the audio as it gets it at the rate specified without looking at the PTS?

Rémi Denis-Courmont
Developer
Developer
Posts: 15271
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Demuxer and AAC

Postby Rémi Denis-Courmont » 05 Dec 2014 16:16

No.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

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

Re: Demuxer and AAC

Postby thecaptain0220 » 05 Dec 2014 16:45

Since this isn't directly VLC related I did not want to fill up the forum here, but if you have any ideas I would appreciate it.

http://stackoverflow.com/questions/2731 ... r-aac-mp4a

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

Re: Demuxer and AAC

Postby thecaptain0220 » 05 Dec 2014 22:40

Just wanted to put a little more info in hopes that someone here might have a little insight. You guys are the gurus and might notice something i am doing wrong.

Does AAC audio have static incrementing PTS values? I have blocks off AAC audio and I tried sending the audio and incrementing the PTS with no success. The frame sizes are different but I'm pretty sure its the same number of samples in each so wouldn't the PTS increase the same amount with each packet?

Here is my audio initialization

Code: Select all

es_format_t audioFmt; es_format_Init(&audioFmt, AUDIO_ES, 0); audioFmt.i_codec = VLC_CODEC_MP4A; audioFmt.audio.i_channels = 2; audioFmt.audio.i_rate = 48000;
Here is the code in the demux

Code: Select all

//Read the audio frame buf = stream_Block(demux->s, frameLen); if (!buf) return 0; buf->i_dts = buf->i_pts = sys->aacPTS; es_out_Send(demux->out, sys->audioES, buf); sys->aacPTS += 20000;
I have tried different values to increment the pts by with no success.

Here is my message output

Code: Select all

main debug: VLC media player - 2.1.4 Rincewind main debug: Copyright © 1996-2014 the VideoLAN team main debug: revision 2.1.4-0-g2a072be main debug: configured with ./configure '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--localstatedir=/var' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-dependency-tracking' '--build=x86_64-linux-gnu' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' '--config-cache' '--disable-maintainer-mode' '--disable-silent-rules' '--disable-update-check' '--enable-fast-install' '--prefix=/usr' '--docdir=/usr/share/doc/vlc-nox' '--libdir=/usr/lib' '--sysconfdir=/etc' '--with-binary-version=0ubuntu14.04.1' '--enable-a52' '--enable-aa' '--enable-bluray' '--enable-bonjour' '--enable-caca' '--enable-chromaprint' '--enable-dbus' '--enable-dca' '--enable-dirac' '--enable-directfb' '--enable-dvbpsi' '--enable-dvdnav' '--enable-faad' '--enable-flac' '--enable-fluidsynth' '--enable-freetype' '--enable-fribidi' '--enable-gnutls' '--enable-jack' '--enable-kate' '--enable-libass' '--enable-libfreerdp' '--enable-libmpeg2' '--enable-libxml2' '--enable-lirc' '--enable-live555' '--enable-mad' '--enable-mkv' '--enable-mod' '--enable-mpc' '--enable-mtp' '--enable-mux_ogg' '--enable-ncurses' '--enable-notify' '--enable-ogg' '--enable-opus' '--enable-oss' '--enable-pulse' '--enable-qt' '--enable-realrtsp' '--enable-samplerate' '--enable-schroedinger' '--enable-sdl' '--enable-sftp' '--enable-shout' '--enable-skins2' '--enable-smbclient' '--enable-speex' '--enable-svg' '--enable-taglib' '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcd' '--enable-vcdx' '--enable-vorbis' '--enable-x264' '--enable-zvbi' '--with-kde-solid=/usr/share/kde4/apps/solid/actions/' '--disable-decklink' '--disable-dxva2' '--disable-fdkaac' '--disable-gnomevfs' '--disable-goom' '--disable-libvnc' '--disable-opencv' '--disable-projectm' '--disable-quicksync' '--disable-sndio' '--disable-telx' '--disable-vsxu' '--disable-wasapi' '--enable-alsa' '--enable-atmo' '--enable-dc1394' '--enable-dv1394' '--enable-linsys' '--enable-omxil' '--enable-udev' '--enable-libva' '--enable-v4l2' '--enable-crystalhd' '--enable-mmx' '--enable-sse' '--disable-neon' '--disable-altivec' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'CXXFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' 'build_alias=x86_64-linux-gnu' main debug: adding item `test.nvr' ( file:///home/kirk/Desktop/d/test.nvr ) dbus debug: Getting All properties main debug: processing request item: test.nvr, node: null, skip: 0 main debug: rebuilding array of current - root Playlist main debug: rebuild done - 1 items, index 0 main debug: starting playback of the new playlist item main debug: resyncing on test.nvr main debug: test.nvr is at 0 main debug: creating new input thread main debug: Creating an input for 'test.nvr' qt4 debug: Adding a new MRL to recent ones: file:///home/kirk/Desktop/d/test.nvr dbus debug: Getting All properties main debug: Creating an input for 'test.nvr' main debug: using timeshift granularity of 50 MiB, in path '/tmp' main debug: `file:///home/kirk/Desktop/d/test.nvr' gives access `file' demux `' path `/home/kirk/Desktop/d/test.nvr' main debug: creating demux: access='file' demux='' location='/home/kirk/Desktop/d/test.nvr' file='/home/kirk/Desktop/d/test.nvr' main debug: looking for access_demux module matching "file": 20 candidates main debug: no access_demux modules matched main debug: creating access 'file' location='/home/kirk/Desktop/d/test.nvr', path='/home/kirk/Desktop/d/test.nvr' main debug: looking for access module matching "file": 25 candidates filesystem debug: opening file `/home/kirk/Desktop/d/test.nvr' qt4 debug: IM: Setting an input main debug: using access module "filesystem" main debug: Using stream method for AStream* main debug: starting pre-buffering main debug: received first data after 0 ms main debug: pre-buffering done 1024 bytes in 0s - 9433 KiB/s main debug: looking for stream_filter module matching "any": 9 candidates main debug: no stream_filter modules matched main debug: looking for stream_filter module matching "record": 9 candidates main debug: using stream_filter module "record" main debug: creating demux: access='file' demux='' location='/home/kirk/Desktop/d/test.nvr' file='/home/kirk/Desktop/d/test.nvr' main debug: looking for demux module matching "any": 65 candidates dbus debug: Getting All properties main debug: selecting program id=0 main debug: using demux module "nvrdemuxer" main debug: looking for a subtitle file in /home/kirk/Desktop/d/ main debug: meta ok for (null), need to fetch art main debug: looking for meta fetcher module matching "any": 1 candidates lua debug: Trying Lua scripts in /home/kirk/.local/share/vlc/lua/meta/fetcher lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac main debug: looking for decoder module matching "any": 39 candidates main debug: using meta fetcher module "lua" main debug: removing module "lua" main debug: searching art for test.nvr main debug: looking for art finder module matching "any": 2 candidates lua debug: Trying Lua scripts in /home/kirk/.local/share/vlc/lua/meta/art lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/01_googleimage.luac lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/03_lastfm.luac lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art main debug: no art finder modules matched main debug: art not found for test.nvr avcodec debug: trying to use direct rendering avcodec debug: allowing 1 thread(s) for decoding avcodec debug: avcodec codec (H264 - MPEG-4 AVC (part 10)) started main debug: using decoder module "avcodec" main debug: looking for meta reader module matching "any": 2 candidates lua debug: Trying Lua scripts in /home/kirk/.local/share/vlc/lua/meta/reader lua debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader lua debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac lua debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader main debug: no meta reader modules matched main debug: `file:///home/kirk/Desktop/d/test.nvr' successfully opened main debug: Buffering 0% main debug: Buffering 0% main debug: looking for decoder module matching "any": 39 candidates main debug: using decoder module "faad" main debug: Buffering 0% main debug: Buffering 0% faad warning: decoded zero sample main debug: Buffering 3% main debug: Buffering 3% main debug: reusing audio output pulse debug: using stereo channel map pulse debug: changing sink 0: alsa_output.pci-0000_00_05.0.analog-stereo (Built-in Audio Analog Stereo) main debug: Buffering 6% pulse debug: changed buffer metrics: maxlength=4194304, tlength=56448, prebuf=0, minreq=14112 pulse debug: connected to sink alsa_output.pci-0000_00_05.0.analog-stereo pulse debug: base volume: 65536 main debug: Buffering 10% main debug: Buffering 10% main debug: output 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes main debug: looking for audio volume module matching "any": 2 candidates main debug: Buffering 13% main debug: Buffering 16% main debug: Buffering 16% main debug: Buffering 20% main debug: Buffering 23% main debug: Buffering 23% 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 main debug: Buffering 26% main debug: Buffering 26% main debug: Buffering 30% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 36% main debug: Buffering 40% main debug: Buffering 40% main debug: Buffering 43% main debug: Buffering 46% main debug: Buffering 46% main debug: Buffering 50% main debug: Buffering 50% main debug: Buffering 53% main debug: Buffering 53% main debug: Buffering 56% main debug: Buffering 56% main debug: Buffering 60% main debug: Buffering 63% main debug: Buffering 63% main debug: Buffering 66% main debug: Buffering 70% main debug: Buffering 70% main debug: Buffering 73% main debug: Buffering 76% main debug: Buffering 76% scaletempo debug: format: 44100 rate, 2 nch, 4 bps, fl32 scaletempo debug: params: 30 stride, 0.200 overlap, 14 search scaletempo debug: 1.000 scale, 1323.000 stride_in, 1323 stride_out, 1059 standing, 264 overlap, 617 search, 2204 queue, fl32 mode main debug: using audio filter module "scaletempo" main debug: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo main debug: conversion pipeline complete main debug: conversion: 'f32l'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo main debug: conversion pipeline complete main debug: looking for audio resampler module matching "any": 3 candidates main debug: Buffering 80% main debug: Buffering 80% main debug: Buffering 83% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 90% main debug: using audio resampler module "samplerate" main debug: End of audio preroll main debug: Buffering 93% main debug: Buffering 93% main debug: Buffering 96% main debug: Stream buffering done (1000 ms in 186 ms) main debug: Decoder buffering done in 0 ms pulse debug: cannot synchronize start pulse debug: deferring start (49576 us) pulse debug: deferring start (24072 us) pulse warning: starting late (-3942 us) pulse debug: started pulse debug: underflow pulse debug: changing sink 0: alsa_output.pci-0000_00_05.0.analog-stereo (Built-in Audio Analog Stereo) pulse debug: underflow main warning: playback too late (62410): up-sampling pulse debug: underflow pulse debug: underflow pulse debug: underflow main warning: buffer too late (-82120 us): dropped main warning: buffer too late (-130507 us): dropped main warning: buffer too late (-175758 us): dropped main warning: buffer too late (-190491 us): dropped main warning: buffer too late (-235784 us): dropped main warning: buffer too late (-282469 us): dropped main warning: buffer too late (-329210 us): dropped main warning: buffer too late (-343276 us): dropped main warning: buffer too late (-390163 us): dropped main warning: buffer too late (-403732 us): dropped main warning: buffer too late (-416157 us): dropped main warning: buffer too late (-463753 us): dropped main warning: buffer too late (-509728 us): dropped main warning: buffer too late (-524035 us): dropped main warning: buffer too late (-569687 us): dropped main warning: buffer too late (-616522 us): dropped main warning: buffer too late (-663086 us): dropped main warning: buffer too late (-677065 us): dropped


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests