Hello,
I am wondering how I would find out which frame in a video belongs to which audio sample. I was thinking about using ffmpeg. I want to use the information contained in the container to find the solution. In the end I would like to automate the process with C++ but for the beginning I am happy with ffmpeg used by command line.
Lets say: I know audio sample 39822 has the characteristic I am looking for. Using the information contained in the container, I want to find out to which frame the audio sample was recorded. (Key frames/ Samples?)
I was thinking ffmpeg could help me with this problem.
I tried to find the answer within the ffmpeg documentation but did not succeed.
Maybe you guys can give me a hint which tool (maybe even other than ffmpeg) to use or where to look specific.
Thanks in advance Tim
+ Reply to Thread
Results 1 to 9 of 9
-
Last edited by tim5; 30th Mar 2021 at 07:13.
-
they are totally independent. you match them by the common time.
scott -
Example:
audio sample 328165
@ 48kHz samplerate, this is 328165 / 48000 = 6.8367sec
video @ 25FPS (since you're in Deutschland and the math is easier)
25 * 6.8367 = Frame 170.91927, but since there is no such thing as a partial frame, it's just frame 170. Almost 171.
Scott -
-
-
You can use the timestamps for the video and audio chunks. But once again, there isn't a1:1 relationship between video chunks and audio chunks.
-
At the best of my knowledge this depends on how the container wraps and indexes the video and audio chunks, e.g. MXF Frame wrapped means to have a guaranteed relation between audio and video chunks in the existing Index. Despite it is about chunks, which can also be called frames - instead of "Samples". (where again each frame/edit unit of course consists of a defined number of samples because we deal with fixed frame rate).
So in my head, it depends on the container if such a releation is given or needs to be recreated by the decoder (e.g. re-indexing ).
The question itself about Samples is a little confusing here because it implies that this is about uncompressed audio. Is this given?
Might be better @tim5 if you add some words about the container you are working with?Last edited by emcodem; 1st Apr 2021 at 02:25.
Similar Threads
-
Authoring Blu-Ray Audio with different sample rates and bonus video.
By SF01 in forum Authoring (Blu-ray)Replies: 7Last Post: 26th Jun 2020, 12:27 -
Find out frame numbers for qp files
By Valit in forum Newbie / General discussionsReplies: 7Last Post: 13th Feb 2020, 12:57 -
VBR: Find out absolute data position of individual frame/sample/time.
By TechLord in forum Newbie / General discussionsReplies: 19Last Post: 27th Feb 2018, 00:13 -
Where to Find Test/Sample MP4 Video Loop to Test Webcam?
By pone44 in forum Newbie / General discussionsReplies: 2Last Post: 10th Sep 2017, 18:50 -
How to find the audio track in this video ?
By munununu in forum Newbie / General discussionsReplies: 3Last Post: 26th Jun 2016, 12:21