Good Afternoon,
I have several webm files. I also have startTimeOffset and stopTimeOffset of the videos.
Offsets defined as:
• startTimeOffset — The offset, in milliseconds, for when this file started recording (from the createdAt time for the archive).
• stopTimeOffset — The offset, in milliseconds, for when this file stopped recording (from the createdAt time for the archive).
Here is an example:
```
d4a19a58-790a-45c1-b96e-819bc98cd408.webm | 1720 | 3762173
ab794f92-bdfb-4bb0-821d-ba80c8a9228a.webm | 48920 | 3328385
a7df9a51-0671-4930-a14b-e7d85a562577.webm | 76220 | 3763361
5d312878-d25d-40d7-9418-bed85e22efc6.webm | 3109640 | 3267473
1cf6127d-250a-4601-a219-b1b6bbd725f8.webm | 3360980 | 3636927
c3ddd462-e05a-425f-af58-f288f930f2cb.webm | 3689600 | 3760423
```
These files are indivual users in a group conversation.
My end goal here is to combine them all into 1 audio file
Here is what I have done so far. It creates the group audio just fine but the audio isn't lined up. there is like a 33 second delay from when person 1 talks and then person 2 answers. Then the rest of the video is off and on ocassion people are talking over each other because the audio is out of alignment.
Here is the command I used to get the webm file to convert to MP3 broken into lines for readability:
```
ffmpeg
-acodec libopus
-i d4a19a58-790a-45c1-b96e-819bc98cd408.webm
-b:a 320K
-vn
-y d4a19a58-790a-45c1-b96e-819bc98cd408.mp3
```
Here is the full command I used to combine all the MP3s with the delays.
```
ffmpeg
-i d4a19a58-790a-45c1-b96e-819bc98cd408.mp3
-i ab794f92-bdfb-4bb0-821d-ba80c8a9228a.mp3
-i a7df9a51-0671-4930-a14b-e7d85a562577.mp3
-i 1cf6127d-250a-4601-a219-b1b6bbd725f8.mp3
-i c3ddd462-e05a-425f-af58-f288f930f2cb.mp3
-filter_complex "
[0]adelay=1720|1720[a0];
[1]adelay=48920|48920[a1];
[2]adelay=76220|76220[a2];
[3]adelay=3360980|3360980[a3];
[4]adelay=3689600|3689600[a4];
[a0][a1][a2][a3][a4]amix=inputs=5
"
out.mp3 -y
```
As mentioned if I take like 33 seconds off of the 76220 offset, person 2 ends up answering the question at the correct spot in the video.
There is no errors in the output. Everything appears to process correctly.
The Mp3 files are different durations. For example, person 1 was on the conference for 1 hour, person 2 might only be on the call for a half hour, though in this particular instance person 1 was on the call for 74.5 seconds before person 2 connected.
All the examples I have read seem similar to what I am trying to do.
Any ideas?
+ Reply to Thread
Results 1 to 8 of 8
-
-
My end goal here is to combine them all into 1 audio file
In the first case, audio delays are irrelevant.
Try to explain your intention better. -
Think of a video zoom call.
You have 4 people all the call.
They are all conversing in a group meeting.
When the call over. I am given a zip file with 4 webm files.
Those 4 files are individual streams.
I am tasked with combining those streams into 1 combined stream so people can listen to the audio file and hear the conversation.
I have a situation where the 4 users joined the video call but did not enable their video for privacy concerns.
The files still come over as webm with different start & end time offsets.
I convert the webm files to mp3.
I need to combine all the mp3 files using the offsets so I can play back the original conversation with all the audio lined up so the conversation makes sense. -
So you have one audio track per person, on which only their voice can be heard?
Then you can load these individual tracks together into a multitrack audio editor and then move the individual tracks around until they form a fluid conversation. Audacity can do this, but you should not convert the webm to mp3, but to pcm(wav), then merge and edit this and then convert the result to mp3. -
For those that are wondering why I am using ffmpeg instead of another tool, here is some more information:
1. Most of the archives are webm video and audio together. I use ffmpeg to convert to mp4 and then do a grid video (2x2,3x3,4x4) of these meetings.
2. Automation. Because there are too many videos to do this one meeting at a time.
The issue in my original post came about when recently they decided to do video interviews because they need to share the screen but did not turn on their videos.
I speculate that something happened with the start time offsets, but I am not sure. It could be that I am missing something on how things work.
I will upgrade to the latest git version today to see if that helps.
Similar Threads
-
FFMpeg merging audio files truncates output to shortest audio file
By Wayneos in forum Video ConversionReplies: 0Last Post: 3rd Jul 2019, 07:07 -
ffmpeg audio delay - how to get the video to start before the audio ?
By Selur in forum Newbie / General discussionsReplies: 6Last Post: 13th Mar 2017, 14:30 -
FFMPEG and out of sync avi
By sambat in forum Newbie / General discussionsReplies: 5Last Post: 10th Mar 2017, 08:17 -
FFMPEG -F Concat Video, Audio Sync Issue
By Shohag_ifas in forum EditingReplies: 2Last Post: 30th Nov 2016, 01:31 -
VirtualDub audio out of sync, other video players all in sync
By a1s2d3f4 in forum Newbie / General discussionsReplies: 7Last Post: 11th Apr 2016, 21:36