Log in

View Full Version : How Convert MP4 to AVI without re encoding.


dooms9day
11th March 2010, 15:07
I have a video of MP4 with the audio of AAC and I wanted to convert it into AVI without re encoding. is there any way to do that..
and another thing, can I get only AVI video from it and remove audio..?

buzzqw
11th March 2010, 15:25
ffmpeg all the way!

ffmpeg.exe -i myfile.mp4 -vcodec copy -acodec copy file(audio+video).avi

ffmpeg.exe -i myfile.mp4 -vcodec copy -an file(video_only).avi

BHH

dooms9day
11th March 2010, 15:44
What u say.? I can't understand...I m beginner tell me in easy way..I think u tell me avi synth scrypt............

Selur
11th March 2010, 16:09
since I'm a bit bored atm here's what buzzqw ment with it:
ffmpeg.exe -i myfile.mp4 -vcodec copy -an file(video_only).avi
1. download a static ffmpeg build (e.g. from http://ffmpeg.arrozcru.org/autobuilds/)
2. extract it
3. open a console
4. use cd "Path to where you extracted ffmpeg to" to get into the ffmpeg folder e.g. cd "d:\my encoding tools\ffmpeg"
5. write ffmpeg.exe -i "path to your mp4 file" -vcodec copy -an "Path to output avi file" (and hit enter ;))
e.g. : ffmpeg -i "e:\my mp4 files\remuxMe.mp4" -vcodec copy -an "q:\my avi files\output.avi"
-> ffmpeg will now copy the video stream from your input .mp4 file into the output .avi file.

buzzqw
11th March 2010, 16:38
What u say.? I can't understand...I m beginner tell me in easy way..I think u tell me avi synth scrypt............

avisynth cannot COPY , since it's a FRAME server

since I'm a bit bored atm here's what buzzqw ment with it ...

thanks Selur :)

BHH

dooms9day
11th March 2010, 17:45
Still I can't understand..the "ffmpeg-latest-mingw32-static" did not work. it has three directories ffmeg is in the bin folder and when I open the ffmpeg nothing any thing happen. and what is console..?
please Selur help me with screen shots if u can.....

buzzqw
11th March 2010, 20:01
copy ffmpeg.exe to c:
copy your file to c:
hit start -> run -> cmd
cd \

then go with command line

BHH

dooms9day
11th March 2010, 22:21
ok I do that but the newly created .avi without audio play only in VLC and not play any other player...
this is my original MP4 file information..
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 1.50 GiB
Duration : 1h 50mn
Overall bit rate : 1 945 Kbps
Encoded date : UTC 2010-01-10 19:43:35
Tagged date : UTC 2010-01-10 19:43:35
Writing application : Yamb 2.1.0.0 [http://yamb.unite-video.com]

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1h 50mn
Bit rate mode : Variable
Bit rate : 1 561 Kbps
Maximum bit rate : 6 222 Kbps
Width : 720 pixels
Height : 288 pixels
Display aspect ratio : 2.500
Frame rate mode : Constant
Frame rate : 25.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.301
Stream size : 1.21 GiB (80%)
Writing library : x264 core 67 r1162M f7bfcfa
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=12 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=1561 / ratetol=1.0 / qcomp=0.50 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=24000 / vbv_bufsize=24000 / ip_ratio=1.10 / pb_ratio=1.10 / aq=1:1.00
Encoded date : UTC 2010-01-10 19:43:35
Tagged date : UTC 2010-01-10 19:52:23

Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 1h 50mn
Bit rate mode : Variable
Bit rate : 253 Kbps
Maximum bit rate : 363 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, LFE
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 200 MiB (13%)
Encoded date : UTC 2010-01-10 19:51:39
Tagged date : UTC 2010-01-10 19:52:23

Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 1h 50mn
Bit rate mode : Variable
Bit rate : 125 Kbps
Maximum bit rate : 233 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 99.1 MiB (6%)
Encoded date : UTC 2010-01-10 19:52:07
Tagged date : UTC 2010-01-10 19:52:23

roozhou
12th March 2010, 07:35
BIG FAT WARNING: FFmpeg will not work!
Currently FFmpeg does not support frame copy of AVC video stream from any non-AVI format to AVI. And FFmpeg does not support frame copy of AAC audio stream from any format to AVI, even AVI->AVI is broken.

Currently I am working on fixing these bugs and this requires a lot of hacks on FFmpeg. When I finish this it is less likely to be submitted to official svn because ffmpeg-devels do not like hacks.

Here is how to do it. First grab the following tools:
mp4box or ffmpeg, avc2avi, dtsedit(optional), avitctools(optional), AVIMux_GUI(optional)

Steps:
1) MP4 -> raw: Use MP4Box or ffmpeg to extract AVC and AAC streams.
ffmpeg -i input.mp4 -vocdec copy -an -vbsf h264_mp4toannexb output.h264
ffmpeg -i input.mp4 -vn -acodec copy output.aac
or
mp4box input.mp4 -raw 0:output.h264 1:output.aac
2) Mux h264 to avi using avc2avi. You have to specify the correct frame-rate.
3) If your video is vfr, you need to extract timecodes using dtsedit and create vfr avi using avitctools.
If you need audio:
4) Mux video AVI and aac stream to AVC+AAC AVI with AVIMux_GUI.

minaust
27th May 2013, 07:22
ok I do that but the newly created .avi without audio play only in VLC and not play any other player...


Okay - time to drop back and punt.

1. open the mp4 with virtualdub.
2. Go to the video tab and select "direct stream copy".
3. go to the audio tab and select "direct stream copy". (probably already selected)
4. go to file tab and select "save as avi". no re-encoding will be done, and it'll take maybe 5 minutes.

Works for me every time.

fvisagie
27th May 2013, 12:35
1. open the mp4 with virtualdub.

Good idea, except VirtualDub does not natively support MP4/AVC nor AAC . Please tell the OP (and me ;)) where to download.

BTW, I tried AviDemux 2.5 with Video:Copy, Audio:Copy & Format:AVI, but both MPC-HC and WMP only display black screen with audio. Turning on indexing changes it to a green screen. ;) A later version might fare better, I don't know.

Cheers,
Francois

filler56789
27th May 2013, 21:48
I am unable to find the tool. :confused:

Probably he meant the avi_tc_package written by tritical:

http://web.missouri.edu/~kes25c/