View Full Version : Want to try mpeg2enc based encoder ?
mean
5th September 2004, 16:18
Hi,
I have now a workish version of avidemux2 for win32
Beside the lavcodec and xvid based codecs, there is an encoder based on mpeg2enc also available inside.
You might want to try it. It can create VCD, SVCD and DVD
The XVCD and DVD(ffmpeg) are libavcodec mpeg1/2 based encoder.
It can also create mpeg-PS mpeg stream suitable for DVD authoring, but there is a nice overhead in size, you will get smaller stream by saving es and muxing them with mplex or whatever.
Some caveats, READ THEM please:
- 1st thing is go to misc->preferences and select win32 as audio device, else no sound on playback
- mpeg2enc is slow but delivers good quality encoding, and 100% guaranteed SVCD/DVD compliant streams. In dual pass, if your average bitrate is too close to the max bitrate you 'll get an undershot in size but (again) the stream will be 100% compliant.
- DVD(ffmpeg) comes in two flavor: the original (with only some tiny patches of mine such as 3:2 pulldown ,better bitrate enforcement in 2 pass etc) and using a modified Xvid bitrate rate control. The latter reuse the predictor formula from Peter Cheat (which is good).
- it is a self sufficient application (like vlc or mplayer). It has its own codecs, reader, demuxer etc and does not use the ones in windows. So don't be surprised it does not read your avs script
- it reads all avi, ogm, mpeg1, mpeg2, nuv and writes avi, ogm and mpeg1/mpeg2
- sometime you might think it is stuck, but there is probably a small pop up window hidden below another window
here is the link:
http://fixounet.free.fr/avidemux/win32
It is work in progress, dont flame it too much ;)
Source of everything is available, license is GPL.
The binary has been build with mingw (it is originally a *nix proggy)
As a side note, You might be interested in playing with libavcodec snow codec, which is very interesting, albeit too slow to be used.
It is wavelet based and gives huge compression ratio.
Feedback very welcome.
There is a bit of doc here : http://avidemux.berlios.de/doc/en
Amnon82
5th September 2004, 16:42
THX for a new encoder ...
I'll give it a try.
dragongodz
6th September 2004, 11:49
actually i already suggested to peter to look at mpeg2enc rate control as it may give him some ideas to improve FFMpeg rate control. :)
Peter Cheat
6th September 2004, 23:40
@dragongodz
Checking out the ratecontrol in this right now. This should be good.
@mean
Will try out how this encodes and give you some feedback later. Looks very promising.
Peter Cheat
8th September 2004, 10:38
The program seems to be well set out, and is easy to use but the results are not very impressive at low bitrates. It is ok at high bitrates. It does stay below the max bitrate (DVD, SVCD tested), but a LONG way below according to BV. The picture also pulses.
The rate control is MB based, so it doesn't really help me there. mpeg2enc seems to have been abandoned, compared to ffmpeg, the only advantage is that quantisation is logarithmic, rate control is MB based and bitrate limits are not exceeded. Thats if you consider those advantages.
mean
8th September 2004, 11:46
Did you use 2 pass ?
It is still rather experimental and not part of the original mpeg2enc
If you want to check how the mpeg2enc ratecontrol behaves on its own, better to use CQ or CBR.
Peter Cheat
8th September 2004, 23:31
I did a two-pass encode. I didn't try to do a single pass using constant quant or CBR, as I am not interested in this aspect for the moment. I will try it though.
mean
15th November 2004, 19:53
Same one with xvid 1.1cvs ratecontrol used for mpeg2enc.
It now can make the difference between P & B frames
Testing so far with a SVCD target shows a great quality improvement
and very good overall quality.
It is still a bit slow though.
Next stop: use lavcodec + vbv model of xvid 1.1 cvs
For those who want to give it a ride: http://fixounet.free.fr/avidemux/win32/avidemux2_11_11cvs.zip
If you don't have the original, grab it from
avidemux.berlios.de and just overwrite the exe with the one supplied in the above link
Feedback welcome.
fabrice
15th November 2004, 21:57
Hi,
Is there a way to use avisynth scripts, without makeavis?
Thanks,
Fabrice
mean
15th November 2004, 22:01
No, it is not possible ATM
It is a cross platform application and avisynth is windows only ATM.
It could be added as a windows only feature or when avisynth 3 is ready to run on linux (or any x86 unices), the latter being the most desirable.
On the other hand you have some of avisynth and mplayer best filters already built-in. Among them, a large part of Donal Graft *NICE* filters.
fabrice
15th November 2004, 22:11
Well, even with makeavis, I'm not able to read avisynth file. As I'm using a motion-adaptive script, I'd like to use it, but I see it's not possible...
Thanks.
Fabrice
burnman99
24th November 2004, 19:05
Hey mean, is there a way you can add a levels or curves filter to this? That would be Awesome!
Thanks!
Rog
mean
9th December 2004, 20:54
For those (is plural needed ?) interested, updated version with ability to write VCD/SVCD/DVD Program stream (i.e. with audio) with libavformat help.
http://developer.berlios.de/project/showfiles.php?group_id=1402
2pass has been improved for SVCD/DVD and is based on xvid4 cvs.
Still very slow compared to other, but gets 100% compliant video streams.
--edit : VCD obviously does not need 2 passes.
dragongodz
10th December 2004, 01:05
For those (is plural needed ?) interested
OUCH. i am interested mate, dont get dejected/bitter. :)
mean
4th January 2005, 20:25
Version bumped to 2.0.34 (final).
- Small ui changes (especially crop)
- xvid ratecontrol for lavcodec changed a bit,
- lavcodec based mpeg can also output to mpeg-ps.
- Pts/dts fix for mpeg-ps output (both mpeg2enc & lavcodec)
- libtoolame reactivated & version resynced with upstream (unofficial version)
http://developer.berlios.de/project/showfiles.php?group_id=1402
Feedback welcome, as usual.
dragongodz
5th January 2005, 13:21
nice to hear from you mean. i will have to try this new version out some rime soon(just need to find the time as usual) and check out how the xvid rate control goes.
video_magic
24th January 2005, 20:08
I Hope it's okay to 'bump' this :) This seems like a very good solution, I have used it to encode to Mpeg-2 for DVD with very good results on a test clip. Great job mean, thanks.
There is just one issue which I have a problem with which prevents me from using it fully though. I use Windows XP and have ntfs file system. My source video is a very large HuffYuv encoded avi, this is a losslessly captured compressed 35 GB video with wave audio. Although my test clips (1 - 2 minutes) all loads fine as I mention and encodes very very nicely, I can't get the whole big file to be accepted, neither by itself nor if I try and load it as an avs (Avisynth script) with 'OpenDMLSource'.
It always says in an alert box "problem opening that file"
I guess this is because of the size of the file, so I was wondering if there was any way to maybe add support for AVS or to let your program accept big AVI files to be encoded?
But other than that this is a fine program which will be great for processing smaller videos, thanks very much
mean
25th January 2005, 08:07
Normally, openDML files are accepted.
Even plain avi file > 2 Gb
It might be a problem with windows API for large file which is different from the posix one. I'm 99% sure it is ok on linux, i will check on win32.
BTW, there is a beta here: http://fixounet.free.fr/avidemux/win32
that uses libmplex as output muxer for VCD/SVCD/DVD
Lavformat based one still has issues apparently.
video_magic
25th January 2005, 13:28
Thanks mean :)
I tried the new beta and the results looked very good! (mpeg2)
I also thought I would post the info on the full big clip:
Here is the stdout.txt on a session where I try and open it:
*******************
Avidemux 2, v 2.0.37cvs
*******************
http://fixounet.free.fr/avidemux
Code : Mean & JSC
GFX : Nestor Di , nestordi@augcyl.org
Testing : Jakub Misak
FreeBsd : Anish Mistry, amistry@am-productions.biz
MMX activated.
Registering Encoders
*********************
Mjpeg encoder registred
Xvid-4 encoder registred
FFMPEG encoder registred
3 encoder registered
Initializing global xvid 4
xvid build:xvid-1.0.3
xvid thread:0
xvid SIMD supported:(c7)
MMX
MMXEXT
SSE
Checking cpu capabilities
Cpu has MMX
Cpu has MMXEXT
Cpu has SSE
End of cpu capabilities check
Found 15 video encoder
Found 7 audio encoder
Initializing postproc
Deleting post proc
updating post proc
Enabled type:3 strength:3
Registering Filters
*********************
Preferences found and loaded
Using real audio device
Creating SDL Audio device
**********OBSOLETE*********
Codec FFmpeg4 found
Global SDL init...
46464952 -> 46464952
Riff file detected...
AVI file detected...
** opening OpenDML files **FAIL
Attempt to open D:\capvid\matwed3.avi failed!
Deleting post proc
Images stat:___________Max memory consumed (MB) : 0
Current memory consumed (MB) : 0
Max image used : 0
Cur image used : 0
Global mem stat
Memory consumed :236 (MB)
Goodbye...
attached I hope is a pic of the information from virtualdub 1.62 of the full video. I am able to open the full video in virtualdub and cut bits of it and can play the video in movie players although this is very slow and 'jerky' because of the data rate.
EDIT: it didn't attatch so here is a pic link
http://www.geocities.com/amazed_leaflet/matwedvidinf.gif
mean
27th January 2005, 08:15
that version
http://fixounet.free.fr/avidemux/win32/avidemux2.exe
has been compiled with large file support.
Should work better with large openDML file
Not tested much as i don't have big disk on my laptop and everything else is running linux.
Hope that fixes the problem with large files.
(this is an update to the cvs in the same directory)
video_magic
27th January 2005, 13:10
Thanks very much for looking into that mean, I am downloading this update and will try it as soon as I can, it's appreciated
video_magic
28th January 2005, 14:34
I have been able to try it now, thanks mean.
It did work in that it now opened the file. But it has just big areas of colour instead of my video picture. It will also not play the file, but I can seek through it frame by frame and all the frames just have the basic colour areas instead of a real picture.
I have shown my video information and taken a screen shot which I uploaded here
http://www.geocities.com/amazed_leaflet/avidcolours.gif
Here is stdout.txt which I hope might be helpful
--------------------------------------------
*******************
Avidemux 2, v 2.0.37cvs
*******************
http://fixounet.free.fr/avidemux
Code : Mean & JSC
GFX : Nestor Di , nestordi@augcyl.org
Testing : Jakub Misak
FreeBsd : Anish Mistry, amistry@am-productions.biz
MMX activated.
Registering Encoders
*********************
Mjpeg encoder registred
Xvid-4 encoder registred
FFMPEG encoder registred
3 encoder registered
Initializing global xvid 4
xvid build:xvid-1.0.3
xvid thread:0
xvid SIMD supported:(c7)
MMX
MMXEXT
SSE
Checking cpu capabilities
Cpu has MMX
Cpu has MMXEXT
Cpu has SSE
End of cpu capabilities check
Found 15 video encoder
Found 7 audio encoder
Initializing postproc
Deleting post proc
updating post proc
Enabled type:3 strength:3
Registering Filters
*********************
Preferences found and loaded
Using real audio device
Creating SDL Audio device
**********OBSOLETE*********
Codec FFmpeg4 found
Global SDL init...
46464952 -> 46464952
Riff file detected...
AVI file detected...
** opening OpenDML files **
Main avi header :
Indx found
Indx found
Video track is 0
Track 0/2 :
vids (73646976)
Track 1/2 is audio
One audio track found
Taking audio track : 0 1
dwStreams: :2
dwMicroSecPerFrame: :40000
dwMaxBytesPerSec: :9683376
dwPaddingGranularity: :512
dwFlags: :2048
dwTotalFrames: :98107
dwInitialFrames: :0
dwWidth: :768
dwHeight: :576
video stream attached:
______________________
Extra Data : 156
0000 : ....B$%&Gˆé..... 00 10 00 00 42 24 25 26 47 88 e9 0a 0c 0b 12 0c
0010 : .......Ð......./ 15 0d 15 0e 11 0f 0d d0 11 08 10 08 0f 0d 2e 2f
0020 : ..........éÈG&%$ 0e 0c 0d 11 0c 16 0b 11 0a 0c e9 c8 47 26 25 24
0030 : #B$%&'()*K,MNOPQ 23 42 24 25 26 27 28 29 2a 4b 2c 4d 4e 4f 50 51
0040 : rS4•VW¹:Y.ž9z9Z9 72 53 34 95 56 57 b9 3a 59 1a 9e 39 7a 39 5a 39
0050 : W67–56•tsrQp¯N-, 57 36 37 96 35 36 95 74 73 72 51 70 af 4e 2d 2c
0060 : +J('&%$"B$%G(IJK 2b 4a 28 27 26 25 24 22 42 24 25 47 28 49 4a 4b
0070 : LMNOPq²1°QR457.® 4c 4d 4e 4f 50 71 b2 31 b0 51 52 34 35 37 1a ae
0080 : yZ898wV5434310/. 79 5a 38 39 38 77 56 35 34 33 34 33 31 30 2f 2e
0090 : MLKJI('&%$". 4d 4c 4b 4a 49 28 27 26 25 24 22 00
fccType :vids (73646976)
fccHandler :HFYU (55594648)
dwFlags: :0
dwInitialFrames: :0
dwRate: :10000000
dwStart: :6
dwSampleSize: :0
dwScale: :400000
dwLength: :98120
dwQuality: :0
dwSampleSize: :0
biSize: :196
biWidth: :768
biHeight: :576
biBitCount: :24
biCompression: :1431914056
HFYU (55594648)
biSizeImage: :884736
biXPelsPerMeter: :0
biYPelsPerMeter: :0
biClrUsed: :0
audio stream attached:
______________________
fccType :auds (73647561)
fccHandler : (00000000)
fccHandler :0x0
dwFlags: :0
dwInitialFrames: :0
dwRate: :64000
dwScale: :2
dwStart: :735
dwLength: :125584000
dwSuggestedBufferSize: :16888
dwQuality: :0
dwSampleSize: :2
encoding: :1
channels: :2
frequency: :32000
byterate: :64000
blockalign: :2
bitspersample: :8 Extra Data : 0
Size mismatch, not type 1 avi
Building odml video track
Trying ODML super index..
Master index of 00db (62643030) found
SubType : 0
We have 25 indeces
Found a grand total of 98120 frames
ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)ix00 (30307869)Building odml audio track
Trying ODML super index..
Master index of 01wb (62773130) found
SubType : 0
We have 9 indeces
Found a grand total of 15698 frames
ix01 (31307869)ix01 (31307869)ix01 (31307869)ix01 (31307869)ix01 (31307869)ix01 (31307869)ix01 (31307869)ix01 (31307869)ix01 (31307869)
8 BIts pseudo codec unsigned
Audio streamer initialized
Total audio length : 254099956
OpenDML file successfully read..
Deleting post proc
Initializing postproc
Deleting post proc
updating post proc
Enabled type:3 strength:3
Audio : 3970.311813 video : 3924.800000
Decoder FCC: HFYU (55594648)FFMpeg build : 4737
Decoder init: FFMpeg huffy_uv video decoder initialized!
no B- frame with that codec
Editor :Audio streamer initialized
8 BIts pseudo codec unsigned
** conf updated **
FF base destroyed
Deleting post proc
Images stat:___________Max memory consumed (MB) : 7776
Current memory consumed (MB) : 648
Max image used : 12
Cur image used : 1
Global mem stat
Memory consumed :2828 (MB)
Goodbye...
--------------------------------
mean
29th January 2005, 18:10
It is a bug with PCM audio apparently
Looking into it.
mean
30th January 2005, 16:31
Could you try with
http://fixounet.free.Fr/avidemux/win32
The 30_jan version ?
I fixed a bug in the openDML code that was windows specific and it may be the problem here.
Thanks
video_magic
30th January 2005, 20:29
Hey mean! :) This seems so far to have fixed the problem of loading the big full clip. I am able to frame-by-frame through it and play (preview) it.
I have run into a small problem so far with loading 'mplayer resize' filter on it though. My clip is 768x576 and so I need to resize to 720x576, but when I choose VFILTER - ADD - and then choose the filter and try to close I get this:
http://www.geocities.com/amazed_leaflet/mpleyerresizeerror.gif and I have to crash out.
However :) I can get round this by choosing VFILTER - DVD RES which then appears to load the same filter (MPL resize 768x576 --> 720x576 (BILINEAR) ) anyway, and I can close and it doesn't crash! :)
I am now beginning the encode and will let you know how it turns out! I have chosen video only with output format Mpeg Video which should I think give me a m2v stream which I can then prepare for DVD (is that right?) I am using 2 pass with a bitrate of max 7200 and target size of 2800mb (it's a 1 hour 5 minute video).
Thankyou very much for your work on this mean :) It's all looking very positive I will report how the encode turns out.
mean
1st February 2005, 08:28
Yes save mpeg video will give you a .m2v file
Using mpeg a+v should/will generate a good DVD file as in that version
libmplex is used to create the file
What was the result ?
video_magic
1st February 2005, 18:14
Hello mean. It has worked almost fine the encoding has worked! :) :) I used settings DVD (not the one with lavc), 2 pass with target of 2800mbs. It finished encoding and I got my m2v file several hours ago. Sorry for a bit of delay but I took a lot of time to get it all into an DVD ISO as I had some PC issues! :) I have tried playing it just now loading the image with daemontools virtual drive and it works and plays :cool:
It is quite a high bitrate as the video lasts an hour and 5 minutes and the m2v size is 2.63gb, and the picture quality is pretty good but it looks very 'soft' as though some smoothing has taken place; also when pausing at different frames - especially on dark colours like some peoples clothes, I can see some speckles of bright colours which aren't present on the source video (huffyuv). I would describe it as similar flickering specks to what you can get on some webcam pictures. When the video is playing I am concious of the difference. In earlier versions of Avidemux when I had encoded the small test clips I did not notice this I don't think. But still it is a good result and thankyou very much for sorting things out, it's a great program! :)
mean
1st February 2005, 19:51
If it is a bit soft, change the resizer to bicubic
Default is bilinear which soften /blur the image a bit
For the defect not present in original file : i don't know
Maybe a bug.
video_magic
1st February 2005, 22:12
Well I think I have sorted out the cause of a couple of problem. I have found out that some of my errors were down to a recent build of FFDshow :o
I just uninstalled it...... I will play around a bit more with the settings and see what happens....
I am not sure about which is supposed to be better - bilinear or bicubic. I have read some discussions to try and find out and there are differences of opinion. See I am not keen on 'sharpening' or 'softening' the image, or doing any processing at all other than resizing for DVD! :)
I want to try and keep the image as close as possible to the original and I guess I thought to do this by throwing high bitrate at the encoder so far, I will try bicubic :p
Which decoder of the source (huffyuv) is used - would this be whatever is installed on my Windows? I have the proper HuffYuv and I also had FFDshow which was also set to decode HuffYuv (so I don't know which would have been used), or is there some sort of built in Decoder for AVI files within AviDemux?
I was just wondering so I can know where I might look to find out how to improve the picture.
Thanks mean, I will try suggestions and am happy to give feedback for your project
mean
2nd February 2005, 08:16
Avidemux being platform independant, includes all the codec it uses
and about none of the system
It is a weakness, i.e. don't use the windows codec, but a strength also as the behaviour is consistent among all platforms
And *nix does not have yet a standardized codecs api such as VFW/Directsow, albeit gstreamer might be it one day
You can check visually the result with the preview window to seek the effect of the resizer.
You might also want to try some deinterlacing/denoising filters to improve the final encoding.
Noise are hard to cope with from the encoder point of view
MplayerHQdenoise3d is a very good denoiser.
Abond
2nd February 2005, 15:44
I have had the same problem with opening big files, but my source are mpeg2 captures (PVR). Now the 2.0.36 avidemux2.exe opens the program nicely, but if I overwrite it with 30-jan .exe and try to open it reports missing pthreadGC1.dll... What to do?:)
mean
2nd February 2005, 17:47
The pthread is in http://fixounet.free.fr/avidemux/win32/avidemux_cvs_23_jan.zip (7 MB)
or wait a few hours, i'll upload just the dll
mean
2nd February 2005, 20:12
Dll uploaded
Abond
7th February 2005, 14:44
It works now! Thank you!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.