Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
2nd April 2013, 18:01 | #1 | Link |
Registered User
Join Date: Sep 2003
Location: On The Beach
Posts: 714
|
How to demux avi with 2 video streams?
I have a H264 recorded video which contains 2 video streams because the recorder have 2 cameras.
In MPC-HC I cannot play correctly the file, but in VLC I can watch both video streams in separate windows. MKVMerge Gui cannot mux, VirtualDub can mux only one stream, AviDemux is crashing, Yamb is havin some error even recognized the video tracks. I want to extract both video because I want to make a PIP video. If this thread is not OK here I hope the moderator to move it in the right place. Thanks! |
2nd April 2013, 18:12 | #2 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
You can use ffmpeg , using -map command for the stream
e.g Code:
ffmpeg -i input.avi -map 0:0 -vcodec copy output0.mp4 ffmpeg -i input.avi -map 0:1 -vcodec copy output1.mp4 Was this from a dashcam or something ? |
2nd June 2014, 08:57 | #6 | Link |
Registered User
Join Date: Apr 2014
Posts: 1
|
What dashcam are you using?
I've also been looking into dash cams because i always run into idiots on the road. People who drive in Vegas aren't fond of using blinkers and also some tourists tend to swerve and cut people off if they're trying not to miss an exit or are just plain lost and not attentive. Anyone using these: http://www.szswill.com ? Last edited by hotzan; 19th June 2014 at 07:04. |
2nd June 2014, 12:00 | #7 | Link |
Registered User
Join Date: Dec 2007
Location: Enschede, NL
Posts: 301
|
It's a bit outdated, but you could try Avi-Mux GUI.
__________________
Roelofs Coaching |
2nd June 2014, 16:09 | #8 | Link |
Registered User
Join Date: Nov 2005
Posts: 693
|
Mtz, I don't know if this issue is still troubling you, but you don't have to extract anything. While your video on sendspace.com isn't available anymore, the video on the dashcam forum you linked to still is. I take it you have the same dashcam, so I messed around a bit...
Avisynth-script: Code:
front=FFVideoSource("mdr_20130402_163942_I2_ORIGINAL.avi").AssumeFPS(12898,1001).Spline36Resize(1280,720) back=FFVideoSource("mdr_20130402_163942_I2_ORIGINAL.avi",track=1).AssumeFPS(12898,1001).Crop(2,60,0,-60).Spline36Resize(352,198).FlipHorizontal() StackHorizontal(front.Crop(0,0,-352,198),back) StackVertical(last,front.Crop(0,198,0,0)) InterFrame(NewNum=25,NewDen=1,Cores=4) - AssumeFPS aligns the video- and audio duration. MediaInfo reports a framerate of 12.894fps, while FFMpeg reports 12.92fps, so as the framerate is already inconsistent, we might as well align it with the audiostream. The audiostream has 1329680samples, a frequency of 22050Hz and the videostream has 777frames; 777 / (1329680/22050) * 1001 = 12897.827. If you're okay with the audio and video being a bit out of sync, then this step isn't really necessary though. - FlipHorizontal ...camera footage appears to be mirrored by default, so as if you're looking through the rear-view mirror. With FlipHorizontal it's like you're actually looking behind you. Personal taste. - StackHorizontal/Vertical ...alternative to Layer without the need to mess with colorspaces - InterFrame ...artificially crank up the framerate to 25fps (optional) Encode-process: Code:
ffmpeg.exe -hide_banner -i "mdr_20130402_163942_I2_ORIGINAL.avs" -i "mdr_20130402_163942_I2_ORIGINAL.avi" -map 0 -map 1:2 ^ -c:v libx264 -preset slower -level 4.1 -bf 8 -me_range 24 -c:a libopus -ab 64k "mdr_20130402_163942_I2_ORIGINAL_FFMS2.mkv" - specify which stream to process; -map 0 (Avisynth videostream), -map 1:2 (AVI-file audiostream) - x264 parameters - opus parameters End result.
__________________
My hobby website |
2nd June 2014, 18:08 | #9 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
|
Hmmm...
This topic was originally posted by Mtz 14 months ago EDIT: It would also appear that Mtz has not visited this forum since the 8th December 2013 20:14...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 2nd June 2014 at 18:44. |
2nd June 2014, 18:20 | #10 | Link |
Registered User
Join Date: Nov 2005
Posts: 693
|
I know, but I didn't believe his question was answered yet.
__________________
My hobby website |
2nd June 2014, 21:57 | #11 | Link |
Registered User
Join Date: Dec 2007
Location: Enschede, NL
Posts: 301
|
You got me. I only saw "April".
__________________
Roelofs Coaching |
Tags |
2 videos, dual videos, multiple videos, two videos |
Thread Tools | Search this Thread |
Display Modes | |
|
|