[Libav-user] seek audio file to a timestamp or frame and copy frame by frame without reencoding

Emanuele Guzzetti phates89 at gmail.com
Thu Apr 10 20:35:35 CEST 2014

Hi. I'm a beginner of libav api and i'm still learning how to use them. My
goals are 2 different programs.
The first is a program that take an ac3 file with mixed 5.1 and 2.0 frames
and convert the 2.0 frames to 5.1 and leave the 5.1 frames without
reencoding them
The second is a basic editor that allows me to do basic edits (insert
silence or delete audio in any point of the audio track) to an audio track
(i already created it with ffmpeg/delaycut/eac3to exe but i'd like to have
a more accurate and direct approach).
So i started to learn about api/decoding/encoding but most of the work
online is based on seeking video.
I found this link that helped me a lot:
Modding this code i'm able actually to read frame by frame an audio track,
fecode the frame and detect if the frame is 2.0 or 5.1 but i don't know how
to measure the frame lenght to know the timing i'm arrived and i don't know
how to get the raw data to simply save them without decoding.
FFmpeg does it with -acodec copy -ss -t so i also tried to look in ffmpeg
code but i couldn't find it.
There are bilt-in functions in libav to seek audio? Can someone give me a
clue where i can start to look to understand these 2 things (seek and frame
raw reading and saving) or give me some suggestion?
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140410/2a30bd75/attachment.html>

More information about the Libav-user mailing list