[FFmpeg-user] Concatenation of 50-100 files

Dzung Nguyen dzungng89 at gmail.com
Wed Aug 21 22:39:23 CEST 2013


On Wed, Aug 21, 2013 at 2:40 PM, Paul B Mahol <onemda at gmail.com> wrote:

> On 8/21/13, Dzung Nguyen <dzungng89 at gmail.com> wrote:
> > I realized that concat demuxer is the way to go. But one thing is that
> it's
> > very slow, to create a 40 min clip it would take hours. Anyway to improve
> > the speed?
>
> Do not top post.
>
> You can improve speed if you do not transcode.
>
> >
> >
> > On Wed, Aug 21, 2013 at 11:42 AM, Dzung Nguyen <dzungng89 at gmail.com>
> wrote:
> >
> >> You're right, it's the concat demuxer. So I guess concat protocol ( or
> >> simply cat of files) would be more robust? I read that mpg files is
> >> cattable, but after cat files the final video has no time information
> >> (unseekable, can't play).
> >>
> >> This is how I create the subvideo:
> >>
> >> ffmpeg -loop 1 -f image2 -i image.png -q:v 0 out1.mpg
> >>
> >>
> >>
> >>
> >> On Wed, Aug 21, 2013 at 10:46 AM, Paul B Mahol <onemda at gmail.com>
> wrote:
> >>
> >>> On 8/21/13, Dzung Nguyen <dzungng89 at gmail.com> wrote:
> >>> > I'm using ffmpeg concat protocol to join many subvideo files. FFMPEG
> >>> keeps
> >>> > getting dropped packets and can't finish the process.
> >>> >
> >>> > ffmpeg -f concat -i list.txt -q:v 1 concated.mpg
> >>>
> >>> You are not using concat protocol but concat demuxer.
> >>>
> >>> Did you read documentation?
> >>>
> >>> >
> >>> > Should I simply cat subvideo files, or concat in group of 10 and then
> >>> > concat again? In the first case, which encoding can be catted as
> >>> > files?
> >>> > _______________________________________________
> >>> > ffmpeg-user mailing list
> >>> > ffmpeg-user at ffmpeg.org
> >>> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>> >
> >>> _______________________________________________
> >>> ffmpeg-user mailing list
> >>> ffmpeg-user at ffmpeg.org
> >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >>>
> >>
> >>
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>

Sorry for the top posting. To avoid transcoding, I used -c copy command:

ffmpeg -f concat -i list.txt -c copy concat.mpg

But it turns out that there's a lot of errors and ffmpeg can't concat the
files

[mpeg @ 0x21b4a40] packet too large, ignoring buffer limits to mux it
[mpeg @ 0x21b4a40] buffer underflow i=0 bufi=53885 size=133207

Is it because when I create subvideo, I used the q:v 0 options, so the
packet is too large?

ffmpeg -loop 1 -r 1 -f image2 -i image.png -q:v 0 -r 29.97 -t 300 out.mpg


More information about the ffmpeg-user mailing list