forum

How to re-encode/edit a video

posted
Total Posts
28
Topic Starter
ziin
I'll make this prettier later. Having trouble keeping it on my user page :(

Editing videos with avidemux:

To remove audio:
Open avidemux
Drag and drop the file into avidemux
If the following shows up because the video is h.264 (h.264 is the best right now):
Press either (no is better unless the program crashes).

Select Audio -> Main Track

Select Audio Source -> None

Make sure that Video and Audio are on "Copy".

If you want to instead re-encode the file, then choose "MPEG-4 AVC" to pick h.264. Note that

mm201 wrote:

h.264 lags single-core machines like crazy and shouldn't be used.
I do not agree with this, as we have a video toggle, and this isn't 2005. If you want to support ancient PCs, then use h.263 or Xvid.

To resize the image, click on "filters" and "MPlayer resize" then input how much you want to resize. Most of the time you should keep this at 800x600 or 853x480 (though I use 800x450 for widescreen).

To actually reduce the filesize of the video, there are a few options, all of which are in the "configure" menu:
The correct way is to use a constant rate factor (usually between 30-36) since single pass encodes are of higher quality. You can also use a 2 pass encode which will set the video size (I suggest ~7 MB) or Average bitrate (I suggest 400-800 kbps).

Avidemux doesn't like saving h.264 flv files, but works fine with avi files. Since osu plays both just fine (and avi is slightly smaller than flv), save the file as an avi.

Press ctrl+S to save the file somewhere, then copy it into your folder.

If avidemux does not open your file correctly, there are alternatives: Mediacoder is a bit more difficult to use, but might work, and can save h.264 flv files. SUPER isn't very good, hard to find, but is another program that might be worthwhile, if you can find the download on the website. Finally, VLC can be used, but that should be avoided at all costs.

The reason I like avidemux is because you can easily edit each frame, and it has a good interface, unlike mediacoder (which has greater compatibility). I've never been able to get virtualdub to work properly.
Ekaru

ziin wrote:

I've never been able to get virtualdub to work properly.
That's what I was trying to use before I used this guide. 15 mb for a 1:30 vid, and the quality was horrible, despite the huge size.

Thanks to this, though, I have a good vid now. Thanks!
Equivalent_old
Some noob/curiosity question:

Will the vids that encoded via this method will having the different offset just like some mp3 software encoder?
Weez
Ok i'm doing everything here but after i save this happens:


no extension, nothing! just that :S
blissfulyoshi
When you save, make sure to type in .avi to the end of your filename, otherwise you will have a file with no specified filetype (like in Weezy's case)
Ekaru

Equivalent wrote:

Some noob/curiosity question:

Will the vids that encoded via this method will having the different offset just like some mp3 software encoder?
If that happens, all you have to do is adjust the video offset. Unlike with mp3s, changing the video offset doesn't require you to change any part of your map, so it's not an issue. Just adjust the video offset until it's in synch with the mp3 - this can be done in the upper-right-hand corner of the Design tab.
Weez

blissfulyoshi wrote:

When you save, make sure to type in .avi to the end of your filename, otherwise you will have a file with no specified filetype (like in Weezy's case)
ok that should be on it :O
Topic Starter
ziin
re-encoding might change the offset, but not usually.

I did have one where I accidentally changed the framerate slightly so that it wasn't in sync with the music anymore (but it wasn't that bad).

If you only re-encode once, the likelihood of anything messing up is low.


And yes, weezy, windows works via file extension. If you don't give it an extension windows won't know which program to use in order to open the file. Osu will open it just fine without an extension IIRC, but you may as well give it .avi.
HakuNoKaemi
I do use Adobe Media encoder ( and save them as h264 flv ) and i actually control how much the file will be big ( i set the Bitrate to make it roughly 11-12 Mb )
Topic Starter
ziin
Constant bitrate is silly, since there are parts of a video which are more complicated, and should have more data in them.

Constant rate factor is the best because h.264 has opimizations for the first pass. A second pass doesn't use these optimations and thus isn't quite the same quality (though it's basically negligible). the only time you should use a 2 pass is when you need a specific filesize. Not to mention it's twice as slow two use a 2 pass.
FoxCat
If I want cut some scene of the video?
Cuz I have a useless intro of 15 seconds in one and I don't know how to cut it.
blissfulyoshi

-Pikachu- wrote:

If I want cut some scene of the video?
Cuz I have a useless intro of 15 seconds in one and I don't know how to cut it.
What you need to do is open up avi demux, press the button on the bottom that has A in it at where you want to start the video, and press the button on the bottom with b at where you want the video to stop. Then follow the rest of the instructions above to get the video that you want.
Cirno
Was it just for me, or Avidemux lacks access to x264 presets and tuning?

If it was the latter....
You would probably want to look into the x264 preset 8 (veryslow). The preset was equivalent to the following commandline:
--b-adapt 2 --bframes 8 --direct auto
--me umh --merange 24 --partitions all
--ref 16 --subme 10 --trellis 2
--rc-lookahead 60
(Since the config copying involved editing the preset XML, I made a Avidemux x264 preset simulating preset 8 for your convenience : http://puu.sh/4POD . If you want to use it in Avidemux, copy/paste it to your plugins\videoEncoder\x264 , then select Configuration:Preset8 in the x264 Configuration window.)

Some might doubt how much difference does this actually make? let's take a look at those two videos

The videos are the first 1000 frames (approx. 41secs) of Nichijou EP19 @ 1280x720. Both were encoded using x264, at a crf of 26.0. That is, the two video files are of the same quality.
As you can see from the image, "testnichijou.mp4", which used preset veryslow, was a whole 10mb (21%) smaller than "testnichijou2.mp4", which was encoded using preset Medium, the default preset of x264 and Avidemux.

Preset veryslow is several (3?) times slower than Medium on my computer, encoding 640x480 videos at ~40fps and 1280x720 videos at ~3fps. But considering most videos used in osu! are about TV Size (~2mins), the extra encoding time should be a well-worth exchange for the reduction in space (or increment in video quality!). imo it worths a mention here.
blissfulyoshi
I guess I need some help. I had a .mp4 with b-frames in it, and when I tried to use to use virtualdub to convert it into a .avi, I would get block artifacts. I am not sure if this is because it is just this .mp4 or it is a general problem (will check at another time), but I was wondering if anyone else encountered a similar problem. (To note: Got around this by first encoding the .mp4 into .avi using ffv1 codec (lossless, or close enough) in SUPER, and then plugging that into avidemux)

Also if anyone wants to improve the quality of their video, http://www.avidemux.org/admWiki/doku.ph ... rial:h.264 provides a fantastic guide if you are willing to read a lot of it.
Sakura
did u split the mp4 into audio and video files separately and converted each of them then put them back together in virtualdub?

iirc avi files need an mp3 file to work which is why i always had to split .mkv files into video/audio and convert each separately because the audio was .ogg
Topic Starter
ziin
avi files work with virtually every audio and video codec. The only one they have trouble with is h.264 due to limited b-frame support, but usually this isn't a problem.

If you want to direct stream copy the video and it's not working in avi, I suggest you convert it to mp4 or mkv, then use a different converter (like mediacoder or super) to stream copy into flv.

when you convert to lossless, it isn't actually lossless. I've noticed these artifacts too.
blissfulyoshi
Does anyone know how to make the video have no audio in avidemux 2.6? Take took away the no audio track in 2.5, so I have been struggling to use it. (2.5 reached final, so I wanted to transition to 2.6 since that is supposedly the current version)
blissfulyoshi
Sorry for double posting, but I want to bump the thread after having it sit here for 2 months.

First off, avidemux 2.6 now has a way to disable audio now, so no one needs to care about my previous post.

Second, my question now is how do you smooth outer edges, because even after optimizing my encoder settings (at least optimized to what I know), the edges are slightly jagged. What is the best way to fix this?
Topic Starter
ziin
I'm downloading 2.6 now, but I think that doom9 may be the better place for this.

What are you doing? Creating video? resizing video? And, uh, what's an outedge? nevermind I figured it out.
blissfulyoshi
Sorry, for the typo, fixed now. I was trying to reencode a .mkv into a .avi with a smaller resolution, but the egdges are turning out blurry. Also no need to use 2.6, since I am still using 2.5 for the most part and 2.6 doesn't seem to offer too many new features.

(Doom9 probably is the better place..., but whatever....)

For those that are interested, here are my current settings for video encoding (This is for anime related stuff, I know 1 or 2 of the settings are bad for rl stuff. Also, this only works with avidemux 2.5 and not 2.6) http://puu.sh/rdYJ . To use them, save the file and move it to your x264 presets, which is usually in a folder like AppData\Roaming\avidemux\x264
Vlerias
my video did'nt have confirmation :?
Vlerias
my video did'nt have confirmation :?
Ghost_Medley
The program is updated. What are the instructions for a 2.6.5 version for removing audio and re-encoding video files?
blissfulyoshi
I am a bit too lazy to check if 2.6.5 has anything different than 2.6.4, but if they are similar, I have most of the instructions on my guide t/96003

Edit: I forgot that I did not include the audio stuff for 2.6. Let me just add that here
1. Go to audio->select track
2. On the new popup, unclick every checkbox next to enabled
3. Press OK, and you have now removed the audio for your video. The rest of the steps are the same.
Mamat
Thank you very much about this help :D
pengomon
Sorry to disturb!
I just have downloaded lastest Avidemux version, Avidemux 2.6.8.
In 2.6.8., It have same problem too... I didn't know how to remove audio in lastest version app.

But, I found this problem in here!

blissfulyoshi wrote:

Edit: I forgot that I did not include the audio stuff for 2.6. Let me just add that here
1. Go to audio->select track
2. On the new popup, unclick every checkbox next to enabled
3. Press OK, and you have now removed the audio for your video. The rest of the steps are the same.
^ Thanks for its suggestions! Now, I knew how to remove audio! :)

Sorry to disturb! Let's mapping!
ThatKatarinaGuy
thanks for the info
Stefan

ThatKatarinaGuy wrote:

thanks for the info
That wasn't a bump worth. In case you need more help look here: t/96003
Please sign in to reply.

New reply