Hello,
I have a MP4 file (container) where video is compressed with DIV3; since DIV3 should be compatible with AVI, I am looking for a way to repackage without full de-/re-encoding.
The file plays well in mpc and BSPlayer, but not in wmp nor zoom. ffdshow is installed, but is not really needed (if I disable libavcodec msmpeg4, the DIVX codec directly handles DIV3 also correctly).
avidemux opens the MP4 file, but doesn't seem to support the DIV3 codec and only displays colorful pixels at the screen bottom; file information reports the codec as blank. Saving to AVI does not fill in any information about the video codec.
I can demux the two streams with MP4Box, but don't know what to do afterwards with the raw DIV3 stream data.
I can well open the file in VD using avisynth, but since it only gives access to the decompressed video data this is to no avail.
I can also open the file in VD with the quicktime plugin, forcing mode=4 (VFW) and a fourcc=DIV3, but afterwards unfortunately cannot save back to AVI with direct stream copy: I get the error "The source Video stream uses a compression algorithm which is not compatible with avi files. Direct Stream Copy cannot be used with this Video stream"
Questions:
a) does the QT plugin give access to the raw (compressed) video stream data, or only (like avisynth) to the decompressed?
b) is there any other chance to repackage without re-encoding?
w.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
Nope, that one has escaped my attention so far.
Will try tonite, thanks a lot!
w. -
Hello Baldrick,
I have used your command with the round 20 files I have, and I get 3 different results:
1) for a couple of files, everything works fine
2) for a couple of files, ffmpeg stops quickly with "error, non monotone timestamps"
3) for some ffmpeg blows up the file to 10 times its original size (more then 50% used by an enormous index); I have to feed it again into VD and save with mode direct stream copy to get it back to a reasonable size close to the original.
I haven't used ffmpeg before, can you give any advise on problems (2) and (3)?
Thanks, w. -
Nope, I have no ideas. Sounds like crappy source video...
-
Solved it.
Reason was the audio track: I had to first demux it with MP4Box, then process (repackage) the video with ffmpeg using the "no audio" option (-an), and then remux the two tracks together again with VirtualDub.
Sounds complicated, but can be scripted/batched easily, and only takes 2 seconds per file.
VDub script "my.script":
Code:VirtualDub.Open(VirtualDub.params[0],"",0); VirtualDub.audio.SetSource(VirtualDub.params[1], "MPEG audio input driver (internal)", "DAAAAE1QM08AAAAA"); VirtualDub.audio.SetMode(0); VirtualDub.audio.SetInterleave(1,500,1,0,0); VirtualDub.audio.SetClipMode(1,1); VirtualDub.audio.SetConversion(0,0,0,0,0); VirtualDub.audio.SetVolume(); VirtualDub.audio.SetCompression(); VirtualDub.audio.EnableFilterGraph(0); VirtualDub.video.SetInputFormat(0); VirtualDub.video.SetOutputFormat(7); VirtualDub.video.SetMode(0); VirtualDub.video.SetSmartRendering(0); VirtualDub.video.SetPreserveEmptyFrames(0); VirtualDub.video.SetFrameRate2(0,0,1); VirtualDub.video.SetIVTC(0,0,-1,0); VirtualDub.video.SetCompression(); VirtualDub.video.filters.Clear(); VirtualDub.audio.filters.Clear(); VirtualDub.subset.Delete(); VirtualDub.video.SetRange(); VirtualDub.project.ClearTextInfo(); VirtualDub.SaveAVI(VirtualDub.params[2]); VirtualDub.audio.SetSource(1); VirtualDub.Close();
Code:C:\Programme\MP4Box\mp4box %1.mp4 -raw 2 C:\Programme\ffmpeg-0.5\ffmpeg -i %1.mp4 -vcodec copy -an %1.avi C:\Programme\VirtualDub\vdub.exe /i my.script %1.avi %1_track2..mp3 .\TEMP\%1.avi DEL %1.avi DEL %1_track2..mp3 MOVE .\TEMP\%1.avi .
Similar Threads
-
M4V to MP4 Container help
By Cornholio77 in forum Video ConversionReplies: 5Last Post: 1st Jan 2012, 03:28 -
Changing mp4 container to avi
By 24fps in forum Video ConversionReplies: 3Last Post: 27th Jun 2010, 07:24 -
change an MKV container to AVI container???
By Spdngblt56 in forum Newbie / General discussionsReplies: 10Last Post: 17th May 2010, 21:23 -
Mux h264.mp4 into avi container?
By ayim in forum Video ConversionReplies: 4Last Post: 11th Feb 2010, 06:18 -
Problem while converting MP4 container into avi
By Fire Foxer in forum Video ConversionReplies: 4Last Post: 29th Nov 2009, 15:55