I have several FLVs I've downloaded, all with exactly the same properties (bitrate, codec, channels, etc.). An example of one:
How can I join these FLVs together into one large FLV? I know this is a common question, but some differences in my case:Code:ffmpeg -i sp-1-4-2.flv FFmpeg version UNKNOWN, Copyright (c) 2000-2008 Fabrice Bellard, et al. configuration: --enable-nonfree --enable-pthreads --enable-x11grab --enable-liba52 --enable-libfaac --enable-libfaad --enable-libx264 --enable-libxvid --enable-libmp3lame --enable-gpl --enable-postproc --enable-swscale --enable-libvorbis --enable-libtheora --enable-libdc1394 --disable-debug --enable-shared --prefix=/usr libavutil 49.10. 0 / 49.10. 0 libavcodec 51.71. 0 / 51.71. 0 libavformat 52.22. 1 / 52.22. 1 libavdevice 52. 1. 0 / 52. 1. 0 libswscale 0. 6. 1 / 0. 6. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Sep 7 2008 11:10:32, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7) Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001) Input #0, flv, from 'sp-1-4-2.flv': Duration: 00:06:11.12, start: 0.000000, bitrate: 128 kb/s Stream #0.0: Video: vp6f, yuv420p, 640x480, 29.97 tb(r) Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 128 kb/s
- This is Linux and command-line-only at that, which limits me mostly to either ffmpeg or mencoder.
- FLVs can't be simply concatenated so a byte-for-byte copy doesn't work.
- I've tried: mencoder -oac copy -ovc copy -idx -o foo.flv 1.flv 2.flv 3.flv ... but the resulting file has no video stream and the audio is completely garbled.
- I've also tried ffmpeg's own example of how to join FLVs (http://ffmpeg.mplayerhq.hu/faq.html#SEC31) but the resulting file doesn't seek, so playback is incredibly slow for anything but starting at the beginning.
- And finally, I've tried mencoder -fps 29.97 1.flv -fps 29.97 2.flv -fps 29.97 3.flv ... out.flv -of lavf -ovc copy -oac copy but the resulting file, while seekable, is occasionally garbled visually and also occasionally has random audio chirps and noise; the original FLVs don't.
I'm fine with ending up with a different container like AVI or MKV but my objective is to not convert the video or audio streams themselves to other formats; I don't want to lose any quality in the process as they're already compressed to a decent extent, and compressing them further won't look so good.
Would demuxing the FLVs, concatenating the audio and video streams, and then remuxing them work for me? The FLV joining in the ffmpeg FAQ implies that's the process, only they're using pipes to do it in real-time rather than using temporary files.
Any help?
+ Reply to Thread
Results 1 to 4 of 4
-
-
FWIW, this seems to work:
avidemux2_cli --audio-codec copy --video-codec copy --output-format avi --load 1.flv --append 2.flv --append 3.flv --save out.avi
It crashes if I try MKV but I can live with an AVI container.
edit: I take it back. The audio lags badly towards the end of the merged file. -
Originally Posted by filburt1
-
I've seen the same thing, but it looks like avidemux either ignores the argument or isn't affected by it; --fps 29.97 has no effect.
The documentation for command-line arguments for more advanced changes is terrible, the Berlios SVN server is down so I can't compile a newer version, and the latest tarball of source code requires X to build even though I don't have it (nor do I need it).
Agh!
Similar Threads
-
Is there a guide to merging multiple DVD titles into a single output file?
By Lolipop Jones in forum DVD RippingReplies: 10Last Post: 11th Nov 2016, 19:19 -
Merging multiple parts of one mp4 file into one file
By vaultedskies in forum Newbie / General discussionsReplies: 2Last Post: 16th Nov 2011, 09:08 -
Merging multiple files as one video file?
By mikehende in forum Newbie / General discussionsReplies: 5Last Post: 10th Nov 2011, 06:28 -
Merging/Converting Multiple M2TS files to MKV With Multiple Audio Tracks
By Nicholas S. Folsom in forum Video ConversionReplies: 1Last Post: 13th May 2011, 18:34 -
Merging multiple differently formatted text subtitle files?
By fvisagie in forum SubtitleReplies: 9Last Post: 18th Aug 2008, 14:23