View Full Version : x264 Linux
Oline 61
26th January 2006, 01:03
Is there anyway to frameserve from a DVD to x264 in Linux. I don't want to have to save the whole ran yuv stream and then encode (not sure if I have enough space for that).
Manao
26th January 2006, 07:41
You can use mkfifo and pipe the output from mencoder / mplayer / whatever to x264 stdin
KpeX
28th January 2006, 18:59
You can also build mplayer with x264 support and encode directly (mencoder dvd://1 -ovc x264 ....)
moseymosey
31st January 2006, 19:50
You can also build mplayer with x264 support and encode directly (mencoder dvd://1 -ovc x264 ....)
Although I believe this puts the encoded video into an .avi, which is very non-standard. x264 can be built with MP4 support. Combined with MP4Box from gpac, it is very simple to make standards-conforming encodes with x264 directly (using mplayer to pipe the data in).
Oline 61
31st January 2006, 22:54
Thanks for the help everyone. I think I'll try piping mencoder to x264 because I want MP4 output. The problem is i can't compile GPAC on my Linux box for some reason. I get a strange error with GCC.
Manao
31st January 2006, 22:57
What is the error ?
hellfred
2nd February 2006, 18:25
Thanks for the help everyone. I think I'll try piping mencoder to x264 because I want MP4 output. The problem is i can't compile GPAC on my Linux box for some reason. I get a strange error with GCC.
If you have enough space on your hd to store the encoded clip twice, you can encode with mencoder and output raw h264. Then you can mux the raw stream with mp4box. This way, no pipe is needed.
mencoder dvd://1 -ovc x264 ... -nosound -of rawvideo -o clip.h264
Hellfred
Hellworm
2nd February 2006, 19:12
The problem is i can't compile GPAC on my Linux box for some reason. I get a strange error with GCC.
I had also errors compiling GPAC, the last version that worked was 0.3.
Perhaps you should try that version ( I know, that is not a nice solution, but for me it's enough since I only need the mp4 to mux into mkv).
Oline 61
3rd February 2006, 01:43
I compiled 0.3, but whenever I run MP4Box:
MP4Box: error while loading shared libraries: libm4systems.so: cannot open shared object file: No such file or directory
libm4sysems.so is in /usr/local/lib so I don't know why it throws an error at me.
I compiled like
./configure
make
sudo make install
mikeX
3rd February 2006, 13:37
I managed to compiled gpac 0.4rc2, but I did have problems on a amd64 system, which I managed to work around though. Could you give more info about the compilation issue? On the shared library issue, try exporting LD_LIBRARY_PATH=/usr/local/lib. If that fixes your issue, put something like this in your shell's startup file (~/.bashrc for bash): export LD_LIBRARY_PATH=/usr/local/lib Anyway, I started encoding to x264 as well, but I'm having audio synchronization issues when I remux to .mp4 or .mkv. Any hints on that?
Hellworm
3rd February 2006, 17:58
libm4sysems.so is in /usr/local/lib so I don't know why it throws an error at me.
That's an Problem with the symlinks or names of the lib, replacing the symlink with the real lib worked for me.
mikeX
5th February 2006, 16:23
Well it won't be a problem if he sets the right environment variable (LD_LIBRARY_PATH). This way he won't have to change the symlinks every time he installs a library to /usr/local : )
Hellworm
5th February 2006, 22:34
For me the Problem was not the variable but the library. I do have quite some libs in /usr/local/lib/ but the only Problem I ever got was with gpac.
garbii
5th February 2006, 22:42
I have a very stupid question : How to make a 2pass with h264 ?
I use this settings to make encodes :
mencoder -ovc x264 -x264encopts bitrate=275 /mnt/hda3/01.avi -o /home/val/test.avi -oac mp3lame -lameopts mode=3:vbr=3:br=32
Still adding option
:pass1 or :vpass1 does not work ...
I tried it this way
mencoder -ovc x264 -x264encopts bitrate=275:pass1 -oac copy /mnt/hda3/1.avi -o /dev/null
Logicaly this would follow :
mencoder -ovc x264 -x264encopts bitrate=275:pass2 /mnt/hda3/1.avi -o /home/val/test.avi -oac mp3lame -lameopts mode=3:vbr=3:br=32
Emmm ? help ?
mikeX
6th February 2006, 00:49
garbii, have a closer look at mplayer's manpage, the answer is right there and is the following: pass=1, pass=2 or pass=3. Using the last form (instead of pass=2), you can do more than 2 passes (as many as you want, from what I understand). Hellworm, with some googling it appears that setting LD_LIBRARY_PATH is not such a good idea indeed (link1 (http://linuxmafia.com/faq/Admin/ld-lib-path.html), link2 (http://www.visi.com/~barr/ldpath.html)), and it's the software's fault for not making absolute path symlinks, so I take what I said back :P. I have come across this issue however, with some other programs, and I suspect it's the fault of checkinstall, which I sometimes use to make .deb packages instead of running make install.
garbii
6th February 2006, 02:02
thanks for your help ... As i said it was a stupid question ... but somehow I was lost and just didn't retype the command with = ... :(
Well thanx
Oline 61
6th February 2006, 23:29
For me the Problem was not the variable but the library. I do have quite some libs in /usr/local/lib/ but the only Problem I ever got was with gpac.
I copied to /usr/lib and it worked.
But I get an error everytime I try to compile x264 SVN with MP4 output enabled. I think I'll just use Mencoder's built in x264 -> raw h264 -> MP4Box -> then maybe mkvmerge with AC3?
Oline 61
7th February 2006, 01:29
Okay, I've decided how to do it. I'm going to use MPlayer to pipe raw YUV to x264, and encode to raw .264, then mux it with MeGUI in Windows.
Now, does anyone know how to pipe the stuff?
Oline 61
7th February 2006, 01:59
Aha! Here we are. Pipe raw YUV from MPlayer to x264. This script will do it, and resize+IVTC too.
mkfifo encode
mplayer dvd://1 -nosound -vf pullup,softskip,scale=640:480 -fps 24000/1001 -sws 9 -vo yuv4mpeg:file=encode &
x264 -o file.264 encode 640x480 --bitrate 500 --progress
rm encode
Oline 61
7th February 2006, 22:11
And x264 doesn't seem to be able to produce a valid output on my Linux system.... It looks really weird when muxed and played back.
KpeX
8th February 2006, 05:19
And x264 doesn't seem to be able to produce a valid output on my Linux system.... It looks really weird when muxed and played back.Define or explain what you mean by weird. IMO it'd be simpler to just build mplayer with x264 support.
Oline 61
8th February 2006, 21:35
I have decided to go ahead and compile MPlayer with x264 support. I think the problem was the the pipe was not feeding x264 with the correct input (raw YUV). The result was a video where each frame slowly drifted on screen from the right and then off to the left, with severe discoloration also.
Oline 61
9th February 2006, 00:03
Okay, I compiled x264 and Mencoder from scratch (brand new CVS and SVN for x264), and it appears to be working. The problem is I don't know how to specify custom quantization matrices for x264 in mencoder. It's not in the man page for mencoder, although most x264 options are. Anyone know how to do this?
KpeX
9th February 2006, 00:34
Okay, I compiled x264 and Mencoder from scratch (brand new CVS and SVN for x264), and it appears to be working. The problem is I don't know how to specify custom quantization matrices for x264 in mencoder. It's not in the man page for mencoder, although most x264 options are. Anyone know how to do this?
The information is in the CVS version of the man page: cqm=<flat|jvt|<filename>>
Either uses a predefined custom quantization matrix or loads a JM format matrix file.
flat
Use the predefined flat 16 matrix (default).
jvt
Use the predefined JVT matrix.
<filename>
Use the provided JM format matrix file.
NOTE: Windows CMD.EXE users may experience problems with parsing the command line if they attempt to use all the CQM lists. This is due to a command line length limitation. In this case it is recommended the lists be put into a JM format CQM file and loaded as specified above.
cqm4iy=<list> (also see cqm)
Custom 4x4 intra luminance matrix, given as a list of 16 comma separated values in the 1−255 range.
cqm4ic=<list> (also see cqm)
Custom 4x4 intra chrominance matrix, given as a list of 16 comma separated values in the 1−255 range.
cqm4py=<list> (also see cqm)
Custom 4x4 inter luminance matrix, given as a list of 16 comma separated values in the 1−255 range.
cqm4pc=<list> (also see cqm)
Custom 4x4 inter chrominance matrix, given as a list of 16 comma separated values in the 1−255 range.
cqm8iy=<list> (also see cqm)
Custom 8x8 intra luminance matrix, given as a list of 64 comma separated values in the 1−255 range.
cqm8py=<list> (also see cqm)
Custom 8x8 inter luminance matrix, given as a list of 64 comma separated values in the 1−255 range.
Oline 61
9th February 2006, 00:44
Thanks, I was looking at the man page on the mplayer.hu website, which seems in need of an update.
Oline 61
10th February 2006, 22:08
Apparently IVTCing using Mencoder throws the audio sync off. I used this commandline:
#!/bin/bash
mencoder dvd://1 -o /home/andrew/FNL.264 -of rawvideo -ofps 24000/1001 -sws 9 -nosound \
-vf pullup,softskip,scale=640:480 -ovc x264 -x264encopts \
bitrate=2238:pass=1:turbo=2:\
keyint=250:keyint_min=25:frameref=8:mixed_refs:\
deblockalpha=-2:deblockbeta=-1:\
ratetol=3.0:me=3:me_range=16:subq=6:chroma_me:cabac:trellis=1:nofast_pskip:\
bframes=2:b_adapt:b_pyramid:direct_pred=2:weight_b:brdo:bime:\
i4x4:i8x8:b8x8mv:8x8mv:4x4mv:8x8dct:cqm=/opt/my_mplayer/eqm_avc_hr.cfg:\
log=2
rm /home/andrew/FNL.264
mencoder dvd://1 -o /home/andrew/FNL.264 -of rawvideo -ofps 24000/1001 -sws 9 -nosound \
-vf pullup,softskip,scale=640:480 -ovc x264 -x264encopts \
bitrate=2238:pass=2:\
keyint=250:keyint_min=25:frameref=8:mixed_refs:\
deblockalpha=-2:deblockbeta=-1:\
ratetol=3.0:me=3:me_range=16:subq=6:chroma_me:cabac:trellis=1:nofast_pskip:\
bframes=2:b_adapt:b_pyramid:direct_pred=2:weight_b:brdo:bime:\
i4x4:i8x8:b8x8mv:8x8mv:4x4mv:8x8dct:cqm=/opt/my_mplayer/eqm_avc_hr.cfg:\
log=2
mencoder dvd://1 -o /home/andrew/FNL.avi -of avi -ofps 24000/1001 -sws 9 -nosound \
-vf pullup,softskip,scale=640:480 -oac lavc -ovc lavc vcodec=mpeg4,acodec=ac3,vbitrate=2000,abitrate=640
I demux the AC3 from the AVI, then mux the AC3 with the 264 in MKVmerge. The movie loses sync significantly about midway through the movie, although I believe the process is gradual.
Also, it appears the x264 via mencoder must either be missing options, because the quality isn't near as good as x264 commandline. I will be back in a few minutes with comparison shots and info.
Oline 61
11th February 2006, 00:06
Okay, I'm officially about to give up on x264 Linux now. Using it via Mencoder yields crappy quality, and using x264 commandline yields an invalid output.
For x264 commandline I use:
#!/bin/bash
mplayer /home/andrew/VTS_01_1.VOB -vo yuv4mpeg
#!/bin/bash
/opt/my_mplayer/bin/x264 --pass 1 --bitrate 2238 --stats "/home/andrew/.stats" --ref 8 --mixed-refs --no-fast-pskip --bframes 2 --b-pyramid --b-rdo --bime --weightb --filter -3:-3 --subme 6 --trellis 1 --analyse all --8x8dct --ratetol 3.0 --me umh --cqmfile /opt/my_mplayer/eqm_avc_hr.cfg --progress --no-psnr --output "/home/andrew/stream.264" "/home/andrew/stream.yuv" 720x480
rm /home/andrew/stream.264
/opt/my_mplayer/bin/x264 --pass 2 --bitrate 2238 --stats "/home/andrew/.stats" --ref 8 --mixed-refs --no-fast-pskip --bframes 2 --b-pyramid --b-rdo --bime --weightb --filter -3:-3 --subme 6 --trellis 1 --analyse all --8x8dct --ratetol 3.0 --me umh --cqmfile /opt/my_mplayer/eqm_avc_hr.cfg --progress --no-psnr --output "/home/andrew/stream.264" "/home/andrew/stream.yuv" 720x480
Then I get:
http://img152.imageshack.us/img152/3858/file6xj.jpg
I am wondering whether the mplayer output isn't true raw YUV, or if x264 is just borked.
Tonight I plan on checking the sync. The following commandline results in an AVI that is fully in sync. I will try transcoding to AVC/AAC and muxing in MP4. If the source is in sync, then the output should be in sync since there are no fps changes involved, right?
#!/bin/bash
mencoder /home/andrew/VTS_01_1.VOB -o /home/andrew/FNL.avi -ofps 24000/1001 -sws 9 \
-vf pullup,softskip,scale=640:480 -oac copy -ovc lavc -lavcopts vcodec=ljpeg
Hellworm
11th February 2006, 18:14
Back to cli:
It seems like the yuv4mpeg-output of mplayer really isn't working for x264, but there is another method of streaming to x264:
mkfifo stream
mencoder infile -nosound -ovc raw -vf format=i420 -of rawvideo -o encode | x264 -o outfile stream 720x576 --bitrate 500 --progress
rm stream
Oline 61
11th February 2006, 19:30
Thanks Hellworm. I'll give that a shot when I get back into Linux, but right now I have ~3 hours left on an encode in Windows.
That still leaves the problem of out of sync audio when IVTCing with Mencoder. If I IVTC and use -oac copy and -ovc lavc and -of avi I get an in sync AVI, but if I demux the AC3 and the video, encode the video with x264 and then remux in MKV the file gradually grows out of sync.
Oline 61
12th February 2006, 02:41
I created a shell script based on that and it works.... sort of.
#!/bin/bash
mkfifo stream.yuv
/opt/my_mplayer/bin/mencoder /home/andrew/VTS_06_1.VOB -nosound -ovc raw -noskip -sws 9 -vf pullup,softskip,scale=640:480,format=i420 -ofps 24000/1001 -of rawvideo -o stream.yuv | /opt/my_mplayer/bin/x264 --pass 1 --bitrate 2260 --stats "/home/andrew/x264stats" --bframes 2 --b-pyramid --subme 1 --filter -3:-1 --analyse none --ratetol 3.0 --me dia --sar 1:1 --cqmfile "/opt/my_mplayer/eqm_avc_hr.cfg" --progress --no-psnr --output /home/andrew/pass1.264 stream.yuv 640x480
rm stream.yuv
The problem is it stops at frame 840 every time no matter what. The commandline just stop updating, CPU usage drops to 0 and nothing happens at all.
If I split the two commandlines in two and run each separately it works fine, although I can't do the whole movie because the intermediate file would be massive. What could be causing this?
bugmenotwillyou
12th February 2006, 09:47
I am currently using the raw YUV pipe to convert an MPEG2 into MP4 (2-pass x264), and this approach seems to solve the issue of improperly joined MPEG2 files.
Also, I found that audio issues are minimized when the MPEG2 is first demuxed (using mpeg_ps_extract), and the resulting MP3 file is the source for generating the PCM file.
My commands are shown below. Hopefully they can come in handy to someone.
Pass 1 - Mplayer (MPEG) to YUV pipe to Mencoder (x264)
mkfifo $prefix.1.yuv
(mplayer -nosound -cache 8192 -fps 29.970 -vf scale=640:480,harddup \
-vo yuv4mpeg:file=$prefix.1.yuv -noframedrop $prefix.mpeg </dev/null > /dev/null 2>&1) &
mencoder -noskip -ovc x264 -x264encopts pass=1:qcomp=0.75:subq=5:4x4mv:8x8dct:frameref=2:\
bframes=3:b_pyramid:weight_b:log=-1 -ofps 29.97 -vf scale=640:480,harddup \
-passlogfile $prefix.x264.log $prefix.1.yuv -of rawvideo \
-o $prefix.264 2>/dev/null | statfilt
rm -f $prefix.1.yuv
Pass 2 - Mplayer (MPEG) to YUV pipe to Mencoder (x264)
mkfifo $prefix.2.yuv
(mplayer -nosound -cache 8192 -fps 29.970 -vf scale=640:480,harddup \
-vo yuv4mpeg:file=$prefix.2.yuv -noframedrop $prefix.mpeg </dev/null > /dev/null 2>&1) &
mencoder -noskip -ovc x264 -x264encopts pass=2:bitrate=1000:qcomp=0.75:subq=5:\
4x4mv:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b:log=-1 -ofps 29.97 \
-vf scale=640:480,harddup -passlogfile $prefix.x264.log $prefix.2.yuv \
-of rawvideo -o $prefix.264 2>/dev/null | statfilt
rm -f $prefix.2.yuv
Audio extraction and conversion into AAC(x264)
mpeg_ps_extract --audio $prefix.mpeg > /dev/null 2>&1
ffmpeg -v 0 -i $prefix.mp3 -vn $prefix.wav > /dev/null 2>&1
faac --mpeg-vers 4 -q 90 -c 44100 $prefix.wav -o $prefix.aac > /dev/null 2>&1
Muxing x264 and AAC into MP4
MP4Box -add $prefix.264:fps=29.97 -add $prefix.aac $prefix.mp4 > $prefix.mp4box.log
Hellworm
12th February 2006, 12:18
The problem is it stops at frame 840 every time no matter what. The commandline just stop updating, CPU usage drops to 0 and nothing happens at all.
My fault. Replace the "|" in the command with "&" and it should work.
hellfred
12th February 2006, 13:24
Hi Oline 61and the others
There have been a lot of patches to muxing and demuxing (Patch being added and removed) and a new muxer options have been added:
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_mpeg.c,v
Working file: main/libmpdemux/muxer_mpeg.c
head: 1.38
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 38; selected revisions: 2
description:
----------------------------
revision 1.38
date: 2006/02/12 11:04:12; author: nicodvb; state: Exp; lines: +67 -5
experimental film2pal and ntsc2pal soft teleciner
You should update cvs source and try again. Maybe the version you dl'ed and compiled were simply broken. I have not tryed to encode to x264 in a while, but it used to work just fine. Akupenguin, the main developer of x264, is the one maintaining mplayers/mencoders x264 code.
(http://www1.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/libmpcodecs/ve_x264.c?sortby=date)
lorenm=akupenguin=pengvado
(mplayer csv user name - doom9 forum user name - x264 svn user name)
Hellfred
Hellworm
12th February 2006, 17:43
You should update cvs source and try again. Maybe the version you dl'ed and compiled were simply broken.
Indeed. Now its working.
Oline 61
12th February 2006, 18:05
That helps a lot. Now it works. Now my problem is MP4Box. I can't get it working.
The -new option doesn't work, it says -fps option is unknown even though it is specified in the applications own man page.
I can't even get a valid output of any kind.
All I can really get it to do is reprint the help dialog. No error, nothing about why it doesn't work, just the help dialog.
bugmenotwillyou
12th February 2006, 18:21
...MP4Box. The -new option doesn't work, it says -fps option is unknown...
What is your MP4Box version ? MP4Box recognizes the -new and -fps options on my machine. However, MP4Box says that the -fps is ignored for an IsoMedia import, which is what happens with the -add.
$ MP4Box -version
MP4Box - GPAC version 0.4.1-DEV
GPAC Copyright: (c) Jean Le Feuvre 2000-2005
(c) ENST 2005-200X
$ MP4Box -fps 29.99 -add one.mp4 -add two.mp4 -new final.mp4
IsoMedia import - track ID 1 - Video (size 640 x 480)
IsoMedia import - track ID 2 - Audio (SR 44100 - 2 channels)
IsoMedia import - track ID 1 - Video (size 640 x 480)
IsoMedia import - track ID 2 - Audio (SR 44100 - 2 channels)
Saving final.mp4: 0.500 secs Interleaving
$ MP4Box -h import
...snip snip...
-fps FPS: forces frame rate for video and SUB subtitles import
* For raw H263 import, default FPS is 15
* For all other imports, default FPS is 25
-- THIS IS IGNORED FOR IsoMedia IMPORT --
...snip snip...
Oline 61
12th February 2006, 19:01
I was using 0.3 which apparently doesn't work. I have never been able to compile 0.4 because gcc always gives me an error somewhere around the X11out part. Tried gcc-3.4 and gcc-4.0.2 with no luck.
hellfred
12th February 2006, 21:07
I was using 0.3 which apparently doesn't work. I have never been able to compile 0.4 because gcc always gives me an error somewhere around the X11out part. Tried gcc-3.4 and gcc-4.0.2 with no luck.
To build a static version of mp4box under linux, I had to edit the Makfile located at gpac/applications/mp4box/:
LINKFLAGS=-L../../bin/gcc
ifeq ($(CONFIG_WIN32),yes)
EXE=.exe
PROG=MP4Box$(EXE)
#LINKFLAGS+=-lgpac_static -lz $(EXTRALIBS)
LINKFLAGS+=-lgpac
else
EXT=
PROG=MP4Box
#LINKFLAGS+=-lgpac_static $(EXTRALIBS) $(GPAC_SH_FLAGS) -lz
LINKFLAGS+=-lgpac -lz
to
LINKFLAGS=-L../../bin/gcc
ifeq ($(CONFIG_WIN32),yes)
EXE=.exe
PROG=MP4Box$(EXE)
#LINKFLAGS+=-lgpac_static -lz $(EXTRALIBS)
LINKFLAGS+=-lgpac
else
EXT=
PROG=MP4Box
LINKFLAGS+=-lgpac_static $(EXTRALIBS) $(GPAC_SH_FLAGS) -lz
#LINKFLAGS+=-lgpac -lz
Pay attention to which lines are commented out!
This changes were done to the source in gpac-0.4.0-rc2.tar.gz.
As you only need mp4box, and not the rest of the package (e. g. ozmo player) disable any feature related to X11 in the gpac configure script and just build the libs and the apps:
make help
make lib
make apps
Hellfred
hellfred
12th February 2006, 21:18
Back to cli:
It seems like the yuv4mpeg-output of mplayer really isn't working for x264, but there is another method of streaming to x264:
mkfifo stream
mencoder infile -nosound -ovc raw -vf format=i420 -of rawvideo -o encode | x264 -o outfile stream 720x576 --bitrate 500 --progress
rm stream
Just using -vf format=i420 is not enough, you have to add scale to the filter chain to enforce the color conversion.-vf format=i420,scaleSee mplayer manpage:format[=fourcc]
Restricts the colorspace for the next filter without doing any conversion. Use together with the scale filter for a real conversion.
NOTE: For a list of available formats see format=fmt=help.
<fourcc>
format name like rgb15, bgr24, yv12, etc (default: yuy2)
bugmenotwillyou
12th February 2006, 21:24
I was using 0.3 which apparently doesn't work.
The 0.4 version can be found on the list of pre-compiled MP4Box binaries (http://www.tkn.tu-berlin.de/research/evalvid/) (Windows, OSX, and Linux). You might consider getting the ffmpeg and GPAC binaries as well.
I have never been able to compile 0.4 because gcc always gives me an error somewhere around the X11out part.I am using gcc 3.4.5 and I have managed to compile it. It is probably something that is missing or outdated. Can you post the error ? Which distro are you using ?
Oline 61
12th February 2006, 21:52
Those precompiled binaries work great. I think I will attempt to compile my own using hellfred's modifications though. I don't remember the error, but if I see it again I will post it.
Hellworm
13th February 2006, 18:02
Just using -vf format=i420 is not enough, you have to add scale to the filter chain to enforce the color conversion.
Your right, but if the input colorspace is the same (any mpeg video ) then -vf format=i420 just tells mencoder to keep the colorspace, right ?
But anyway, adding scale is propably saver.
Oline 61
13th February 2006, 22:27
I had trouble if I put scale after format=i420. I have been putting it afterwards and it works great.
hellfred
13th February 2006, 23:24
As long as you get what you want it is all right. I tryed to stream video data from mencoder/mplayer to x264 but faild. But as encoding to x264 with mencoder itself works just fine, I gave up on the matter.
For encoding with mencoder using the x264 codec via -ovc x264, I do not spezify any colourspace, just let mencoder handle it itself and mencoder never failed on me up to now.
(After having a look at Loren Merritts small program avs2yuv, especial its latest changelog entry, I think that mplayer -vo yuv4mpeg is the way to go. But the frames stored in the .yuv file beginn to move and deteriorate when encoded with x264 and stored in the avi container)
Hellfred
Hellworm
14th February 2006, 14:33
Did you use the newest cvs mplayer? -vo yuv4mpeg works correct now. I'm currently using that way.
hellfred
14th February 2006, 17:56
Did you use the newest cvs mplayer? -vo yuv4mpeg works correct now. I'm currently using that way.
I have updated mplayer on 12th February 2006. So if there were any fixes after that, this may be the reason.
Hellfred
hellfred
14th February 2006, 20:46
OK, now I have updated mplayer source that automatically updated libavcodec/libavformat/libavutil, but changes to ffmpegs build system break mplayer compilation. So I had to check out ffmpeg source from 2006-02-13 and replace libav* folders in mplayers main folder with those from yesterday's ffmpeg.mplayer BLAME\!_ExtraLog_\(Wizzu\)_\[F7C43A86\].avi -frames 400 -vo yuv4mpeg:file=blame.yuv
mplayer blame.yuv
-> ok
x264 --bitrate 500 --progress -o output.mkv blame.yuv 640x360
-> still broken
mplayer BLAME\!_ExtraLog_\(Wizzu\)_\[F7C43A86\].avi -vf crop=640:352:0:0 -frames 400 -vo yuv4mpeg:file=blame_mod16.yuv
mplayer blame_mod16.yuv
-> ok
x264 --bitrate 500 --progress -o output_mod16.mkv blame_mod16.yuv 640x352
mplayer blame_mod16.yuv
-> still broken
If i produce avis, the same prblems persist.x264 --bitrate 500 --progress -o output_mod16.avi blame_mod16.yuv 640x352
Maybe I have to update and recompile x264 cmd encoding tool!x264
x264 core:44 svn-434
With mencoder I have no problems to get valid output!
Hellfred
Oline 61
15th February 2006, 05:02
I still miss AviSynth when encoding in Linux. I love my AviSynth :(.
Hellworm
15th February 2006, 08:19
You can use avisynth through wine, and with avs2yuv you can directly pipe the output to your linux x264.
Hellfred: Perhaps streaming with mencoder is the better way, because it works ( and has always worked ) and since mencoder is an encoding app its propably works better with x264 when doing an encode than the player (even if the player would work).
I don't like mencoder internal x264 support.
I always prefer external x264 over the mencoder builtin support, because of the quality.
hellfred
15th February 2006, 08:55
Hellfred: Perhaps streaming with mencoder is the better way, because it works ( and has always worked ) and since mencoder is an encoding app its propably works better with x264 when doing an encode than the player (even if the player would work).
Can you give an exact example cmd-line example? For some reasons this did not work for me up to now:mkfifo stream
mplayer BLAME\!_ExtraLog_\(Wizzu\)_\[F7C43A86\].avi -frames 400 -vo yuv4mpeg:file=stream & x264 --bitrate 500 --progress -o outfile.mkv stream 640x360
rm streamI have tryed with avi container and raw h.264 streams too.
I don't like mencoder internal x264 support.
I always prefer external x264 over the mencoder builtin support, because of the quality.
If there is any difference between mplayer->pipe->x264 and mencoder -ovc x264, then this is a bug and the devs would love to know abaut it. In both cases libx264 should be used with the same parameters, if same parameters are given via the command lines of the two encoding processes, and if raw h.264 streams are choosen as output, both .264 files should be bit identical.
Hellfred
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.