[FFmpeg-user] Concatenation of mpg files
Francois Visagie
francois.visagie at gmail.com
Fri Aug 23 09:33:29 CEST 2013
> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of Dzung Nguyen
> Sent: 22 August 2013 20:13
> To: FFmpeg user questions
> Subject: [FFmpeg-user] Concatenation of mpg files
>
> Hi,
>
> I tried to cat in ubuntu shell mpg files, but the output file lost timing
> information (can't be played, can't seek)
>
> This is mpg video information:
>
> ffmpeg -i 0.mpg
> ffmpeg version git-2013-08-06-a68b6ec Copyright (c) 2000-2013 the FFmpeg
> developers
> built on Aug 21 2013 11:58:24 with gcc 4.6 (Ubuntu/Linaro
4.6.3-1ubuntu5)
> libavutil 52. 41.100 / 52. 41.100
> libavcodec 55. 22.100 / 55. 22.100
> libavformat 55. 13.102 / 55. 13.102
> libavdevice 55. 3.100 / 55. 3.100
> libavfilter 3. 82.100 / 3. 82.100
> libswscale 2. 4.100 / 2. 4.100
> libswresample 0. 17.103 / 0. 17.103
> libpostproc 52. 3.100 / 52. 3.100
> Input #0, mpeg, from '0.mpg':
> Duration: 00:02:10.00, start: 0.533367, bitrate: 2899 kb/s
> Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p, 1280x720 [SAR 1:1 DAR
> 16:9], 104857 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc
>
> So it's mpeg1 encoded, everything is correct. The way I make this video is
> using command:
>
> ffmpeg -loop 1 -r 1 -i image.png -q:v 0 -r 29.97 -t 10 0.mpg
>
> What should I change here in the converting from image to video, so that
the
> mpg files are cattable?
Do I understand correctly that you're using ffmpeg to create individual mpg
files from images, and then you want to concatenate them?
If so, each individual file will have its own header information, and the
first's header information won't reflect the size/playing time of them all.
Therefore a straight-forward binary concatenation of the mpg files won't
work for most players. One way around that is to concatenate them with
ffmpeg, using the concat: protocol.
Kind regards,
Francois
More information about the ffmpeg-user
mailing list