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. |
|
|
#1 | Link |
|
Registered User
Join Date: Nov 2001
Posts: 9,779
|
avi2mp4 - How to easily create AVC MP4 files from AVI
after the whole discussion about how avi and vfw sucks (which doesnt need to be repeated in this thread) i decided to set up a simply thingie for allowing people to easily transform their x264 or other avc in .avi files losslessly to nice and clean avc .mp4 files:
1) download avi2mp4 (150 kb) 2) extract the files to the folder where your .avi is stored 3) rename the .avi to input.avi which you want to convert 4) double click on the avi2mp4.bat file with the framerate you want to have in your mp4 5) enjoy your output.mp4 ![]() avi2mp4 writes nothing to your registry, it doesnt install anything or does any other strange things, so nothing can happen (ok your house might explode )
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
|
|
|
|
#2 | Link |
|
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
Why doesn't it use the AVI FPS?
__________________
Detritus Software |
|
|
|
|
|
#3 | Link |
|
Registered User
Join Date: Jun 2004
Posts: 577
|
Here is the improved version
:Code:
@echo off if '%1'=='' goto eof title avi2mp4 avi2raw -e=4 -v "%~dpn1.avi" "%temp%\%~n1.264" set a=-rate 15 -timescale=15000 set b=-rate 23.976 -timescale=23976 set c=-rate 25 -timescale=25000 set d=-rate 29.97 -timescale=29970 set e=-rate 30.00 -timescale=30000 echo select the fps echo a = 15 , b = 23.976 , c = 25 , d = 29.97 , e = 30 set /p m= if %m%==a (set n=%a%) else (if %m%==b (set n=%b%) else (if %m%==c (set n=%c%) else (if %m%==d (set n=%d%) else (if %m%==e (set n=%e%))))) mp4creator -c "%temp%\%~n1.264" %n% "%~dpn1.mp4" del "%temp%\%~n1.264" pause>nul: then "drag" or your h.264 avi video files to the batch file icon, 1. it will demux the avi to raw file(264) 2. select the fps 3. done Note: 1. it cant batch process avi files because i use file name mask . but it still can do that by using some special "frontend" EDIT: batch file broken ,removed something as bond wish
Last edited by Yong; 7th March 2006 at 20:24. |
|
|
|
|
|
#4 | Link |
|
Registered User
Join Date: Nov 2001
Posts: 9,779
|
Yong, remove the xvid support. it will not work that way with crappy avi files packed bitstream ones
i limited this to avc on purpose! also remove the mp4info thing, i want this to be as simple and newbie friendly as possible (including needing as few tools of whatever kind as necessary) for converting asp avi files using mp4box/yamb is far superior and should be used exclusively
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free Last edited by bond; 5th March 2006 at 11:08. |
|
|
|
|
|
#5 | Link |
|
Registered User
Join Date: Jun 2004
Posts: 577
|
Ok bond, its done.
![]() i add mp4info thing because the mp4cretor -verbose=1 is *too* verbose, and it for my own use only(to ensure my batchfile is working...) btw, is that -optimize thing safe to use? And why choose mp4creator as the mp4 muxer? |
|
|
|
|
|
#6 | Link | ||||
|
Registered User
Join Date: Nov 2001
Posts: 9,779
|
Quote:
now the question is, is it really more newbie proove to make them input the fps via cmdl than the way i did it? is it really more newbie proove to make people drag and drop their avi to the bat? what do you guys think? Quote:
Quote:
also i am not sure if this doesnt lead to some sort of "two pass" muxing needing twice the filesize space so i left it away Quote:
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
||||
|
|
|
|
|
#7 | Link | ||
|
Registered User
Join Date: Jun 2004
Posts: 577
|
Quote:
and the output mp4 filename will exactly same as the input avil filename. the fps option only need to type a, b, c and ect then press enter only. but let us hear the user opinion 1st ![]() Quote:
its doesnt print anything when the muxing done ![]() unless there is something wrong with the h264 es file like: "error decoding SEI message"... |
||
|
|
|
|
|
#8 | Link |
|
Registered User
Join Date: Nov 2001
Posts: 9,779
|
i tested mp4creator extensively and it should produce perfect files always
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
|
|
|
|
#10 | Link |
|
Turkey Machine
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
|
I have a similar system, but I use MP4Box. Consists of 4 commands, and works every time. I'll post the batch file later on.
@Yong: Drag and drop can be implemented with .bat files, but I can't remember how. I'll get back to ya on that one.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld |
|
|
|
|
|
#11 | Link | |
|
Registered User
Join Date: Nov 2001
Posts: 9,779
|
Quote:
for the audio you should use aac, which is highly unlikely stored in avi anyways also most people encode the audio outside virtualdub (eg in besweet) and mux it afterwards to the avi so when doing a rip you simply save the step muxing the audio to avi with virtualdub but mux directly the audio stream to mp4 or mkv with the specific tools (yamb or mkvmerge for example)
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
|
|
|
|
|
#13 | Link | |
|
Registered User
Join Date: Jun 2004
Posts: 577
|
Quote:
the %1 or "%~1" is stand for input filename. btw bond, is that usefull if add audio muxing to this avi2mp4 batch file? its not require extra step or tools
|
|
|
|
|
|
|
#14 | Link |
|
Registered User
Join Date: Nov 2001
Posts: 9,779
|
imho its not useful to add audio muxing, because mp4box is also a far better tool for mp3-in-avi to mp4 muxing (the rest isnt supported anyways)
also than people start to bug why their ac3 audio in avi isnt muxed aso... i wanted to keep this as simple as possible, to make it as easy as possible for people who cant stop using virtualdub for x264 video encoding to still be easily able to remux the resulting video stream from avi to mp4 nothing less, nothing more
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
|
|
|
|
#16 | Link |
|
retired developer
Join Date: Oct 2002
Location: Canada
Posts: 8,978
|
anything similar but whitout the need to specify the FPS?
__________________
Detritus Software |
|
|
|
|
|
#17 | Link |
|
Turkey Machine
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
|
MP4Box defaults to 25 FPS anyway, so it'll need some kind of detection on the streams, something I don't believe MP4Box has at the moment.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld |
|
|
|
|
|
#18 | Link |
|
Registered User
Join Date: Nov 2001
Posts: 9,779
|
there has been a patch for mp4box reading out the fps if specified in the raw stream, but it seemed to didnt work correctly, so it is disabled atm
maybe someone can fix it: http://sourceforge.net/tracker/index...01&atid=571738
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau) I know, that I know nothing (Socrates) MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide) Ogg Theora | Ogg Vorbis use WM9 today and get Micro$oft controlling the A/V market tomorrow for free |
|
|
|
![]() |
|
|