Log in

View Full Version : Change the container and merge multiple videos/parts?


AltairAC
4th January 2012, 02:23
Hi!

I gathered a collection of videos which use a FLV container and besides that, they are split in multiple parts. I would like to change the container to mp4, avi or mkv (whichever is easier to handle) and then merge the videos into one video.

I already tried to extract the streams and merge them with MP4Box but every time I only get the audio, the video doesn't seem to work.

Example:

http://img842.imageshack.us/img842/7456/mtvgameone.png

So I have a video which is broken down in 6 parts and uses a FLV container (the highlighted ones). Then I drag&drop them into FLVExtract and get the audio and video streams. Basically, I need advice on how to put the corresponding audio and video streams back into a container (mp4, avi or mkv) and then merge the 6 videos into one (six ~3min videos into one ~18 min video).

Video&Audio information (FLV file):
Video
Format : VP6
Codec ID : 4
Duration : 2mn 7s
Bit rate : 700 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.091
Stream size : 10.6 MiB (75%)

Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Codec ID : 2
Codec ID/Hint : MP3
Duration : 2mn 7s
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 2.91 MiB (21%)


Extracted stream:
Video
ID : 0
Format : VP6
Format profile : Heightened Sharpness
Codec ID : VP6F
Codec ID/Hint : On2
Duration : 2mn 7s
Bit rate : 729 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 25.000 fps
Bits/(Pixel*Frame) : 0.095
Stream size : 11.1 MiB (99%)

poisondeathray
4th January 2012, 04:42
because vp6 isn't supported in mp4 container

you would have to re-encode the video with different compression

AltairAC
4th January 2012, 12:57
because vp6 isn't supported in mp4 container

you would have to re-encode the video with different compression

Thanks for the info!

I decided to try it with the avi container and this:
ffmpeg -i input.avi -i input.mp3 -vcodec copy -acodec copy output.avi
works flawlessly!

After remuxing the video and audio sources I joined the videos with avidemux and everything went fine but is there any way to make the process more automatic since I would have to execute a ffmpeg command for every video to rejoin the audio and video sources and then join the remuxed videos with avidemux. Is there any way to create a simple .bat/.exe app in which I could just drag&drop the audio and video source and get an avi file or maybe do everything with avidemux?

I have no problem with joining already muxed videos but when I try to add sources, I can add all the video sources and I get the full video (example: 6 video sources x ~3min > output: 1 combined video ~18min) but I can only add one audio source into avidemux, it doesn't recognize the other 5.

mvBarracuda
4th January 2012, 13:54
Simply merge the videos with mkvmergeGUI/mkvtoolnix:
http://www.bunkus.org/videotools/mkvtoolnix/

AltairAC
4th January 2012, 17:44
Simply merge the videos with mkvmergeGUI/mkvtoolnix:
http://www.bunkus.org/videotools/mkvtoolnix/

Already tried that but when I try to merge the videos by adding the audio and video source files, it creates the video as it should it be (in size) but only plays the first video and audio source, it ignores the other 5 regardless of them being muxed too into the video.

nm
4th January 2012, 19:03
Already tried that but when I try to merge the videos by adding the audio and video source files, it creates the video as it should it be (in size) but only plays the first video and audio source, it ignores the other 5 regardless of them being muxed too into the video.

Don't add the other five clips, append.

On command line:

mkvmerge input1.avi +input2.avi +input3.avi -o output.mkv
That should work nicely in a script with ffmpeg remuxing the FLV files to AVI or MKV.

sneaker_ger
4th January 2012, 19:04
Already tried that but when I try to merge the videos by adding the audio and video source files, it creates the video as it should it be (in size) but only plays the first video and audio source, it ignores the other 5 regardless of them being muxed too into the video.

Did you choose "append" for part 2 to 6 or did you just drag&drop all files?

AltairAC
4th January 2012, 20:46
Don't add the other five clips, append.

On command line:

mkvmerge input1.avi +input2.avi +input3.avi -o output.mkv
That should work nicely in a script with ffmpeg remuxing the FLV files to AVI or MKV.

Did you choose "append" for part 2 to 6 or did you just drag&drop all files?

I did not use append but now I have and it works as it should. I have no further questions, thanks to everyone!