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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 6th January 2005, 16:05   #41  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by Doom9
The fix checkbox for the buffer size is there that you can enforce a certain buffer size. By default, as long as you're in an encoding mode where you can specify a bitrate, the default buffer value is = bitrate. But on that, you'll also find some suggestions in the x264 thread. [/B]
Thank you very much for this explanations, but especially this ones about the buffer size is something I really donīt understand.
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 7th January 2005, 01:25   #42  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
I finally resorted to a batchfile and some process list trickery to get the process priority down
you can control the command shell

http://www.microsoft.com/technet/arc.../shellscr.mspx

Code:
List<string> jobs = new List<string>(new string[] {"notepad", "notepad"});
using (StreamWriter sw = new StreamWriter("jobs.bat")) {
	sw.Write(string.Join(Environment.NewLine, jobs.ToArray()));
}
Process.Start("cmd", "/k start /wait /low /b jobs.bat");
stax76 is offline  
Old 7th January 2005, 08:34   #43  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
you can control the command shell
Does it work for you? I tried using start as the actual Process name, set ShellExecute to true (in the ProcessStartInfo), but that only gave me a quickly opening and closing window. That's why I ended up just calling jobs.bat. My priority solution right now sucks as it only sets the priority to low for the first encode.. it's really a rush job.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline  
Old 7th January 2005, 13:10   #44  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
the process class wrapps the ShellExecuteEx Win32 API function for UseShellExecute and CreateProcess otherwise, if it don't cut it for you, you can get the p/invoke type definitons with reflector in a minute, there is a VisualStudio plugin, where you can right click any function to get it decompiled in any language. It's quite powerful though, instead of using a batch file you should be able to execute each command one by one and you should also be able to redirect the streams if necessary.

Quote:
I tried using start as the actual Process name
you mean you tried using start as filename for StartInfo? That would search for a file named start and throw a Win32Exception on most systems since there is no such file
stax76 is offline  
Old 7th January 2005, 20:50   #45  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by JoeBGermany
Thank you very much for this explanations, but especially this ones about the buffer size is something I really donīt understand.
Is there noone who wants to explain me how to use it???
I really do not understand the feature with buffers, maybe itīs a problem of translation?
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 7th January 2005, 22:16   #46  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Joe, what does it say in the forum rules about not posting the way you did? Oh right, it's a strikeable offense

I presume you do not understand the parameter, not the GUI, but you will find the answer in the very thread I mentioned. http://forum.doom9.org/showthread.ph...516#post590516 , even on the last page so there's no particular effort required. It was even quoted

Quote:
akupenguin once pointed out that rc_buffer_size gives good results when set around 0.5-1 second worth of video bitrate for CBR, or 1-2 seconds worth of bitrate for multi-pass.
Meaning when you are doing your onpass with bitrat 450 kbits/second go for 225 kbits/second to 450 kbits/second, and to 450 kbits/second to 900 kbits/second for multipass encoding with same bitrate.
So, basically what we have here determines how much the bitrate can fluctuate. It's a reservoir of the bits available to encode the next frame.

There's a smart rule I think should be applied if you do not know what a parameter does and cannot find an answer to what it does: either experiment, or leave it at its default not filling in the field will leave it at the default, which means buffer size = video bitrate * 1 second. Since in order to indicate the value of the default buffer, I always copy the value from the bitrate field to the buffer field, as soon as you either select cbr or 2 pass vbr 2nd pass. But, should you chose another value than the default, you may not want your selecting the 2nd pass overwrite your buffer value, that's why you first fill it in, check fixed, and then you can select another encoding mode, and your chosen buffer size will be preserved. Though that I have previously explained, and it's quite apparent if you just play around with the GUI
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline  
Old 8th January 2005, 20:03   #47  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by Doom9
Joe, what does it say in the forum rules about not posting the way you did? Oh right, it's a strikeable offense
Donīt hurt me so much. Itīs all not so easy here! Iīll do my very best next time I promise.

There is one problem lefr for me and I really studied the hole threat here if there is a solution: When I start encoding, there is only the black dos window opening for a very short time when I use your gui. I donīt know why. I installed avs2yuv new, I installed mencoder with mplayer new, always the same problem.
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 8th January 2005, 22:02   #48  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Quote:
When I start encoding, there is only the black dos window opening for a very short time when I use your gui.
Well, I guess the GUI needs some instructions. You have to place both avs2avi.exe and mencoder.exe in the same directory as the GUI itself. Try that and if it doesn't work, start a command prompt (start - run - type "cmd" without the "s and press OK,= then navigate to the directory you have put the gui - for instance c:\temp\x264gui\, and then run jobs.bat. If it also aborts immediately, please post the contents of your dos window here.

Also, you need a very recent mencoder version from celtic-druid, not the version you can download from the mplayer homepage.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline  
Old 8th January 2005, 23:02   #49  |  Link
hellfred
FFmpeg fan
 
Join Date: Dec 2003
Location: Germany
Posts: 427
x264 and official mplayer win32 binaries

Quote:
Originally posted by Doom9

Also, you need a very recent mencoder version from celtic-druid, not the version you can download from the mplayer homepage.
I have provided Sascha Sommer, a mplayer developer that builds the official win32 binaries, with a howto to include libx264 to mplayer/mencoder. So we just need to bug him a little bit ( ) so that he will actually link his builds to it. Which should, by the way, be no problem, as Sascha includes quite every feature available to his binaries....

Hellfred
hellfred is offline  
Old 9th January 2005, 09:54   #50  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by Doom9
Also, you need a very recent mencoder version from celtic-druid, not the version you can download from the mplayer homepage. [/B]
It seems to work so far. But I donīt have the mencoder and mplayer version of celticdruid in the moment, his site is down since two ore more days.
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 9th January 2005, 14:22   #51  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
I was searching for 2 hours for the celticdruid compile. Seems to be impossible to get it somewhere else. Can someone help me please?
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 9th January 2005, 14:30   #52  |  Link
hellfred
FFmpeg fan
 
Join Date: Dec 2003
Location: Germany
Posts: 427
Quote:
Originally posted by JoeBGermany
I was searching for 2 hours for the celticdruid compile. Seems to be impossible to get it somewhere else. Can someone help me please? :thanks:
Sharktooth has mirrowed the side, and the link is standing somewhere else in one of the relevant threads about ffdshow and x264
Hellfred
Sorry, he only mirrowed the ffdshow build, but maybe that helps you, too.
For getting an mplayer binary, in two houres you can build it yourself.
Follow these instructions and check this additional MinGW lib compiling manual, and check the enhanced step 5 including building x264 at the end of the HOWTO:
--------------------------------------------------------------------
Part 1, the HOWTO
--------------------------------------------------------------------
Once finished this should become a howto that will explain the steps necessary to setup the toolchain to compile your own versions of MPlayer on MinGW
similar to the one in the packages found at http://www.mplayerhq.hu/MPlayer/releases/win32-beta

Step 1 Mingw and msys
Download the latest versions of MinGW and msys from
http://www.mingw.org/download.shtml

The versions used in this document are
MinGW-3.1.0-1.exe
MSYS-1.0.10.exe

Then install MinGW and afterwards msys.

Answer
"Do you wish to continue with the post install? [yn ]"
and
"Do you have MinGW installed? [yn ]"
with y and give the path to your mingw dir in the next question. (c:/mingw if you did not alter the path during the mingw setup)

After the installation is finished, open a msys shell (you can find an icon for it on your desktop).

The following steps assume that you download the packages to your msys home dir, for me that is in c:\msys\home\useranme
where username is my windows username.

Step 2 directx headers
Get the directx header package at
http://www.mplayerhq.hu/MPlayer/rele...dx7headers.tgz

As alternative you can also use the modified wine headers reimar posted to the cygwin list.

Extract the headers and move them to your mingw inlucde dir (c:\mingw\include)
To do this use the following commands in your msys shell
tar -xvvzf dx7headers.tgz
mv *.h /mingw/include

Note: In this tutorial I install all packages into the mingw tree, it might probably be better to put all extra libraries and headers
into a seperate directory and pass this directory with the --with-extraincdir and --with-extralibdir switches to configure
Furthermore I'm using static linking to prevent problems caused by different dll versions.
Omitting the --disable-shared from the configure commands will help you to build smaller exes that require the various dlls to be installed.

Step 2 ogg and vorbis
Go to http://www.vorbis.com/download.psp
Select "Unix / Linux" as operating system
Then download the libvorbis and libogg .tar.gz sources
from the Libraries section
Also get the patch http://mplayerhq.hu/MPlayer/releases...g-mingw32.diff

extract the archive:

tar -xvvzf libogg-1.1.tar.gz

change to the dir containing the sources:
cd libogg-1.1

Apply the mingw build patch:
patch -p0 <../libogg-mingw32.diff

Then call configure with your mingw install dir as prefix:

./configure --prefix=/mingw --disable-shared

compile the sources:

make

and install them:

make install

afterwards go back to your msys home dir:

cd

now install libvorbis in a similar way
tar -xvvzf libvorbis-1.0.1.tar.gz
cd libvorbis-1.0.1
./configure --prefix=/mingw --disable-shared
make
make install
cd

Step 3 freetype (for osd font rendering)
First install libiconv from
http://www.gnu.org/software/libiconv/

Get the sources then
tar -xvvzf libiconv-1.9.1.tar.gz
cd libiconv-1.9.1
./configure --prefix=/mingw --disable-shared
make
make install
cd

Then get the latest freetype2 source package from
http://sourceforge.net/project/showf...?group_id=3157

tar -xvvjf freetype-2.1.9.tar.bz2
cd freetype-2.1.9
make
make install
cd

Step 4 zlib, libregif, libpng, libjpeg
zlib is needed for some mov files with compressed headers the others to play/encode png/jpeg/gif files

Sources are available from:
http://www.gzip.org/zlib/
http://armory.nicewarrior.org/projects/libregif/
http://sourceforge.net/project/showf...?group_id=5624
http://www.ijg.org/

tar -xvvzf zlib-1.2.1.tar.gz
cd zlib-1.2.1.tar
./configure --prefix=/mingw
make
make install
cd

tar -xvvzf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
./configure --prefix=/mingw --disable-shared
make
make install
cd

tar -xvvzf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure --prefix=/mingw/ --enable-static
make
cp .libs/libjpeg.a /mingw/lib/
cp jpeglib.h jconfig.h jmorecfg.h c:/mingw/include/
cd

tar -xvvzf libregif-4.1.5.tar.gz
cd libregif-4.1.5
./configure --prefix=/mingw
make
make install
cd

Step 5 lame and xvid

Get the nasm sources from http://sourceforge.net/project/showf...?group_id=6208

tar -xvvzf nasm-0.98.38.tar.gz
cd nasm-0.98.38
./configure --prefix=/mingw
make
make install
cd

Install lame from http://lame.sourceforge.net/download/download.html
tar -xvvzf lame-3.96.1.tar.gz
cd lame-3.96.1
./configure --prefix=/mingw --disable-shared --disable-decoder
make
make install
cd

Now get http://www.xvid.org/downloads.html
tar -xvvzf xvidcore-1.0.3.tar.gz
cd xvidcore-1.0.3/build/generic
./configure --prefix=/mingw --disable-shared
make
make install
mv /mingw/lib/xvidcore.a /mingw/lib/libxvidcore.a

Step 6 live.com rtsp streaming support
Get the sources
http://www.live.com/liveMedia/public/

tar -xvvzf live.2004.12.29.tar.gz (got some errors from tar here but the build worked nevertheless)
cd live
genMakefiles mingw
make


Step 7 MPlayer
For my build I'm using a cvs checkout using cygwin, but cvs snapshots, wincvs or release tarballs should work, too.

In the cygwin shell
cd to your msys home dir

cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer login
cvs -z3 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer co -P main

When asked for a password, just hit enter. A directory named main will be created.

Now checkout ffmpeg
cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg login
cvs -z3 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co -P main

and copy the libavcodec and libavformat dirs from it to the main dir
cp -R ffmpeg/libavcodec/ ffmpeg/libavformat/ main/

All the sources should be there now.

cd main
./configure --enable-runtime-cpudetection --with-codecsdir=codecs --enable-static --with-livelibdir=/home/username/live
(make sure you use the right path for the --with-livelibdir option)
make

If everything went well your first mplayer.exe can be found in the main dir now.


02.01.2005 Sascha Sommer

--------------------------------------------------------------------
Part 2, enhancement for including x264
--------------------------------------------------------------------
Enhanced step 5 including building/installing x264

Step 5 lame, xvid and x264

Get the nasm sources from http://sourceforge.net/project/showf...?group_id=6208

tar -xvvzf nasm-0.98.38.tar.gz
cd nasm-0.98.38
./configure --prefix=/mingw
make
make install
cd

Install lame from http://lame.sourceforge.net/download/download.html
tar -xvvzf lame-3.96.1.tar.gz
cd lame-3.96.1
./configure --prefix=/mingw --disable-shared --disable-decoder
make
make install
cd

Now get http://www.xvid.org/downloads.html
tar -xvvzf xvidcore-1.0.3.tar.gz
cd xvidcore-1.0.3/build/generic
./configure --prefix=c:/mingw --disable-shared
make
make install
mv c:/mingw/lib/xvidcore.a c:/mingw/lib/libxvidcore.a

Get x264 svn checkout from videolan.org. Either use cygwin svn client or download official ziped win32 binaries from http://subversion.tigris.org/servlet...t?folderID=91.
Unpack and copy all files in /bin somewhere into your PATH, e.g. /mingw/bin

svn co svn://svn.videolan.org/x264/trunk x264
cd x264/build/cygwin
make
cp bin/libx264.a /mingw/lib
cd ../../
cp x264.h /mingw/include/

--------------------------------------------------------------------
Suggestions and comments are wellcome, especially if send directly to mplayer cygwin mailing list.

EDIT: Diabled smilies

Last edited by hellfred; 9th January 2005 at 14:50.
hellfred is offline  
Old 9th January 2005, 14:41   #53  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by hellfred
Sharktooth has mirrowed the side, and the link is standing somewhere else in one of the relevant threads about ffdshow and x264
Hellfred
Yes, I know this side. But itīs without the mplayer compile. You can get ffdshow and so on, but no mplayer with mencoder.
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 9th January 2005, 14:49   #54  |  Link
hellfred
FFmpeg fan
 
Join Date: Dec 2003
Location: Germany
Posts: 427
Quote:
Originally posted by JoeBGermany
Yes, I know this side. But itīs without the mplayer compile. You can get ffdshow and so on, but no mplayer with mencoder.
See edited answere above.
Additiona information about compiling mplayer and configuring the source are available in the README file that comes with mplayer source. And i need to disable the smilies.
For just compiling x264, you do not need to install all the libs of the howto, by the way. Just msys,mingw,directxheaders,nasm,x264 and then mplayer including libavcodec should be enough for getting started with x264 encoding.

Hellfred

Last edited by hellfred; 9th January 2005 at 14:51.
hellfred is offline  
Old 9th January 2005, 15:16   #55  |  Link
celtic_druid
Registered User
 
celtic_druid's Avatar
 
Join Date: Oct 2001
Location: Melbourne, Australia
Posts: 2,171
Site should be back up tomorrow (Monday). Might put some new compiles up. Already have a Athlon-64 compile that I did yesterday. Also did a new XviD compile (cartoon mode in zones) and a ffdshow compile.
celtic_druid is offline  
Old 9th January 2005, 18:46   #56  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by hellfred
See edited answere above.
Additiona information about compiling mplayer and configuring the source are available in the README file that comes with mplayer source. And i need to disable the smilies.
For just compiling x264, you do not need to install all the libs of the howto, by the way. Just msys,mingw,directxheaders,nasm,x264 and then mplayer including libavcodec should be enough for getting started with x264 encoding.

Hellfred
Puuuhhh Helfred, what can I say. Itīs so nice from you to explain everything with so much details. But Iīm really not intelligent enough for this Iīhave to wait until tomorrow, when celticdruids side is back. Itīs really a pity that noone has the right mencoder for the gui.
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 9th January 2005, 20:08   #57  |  Link
ivan_alias
H.264 is the Future
 
ivan_alias's Avatar
 
Join Date: Dec 2001
Location: UK
Posts: 210
If this attachment works, then this build of mencoder should work with x264 and Doom9's x264 GUI. It was from Celetic-druids site. Note: only on Athlon CPUs.
ivan_alias is offline  
Old 9th January 2005, 20:35   #58  |  Link
JoeBG
stupid
 
JoeBG's Avatar
 
Join Date: Sep 2004
Location: Cologne
Posts: 638
Quote:
Originally posted by ivan_alias
If this attachment works, then this build of mencoder should work with x264 and Doom9's x264 GUI. It was from Celetic-druids site. Note: only on Athlon CPUs.
No, there is no attachment. Sadly I have a P4.
But many thanks anyway
__________________
cu

Joe
------------------------
freedom is just another word for nothing left to loose
JoeBG is offline  
Old 9th January 2005, 21:59   #59  |  Link
Doom9
clueless n00b
 
Join Date: Oct 2001
Location: somewhere over the rainbow
Posts: 10,579
Here's the latest version. It's now a regular .NET 1.1 program (compiled under 1.1 SP1 but there are no version issues.. I'm using 1.1SP1 binaries under 1.1 at work).

What's new:
.NET 1.1 binary, thus no need to install a beta framework. Sadly, the GUI also looks less sexy
libavcodec MPEG-4 codec support. I tried to pick the codec options that looked useful to me, leaving away the gazillion of confusion options that are exposed in ffdshow for instance. I hope that makes that codec less confusing to use.
I've also temporarily removed the queue mode, it'll be replaced with something a lot better in the near future.
And there's a readme file now.

Version 0.1:
Queing is almost back. Lots of work was done in the background that will enable persistent profiles in the future. For now, you can add jobs to the queue, visualize them (select a job in the list and all the job's settings will be automatically loaded), move jobs up/down. But you can still only encode the job that's currently configured in the GUI.
Resized some input fields so that there's not so much free room.
x264 subpel refinements now come with a number.
Buffer size is now 0 as default for both codecs (means using mencoder standard, not a buffer size of 0 which obviously makes no sense).
The variable storage adds some potential for failure (string to int conversions), so while you can still enter completely senseless values in textboxes that should contain numbers, you'll get an exception and have to close the program if you try to use an alphanumerical bitrate and the likes..

Version 0.11:
Persistent profiles. You can have an arbitrary number of profiles. They are saved upon closing the program and loaded upon startup. And, you can even edit the XML file in a text editor (just don't mess up or the GUI will balk upon trying to load). Profiles include all the parameters you can configure in the GUI.
Snow codec support
various small changes under the hood.

version 0.11 downloaded 464 times before removal.
__________________
For the web's most comprehensive collection of DVD backup guides go to www.doom9.org
Doom9 is offline  
Old 9th January 2005, 22:31   #60  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
nice! it also worked now on my good ol' winme

some small things coming to my mind:
- for the input .avs file there are no " " used for the paths which causes troubles when spaces are used in the path (the output path already uses " ")
- you might want to name mpeg-4, something like mpeg-4 (lavc), as mencoder also offers xvid encoding (actually you also call it "lavc options", but still...). and "x264" something like mpeg-4 avc (x264) or h.264 (x264)
- you might want to add something like "1-", "2-" to the subpixel refinement options, so its clearer for newbies which one is the highest aso...
- the values look somehow moved too close to the left (maybe moving them to the right might look better?)
- maybe something like an automated 2pass would be nice (so that the two passes dont have to be done seperated). like when choosing the 2nd pass the options of the first pass get also added to the cmdl (dunno if thats easily doable tough, the job display you mentioned would be indeed good)
- someone proposed this for x264 too and i think its done that way in nero already: only offer one deblocking option (eg named "strength") for alpha and beta and set both to the same value
- more input options would be nice (eg direct dvd reading, .vob and .avi input), so that newbies can indeed do "one click" dvd transcoding with your tool (still there would be the resizing issue, but well )
__________________
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
bond is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.