[FFmpeg-devel] [PATCH] pulse: set default frame_size to 4608

Michael Niedermayer michaelni at gmx.at
Sun Jan 5 01:13:51 CET 2014


On Sat, Jan 04, 2014 at 02:48:23PM +0100, Federico Simoncelli wrote:
> On Sat, Jan 4, 2014 at 1:07 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sat, Jan 04, 2014 at 10:01:39AM +0100, Federico Simoncelli wrote:
> >> On Sat, Jan 4, 2014 at 5:03 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> Ok, that's what I thought, and therefore I don't think that the pts
> >> should be adjusted.
> >> For example, in input you have nb_samples = 1024:
> >>
> >> [ frame0 - frame1023 ] [ frame1024 - frame2047 ] ...
> >>
> >> now the encoder adds 1105 frames of side data and changes nb_samples to 1152:
> >>
> >> [ side data 1105 frames ] [ frame0 - frame46 ] [ frame47 - frame1198 ] ...
> >>
> >> currently what avcodec_decode_audio4 does is discarding the side data
> >> but then adjusting the pts as if they were regular playable frames,
> >> and in fact frame0 is shifted to 0.023s (in my case), while in the
> >> original it's at 0.000s.
> >
> > how is this related to pulse ?
> > can you show your "work in progress" patch? theres most
> > likely a bug in it if it causes something to go wrong with the
> > timestamps
> 
> My work in progress on pulse is irrelevant, you can reproduce it on master:
> 
> $ ffmpeg -loglevel debug -y -f pulse -i default -t 10 recording1.mp3
> ...
> 
> For the pts analysis (and the bug may as well be here) I use:
> 
> https://github.com/simon3z/FFmpeg/commit/5f5e043710dfeeee84a94286a7b421b6cc928187
> 
> (please bear with the filter name and its purpose).
> 
> $ ffmpeg -y -loglevel debug -i recording1.mp3 -af afixpts recording2.mp3
> ...
> 
> Now as you see, the first frame received from the filter has a pts ==
> 1105 (since the previous ones are side data).

no, the side data is in the first frame it is not before the first
frame


> I think that its pts
> should be 0 (in this case).

fixed


> 
> Output #0, mp3, to 'recording2.mp3':
>   Metadata:
>     TSSE            : Lavf55.22.102
>     Stream #0:0, 0, 1/90000: Audio: mp3 (libmp3lame), 48000 Hz, stereo, s16p
> Stream mapping:
>   Stream #0:0 -> #0:0 (mp3 -> libmp3lame)
> Press [q] to stop, [?] for help
> [mp3 @ 0x2ca9320] skip 1105 samples due to side data
> [mp3 @ 0x2ca9320] skip 1105/1152 samples
> [Parsed_afixpts_0 @ 0x2cc6940] pts: 1105, ts: 0.0230208
> [Parsed_afixpts_0 @ 0x2cc6940] Unexpected frame gap: 0.023021
> (interval is 0.000000, tolerance 0.000000)
> [Parsed_afixpts_0 @ 0x2cc6940] No lower gap has been found, pushing
> the frame anyway
> [Parsed_afixpts_0 @ 0x2cc6940] pts: 1152, ts: 0.024
> [Parsed_afixpts_0 @ 0x2cc6940] pts: 2304, ts: 0.048
> 
> -- 
> Federico
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140105/8d802d20/attachment.asc>


More information about the ffmpeg-devel mailing list