Comments (6)
Speaking under correction, but I assume that a typical .avi consists of:
<header><movie>
doing a concatenate should give you
<header><movie><header><movie>
I'm sure there is an ffmpeg way to do it.
Its been a long time, but I know you have to use the /b (binary) flag in dos.
In dos (and I assume windows) copy /b movie1.avi + movie2.avi movie_cat.avi
should do the same thing, but I might be slightly wrong.
Original comment by [email protected]
on 9 Jan 2009 at 6:28
from winff.
From http://howto-pages.org/ffmpeg/
[Quote] You can also use ffmpeg to concatenate multiple videos into one long
video.
Start by transcoding all the individual videos into MPEG format, all with
exactly the
same bit rates, codecs, image resolutions, frame rates etc. Mistakes can be
avoided
by using one of ffmpeg's predefined targets such as ntsc-dvd or pal-dvd. Once
that's
done, simply string the resulting .mpg files together using "cat" and redirect
the
output to another .mpg file. Now, the timestamps inside the resulting, big .mpg
file
are all going to be messed up, so you'll have to process the big .mpg file with
ffmpeg again. This will have the effect of putting the timestamps right.
[/quote]
Maybe only works for mpeg? But on websites it seems like a general approach.
Apparently ffmpeg is that smart.
Original comment by [email protected]
on 9 Jan 2009 at 7:25
from winff.
the cat'ing only works on mpeg files, but you convert all the files to mpg then
cat
and then you convert again to the format you like. It's a long involved
process. It
would be cool though.
(the size of all the videos converted to mpg)x2 + the size of the final encode.
Original comment by [email protected]
on 9 Jan 2009 at 9:58
from winff.
Played with this. FFmpeg bitrates, even when specified all the same are not
converted
to exactly the same every time. It is very inconsistent. Getting more than 4
files
would almost guarantee failure. So i am going to wait.
Original comment by [email protected]
on 21 Feb 2009 at 5:01
- Changed state: Started
from winff.
From the ffmpeg FAQ:
3.18 How can I join video files?
A few multimedia containers (MPEG-1, MPEG-2 PS, DV) allow to join video files by
merely concatenating them.
Hence you may concatenate your multimedia files by first transcoding them to
these
privileged formats, then using the humble cat command (or the equally humble
copy
under Windows), and finally transcoding back to your format of choice.
ffmpeg -i input1.avi -sameq intermediate1.mpg
ffmpeg -i input2.avi -sameq intermediate2.mpg
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
ffmpeg -i intermediate_all.mpg -sameq output.avi
Notice that you should either use -sameq or set a reasonably high bitrate for
your
intermediate and output files, if you want to preserve video quality.
Also notice that you may avoid the huge intermediate files by taking advantage
of
named pipes, should your platform support it:
mkfifo intermediate1.mpg
mkfifo intermediate2.mpg
ffmpeg -i input1.avi -sameq -y intermediate1.mpg < /dev/null &
ffmpeg -i input2.avi -sameq -y intermediate2.mpg < /dev/null &
cat intermediate1.mpg intermediate2.mpg |\
ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
allow
concatenation, and the transcoding step is almost lossless.
For example, let's say we want to join two FLV files into an output.flv file:
mkfifo temp1.a
mkfifo temp1.v
mkfifo temp2.a
mkfifo temp2.v
mkfifo all.a
mkfifo all.v
ffmpeg -i input1.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp1.a
<
/dev/null &
ffmpeg -i input2.flv -vn -f u16le -acodec pcm_s16le -ac 2 -ar 44100 - > temp2.a
<
/dev/null &
ffmpeg -i input1.flv -an -f yuv4mpegpipe - > temp1.v < /dev/null &
ffmpeg -i input2.flv -an -f yuv4mpegpipe - > temp2.v < /dev/null &
cat temp1.a temp2.a > all.a &
cat temp1.v temp2.v > all.v &
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
-f yuv4mpegpipe -i all.v \
-sameq -y output.flv
rm temp[12].[av] all.[av]
Original comment by [email protected]
on 26 Apr 2009 at 9:48
from winff.
I would like to concatenate to simple H.264 files together (low bit rate and
baseline
profile) with identical parameters and audio into one H.264 file without trans
coding
and from the base libs and not from the command line. I need them staticly
linked in
my application. I know that's a lot to ask, but it would be the bomb no my end.
- Sam
Original comment by [email protected]
on 8 Dec 2009 at 7:44
from winff.
Related Issues (20)
- Add the possibility to choose the GUI language in a dropdown menu in the "General" tab of the WinFF preference window
- New release? HOT 1
- Malicious -> hybrid-analysis.com
- Winff doesn't play nice with large fonts
- Convert to issue HOT 2
- upgrade winff with gtk3 HOT 2
- Hardware Encoding Options
- WinFF overwrites existing Video Files without query!! o_O HOT 2
- multiple presets fails with ffmpeg 4.x
- Options for pre-input, and how to add a new field to the gui?
- Security issues HOT 1
- Enable Cuda Hw acceleration HOT 4
- compile winff? HOT 1
- Add WinFF to chocolatey HOT 1
- ERR<13080> HOT 6
- winff window size
- Is the project abandoned? HOT 7
- Problem displaying pt_BR translation HOT 13
- Winff does not use Unicode when it passes the file names into the command prompt. HOT 1
- Error: (5002) Duplicate identifier "LAZUTF8" and "LAZFILEUTILS" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winff.