[FFmpeg-user] Merging H263 videos

Francois Visagie francois.visagie at gmail.com
Sat Aug 17 11:39:19 CEST 2013


> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of MatCam
> Sent: 16 August 2013 11:36
> To: ffmpeg-user at ffmpeg.org
> Subject: [FFmpeg-user] Merging H263 videos
> 
> Hi I'm currently trying to merge 2 h263 videos.
> When i try to merge them i firstly had only the first video available in
the
> merged version.
> 
> So following FAQ of FFMPEG, I tried to use intermediate format to avoid
> merging problem due to file headers.
> 
> After many test here my command  (mpg is my intermediate format, is ts
> better or faster ?) ffmpeg.exe -threads 8 -i "1.mpg|2.mpg" -f mpeg
-bufsize
> 1000k -maxrate 5000k -b:v 500k  -vcodec h263 -s 704x576  output.mp4

The syntax you're using here seems similar to that of the physical concat
protocol (http://www.ffmpeg.org/ffmpeg-all.html#concat-3) but not quite
correct (more precisely, I've never tried using it without the preceding
'concat:'. The physical concatenation protocol is IMO not the correct
mechanism to use here in any event, since as far as I can work out it does a
byte-level concatenation, which works for things like DVD VOB files.

In this case of separately muxed input files, headers will likely create
problems with physical concatenation as you point out. A more suitable
mechanism to try would be the virtual concatenation script demuxer
(http://www.ffmpeg.org/ffmpeg-all.html#concat-1). This demuxer seems to
operate at the packet level, hence one would expect header information to be
removed from the concatenation. The concat filter
(http://www.ffmpeg.org/ffmpeg-all.html#concat-2) may also be worth a look
although it seems more involved to set up and maintaining sync might become
an issue.

> 
> As you can see I do weird stuff with bitrate and other rates to avoid
errors
> but even when i have no errors my video is empty (good duration but
> without my video ...)

As pointed out elsewhere it's wrong to use the '-f mpeg' option with MP4
output. Since ffmpeg will correctly guess the intended output format from
the .mp4 file extension, you can just omit the '-f' option altogether. If
other problems remain afterwards, post your command line and full console
output.

> 
> Could you show me an example of command line to simply merge Two ts (or
> mpg) files in a h263 one ?
> 
> Thanks.
> 
> Sincerely
> mathieu
> 
> 
> 
> --
> View this message in context: http://ffmpeg-
> users.933282.n4.nabble.com/Merging-H263-videos-tp4660745.html
> Sent from the FFmpeg-users mailing list archive at Nabble.com.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list