summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLou Logan <lou@lrcd.com>2012-06-21 09:43:33 -0800
committerMichael Niedermayer <michaelni@gmx.at>2012-06-22 01:36:14 +0200
commitcdb94139cccfa1434c9c6d7901ea571fd4569184 (patch)
tree5652678bb337980599b41382fda5de372487257a /doc
parent87dced8074cf83e74e69d7dee725c8d62601c4e8 (diff)
downloadffmpeg-streaming-cdb94139cccfa1434c9c6d7901ea571fd4569184.zip
ffmpeg-streaming-cdb94139cccfa1434c9c6d7901ea571fd4569184.tar.gz
doc/faq: Update video joining examples
-same_quant is not designed to convert between quantizer scales, AFAIK. Add example using concat protocol. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/faq.texi32
1 files changed, 20 insertions, 12 deletions
diff --git a/doc/faq.texi b/doc/faq.texi
index 5f371a4..da44adb 100644
--- a/doc/faq.texi
+++ b/doc/faq.texi
@@ -222,26 +222,34 @@ equally humble @code{copy} under Windows), and finally transcoding back to your
format of choice.
@example
-ffmpeg -i input1.avi -same_quant intermediate1.mpg
-ffmpeg -i input2.avi -same_quant intermediate2.mpg
+ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg
+ffmpeg -i input2.avi -qscale:v 1 intermediate2.mpg
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
-ffmpeg -i intermediate_all.mpg -same_quant output.avi
+ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi
@end example
-Notice that you should either use @code{-same_quant} or set a reasonably high
-bitrate for your intermediate and output files, if you want to preserve
-video quality.
+Additionally, you can use the @code{concat} protocol instead of @code{cat} or
+@code{copy} which will avoid creation of a potentially huge intermediate file.
-Also notice that you may avoid the huge intermediate files by taking advantage
-of named pipes, should your platform support it:
+@example
+ffmpeg -i input1.avi -qscale:v 1 intermediate1.mpg
+ffmpeg -i input2.avi -qscale:v 1 intermediate2.mpg
+ffmpeg -i concat:"intermediate1.mpg|intermediate2.mpg" -c copy intermediate_all.mpg
+ffmpeg -i intermediate_all.mpg -qscale:v 2 output.avi
+@end example
+
+Note that you may need to escape the character "|" which is special for many
+shells.
+
+Another option is usage of named pipes, should your platform support it:
@example
mkfifo intermediate1.mpg
mkfifo intermediate2.mpg
-ffmpeg -i input1.avi -same_quant -y intermediate1.mpg < /dev/null &
-ffmpeg -i input2.avi -same_quant -y intermediate2.mpg < /dev/null &
+ffmpeg -i input1.avi -qscale:v 1 -y intermediate1.mpg < /dev/null &
+ffmpeg -i input2.avi -qscale:v 1 -y intermediate2.mpg < /dev/null &
cat intermediate1.mpg intermediate2.mpg |\
-ffmpeg -f mpeg -i - -same_quant -c:v mpeg4 -acodec libmp3lame output.avi
+ffmpeg -f mpeg -i - -qscale:v 2 -c:v mpeg4 -acodec libmp3lame -q:a 4 output.avi
@end example
Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
@@ -268,7 +276,7 @@ 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 \
- -same_quant -y output.flv
+ -qscale:v 2 -y output.flv
rm temp[12].[av] all.[av]
@end example
OpenPOWER on IntegriCloud