[FFmpeg-user] FFmpeg audio frame count/nb_samples misunderstanding?
klongwood3 at gatech.edu
Fri Jan 3 18:11:21 EET 2020
After discussing with support within the #ffmpeg IRC channel, this approach
doesn't seem to be too reliable or consistent to keep track of frame count
from sender and receiver. A "frame" in ffmpeg at the decoding side is just
"however many samples the decoder decoded from one packet". The thing with
the audio the audio formats have packets that contain frames of differing
size so input and outputs can differ in count.
It was recommended that if 100% sure that receiver will get all packets,
then I should check the count of packets fed to muxer, and then the count of
packets read from demuxer, those in theory should match. How ever on the
reciever end it was always missign a couple of packets that were not
repeated. This could be depended on how the sender was stopped, it might be
possible that there was some audio that passed through the filter chain but
didn't get encoded/sent.
Sent from: http://www.ffmpeg-archive.org/
More information about the ffmpeg-user