Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FFMPEG - errors when combining videos

Tags:

ffmpeg

I have two .OGG files of similar size, FPS and duration. My goal is to combine them into a side-by-side presentation using FFMPEG. To this end I've tried the following cmd:

ffmpeg -i subject.ogg -vf "[in]pad=3*iw:3*ih[left];movie=clinician.ogg[right];[left] [right]overlay=100:0[out]" combined.ogg

Suffice to say that the resultant video is non-playable. During the combination process FFMPEG prints lots of errors that read like:

[Parsed_overlay_2 @ 0x1eb7d3e0] Buffer queue overflow, dropping

What is this telling me?

Note:

  • both source files are playable
  • I padded the 'output' to be rather large in an attempt to understand the params
  • the placement of the 2nd video at 100:0 is arbitrary. Once I get the cmd working I'll move it to a better location in the output.
  • both videos began life as .FLV recorded from web cameras. I converted them to .ogg as FFMPEG didn't want to combine two .FLV files. If there is a better route to this, please let me know.

So - what's wrong with my parameters and what am I doing to cause these FFMPEG errors?

EDIT:
ffmpeg -i clinician.ogg

Input #0, ogg, from 'clinician.ogg':
Duration: 00:05:20.98, start: 0.001000, bitrate: 2273 kb/s
Stream #0:0: Video: theora, yuv420p, 500x500 [SAR 1:1 DAR 1:1], 1k tbr, 1k tbn, 1k tbc
Metadata:
SERVER : Red5 Server 1.0.0 RC1 $Rev: 4193 $
CANSEEKTOEND : true
ENCODER : Lavf54.31.100
Stream #0:1: Audio: vorbis, 8000 Hz, stereo, s16
Metadata:
SERVER : Red5 Server 1.0.0 RC1 $Rev: 4193 $
CANSEEKTOEND : true
ENCODER : Lavf54.31.100

ffmpeg -i subject.ogg

Input #0, ogg, from 'subject.ogg':
Duration: 00:05:17.60, start: 0.001000, bitrate: 1341 kb/s
Stream #0:0: Video: theora, yuv420p, 300x300 [SAR 1:1 DAR 1:1], 83.33 tbr, 1k tbn, 1k tbc
Metadata:
SERVER : Red5 Server 1.0.0 RC1 $Rev: 4193 $
CANSEEKTOEND : true
ENCODER : Lavf54.31.100
Stream #0:1: Audio: vorbis, 8000 Hz, stereo, s16
Metadata:
SERVER : Red5 Server 1.0.0 RC1 $Rev: 4193 $
CANSEEKTOEND : true
ENCODER : Lavf54.31.100

like image 768
ethrbunny Avatar asked Dec 10 '25 01:12

ethrbunny


1 Answers

Converting to x264 was a great suggestion. That seemed to turn the tide.

Here are some notes for posterity:

  • to convert flv to x264 and correct audio sync issues:

ffmpeg -y -i subject_s_2242_r_1658.flv -async 1 -ac 2 -strict -2 -acodec vorbis \
-c:v libx264 -preset slow -crf 22 subject.mkv

  • to merge two x264 files into a single side-by-side file and put the two mono audio tracks into stereo in the resultant file:

ffmpeg -y -i clinician.mkv -vf: "movie=subject.mkv[right];pad=iw*2:ih:0:0[left];[left][right]overlay=500:0" \
-filter_complex "amovie=clinician.mkv[l];amovie=subject.mkv[r];[l][r] amerge" final.mkv

I was unable to install AVISYNTH (running on CentOS 6.2) but it does look like a great solution.

like image 183
ethrbunny Avatar answered Dec 13 '25 07:12

ethrbunny