View Full Version : First time x264 user question
iMaiden
7th April 2010, 17:45
I am running ubuntu 8.10 and have gotten this far:
x264 --output tester.mp4 test.mp4 480x360
which produces this output:
yuv [info]: 480x360p 0:0 @ 25/1 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2 SSE3 Cache64
x264 [info]: profile High, level 2.1
x264 [info]: frame I:2 Avg QP:33.03 size:114343
x264 [info]: frame P:94 Avg QP:35.00 size:111733
x264 [info]: consecutive B-frames: 100.0% 0.0% 0.0% 0.0%
x264 [info]: mb I I16..4: 16.7% 0.0% 83.3%
x264 [info]: mb P I16..4: 56.0% 15.6% 28.4% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip: 0.0%
x264 [info]: 8x8 transform intra:15.3% inter:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 99.3% 100.0% 100.0% inter: 100.0% 100.0% 100.0%
x264 [info]: i16 v,h,dc,p: 0% 0% 94% 6%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 4% 5% 59% 6% 5% 5% 6% 5% 6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 4% 31% 10% 9% 9% 10% 8% 8%
x264 [info]: Weighted P-Frames: Y:0.0%
x264 [info]: kb/s:22357.56
encoded 96 frames, 10.18 fps, 22358.96 kb/s
Here is my question:
The input file is 3 mins in length the output file is 3 secs. The output just plays snow.
The aspect ratio of the input is also 480x360
Am I missing something simple here? Any assistance is appreciated.
sneaker_ger
7th April 2010, 18:00
There's either something wrong with your file or you've found an error in x264. Test the latest revision and upload your file - if you're lucky some of the x264-devs will take a look at it.
/edit: And try dropping the "480x360".
LoRd_MuldeR
7th April 2010, 18:38
Appending the resolution of the video is only needed for "raw" YUV video and even that only if the YUV data isn't stored in a YUV4MPEG (.y4m) container.
Not sure, but maybe appending the "480x360" caused x264 to misinterpret your MP4 file as "raw" YUV data? As suggested by sneaker_ger, try dropping that part.
x264 can determine the resolution of MP4 files automatically. Just make sure you have a build of x264 with FFM2 support enabled...
Boolsheet
7th April 2010, 18:40
Yep, we need to know your x264 version and what it supports.
Check the version with:
x264 --version
x264 --help
gives you something like:
x264 core:92 r1523 25ca5b0
Syntax: x264 [options] -o outfile infile [widthxheight]
Infile can be raw YUV 4:2:0 (in which case resolution is required),
or YUV4MPEG 4:2:0 (*.y4m),
or Avisynth if compiled with support (yes).
or libav* formats if compiled with lavf support (yes) or ffms support (yes).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC support (yes)
Dark Shikari
7th April 2010, 19:04
Your x264 was compiled without support for any video decoder, so all it's able to do is interpret your (compressed) file as raw video. This is expected behavior.
Recompile your x264 with some input module.
Not sure, but maybe appending the "480x360" caused x264 to misinterpret your MP4 file as "raw" YUV data? As suggested by sneaker_ger, try dropping that part.There's no misinterpreting going on; the file is raw YUV, as x264 sees it, because the version you're using doesn't have support for anything else.
iMaiden
7th April 2010, 21:43
Here is how I compiled:
sudo apt-get install libavcodec-dev yasm libavutil-dev libpostproc-dev libbz2-dev libgpac-dev libxvidcore4-dev
./configure --enable-pthread --enable-avs-input --enable-mp4-output --enable-ffms-input --enable-lavf-input --prefix=/usr --enable-shared
make -j 4
sudo make install
Here is what happens if I do not specify the res:
x264 --output tester.mp4 test.mp4
yuv [error]: rawyuv input requires a resolution.
x264 [error]: could not open input file `test.mp4' via any method!
Here is the version info:
x264 --version
x264 0.92.1523 25ca5b0
built on Apr 7 2010, gcc: 4.4.1
Dark Shikari
7th April 2010, 21:57
What does the output of configure actually say though? And what about x264 --help, where it tells you whether or not you compiled with lavf/ffms input?
iMaiden
7th April 2010, 22:31
./configure --enable-pthread --enable-avs-input --enable-mp4-output --enable-ffms-input --enable-lavf-input --prefix=/usr --enable-shared
Platform: X86_64
System: LINUX
asm: yes
avs input: no
lavf input: no
ffms input: no
mp4 output: yes
pthread: yes
debug: no
gprof: no
PIC: yes
shared: yes
visualize: no
make -j 4
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/mc.o common/mc.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/predict.o common/predict.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/pixel.o common/pixel.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/macroblock.o common/macroblock.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/frame.o common/frame.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/dct.o common/dct.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/cpu.o common/cpu.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/cabac.o common/cabac.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/common.o common/common.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/mdate.o common/mdate.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/rectangle.o common/rectangle.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/set.o common/set.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/quant.o common/quant.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/vlc.o common/vlc.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/analyse.o encoder/analyse.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/me.o encoder/me.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/ratecontrol.o encoder/ratecontrol.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/set.o encoder/set.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/macroblock.o encoder/macroblock.c
encoder/macroblock.c: In function ‘x264_macroblock_probe_skip’:
encoder/macroblock.c:910: warning: ‘mvp[1]’ may be used uninitialized in this function
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/cabac.o encoder/cabac.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/cavlc.o encoder/cavlc.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/encoder.o encoder/encoder.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/lookahead.o encoder/lookahead.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/x86/mc-c.o common/x86/mc-c.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/x86/predict-c.o common/x86/predict-c.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o x264.o x264.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o input/timecode.o input/timecode.c
input/timecode.c: In function ‘parse_tcfile’:
input/timecode.c:191: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:221: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:270: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:279: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o input/yuv.o input/yuv.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o input/y4m.o input/y4m.c
encoder/encoder.c: In function ‘x264_slice_write’:
encoder/encoder.c:1731: warning: ‘bs_bak.p_start’ may be used uninitialized in this function
encoder/encoder.c:1731: warning: ‘bs_bak.p’ may be used uninitialized in this function
encoder/encoder.c:1731: warning: ‘bs_bak.p_end’ may be used uninitialized in this function
encoder/encoder.c:1731: warning: ‘bs_bak.cur_bits’ may be used uninitialized in this function
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o output/raw.o output/raw.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o output/matroska.o output/matroska.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o output/matroska_ebml.o output/matroska_ebml.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o output/flv.o output/flv.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o output/flv_bytestream.o output/flv_bytestream.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o input/thread.o input/thread.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o output/mp4.o output/mp4.c
encoder/analyse.c: In function ‘x264_intra_rd_refine’:
encoder/analyse.c:1026: warning: ‘pels_v[6]’ may be used uninitialized in this function
encoder/analyse.c:1026: warning: ‘pels_v[5]’ may be used uninitialized in this function
encoder/analyse.c:1026: warning: ‘pels_v[4]’ may be used uninitialized in this function
encoder/analyse.c:1026: warning: ‘pels_v[3]’ may be used uninitialized in this function
encoder/analyse.c:1026: warning: ‘pels_v[2]’ may be used uninitialized in this function
gcc -shared -o libx264.so.92 common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/rectangle.o common/set.o common/quant.o common/vlc.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/x86/mc-c.o common/x86/predict-c.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-64.o -Wl,-soname,libx264.so.92 -lm -lpthread -Wl,-Bsymbolic -s
ar rc libx264.a common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/rectangle.o common/set.o common/quant.o common/vlc.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/x86/mc-c.o common/x86/predict-c.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-64.o
ranlib libx264.a
gcc -o x264 x264.o input/timecode.o input/yuv.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o input/thread.o output/mp4.o libx264.a -lm -lpthread -Wl,-Bsymbolic -s -lgpac_static
sudo make install
install -d /usr/bin /usr/include
install -d /usr/lib /usr/lib/pkgconfig
install -m 644 x264.h /usr/include
install -m 644 libx264.a /usr/lib
install -m 644 x264.pc /usr/lib/pkgconfig
install x264 /usr/bin
ranlib /usr/lib/libx264.a
ln -sf libx264.so.92 /usr/lib/libx264.so
install -m 755 libx264.so.92 /usr/lib
x264 --help
x264 core:92 r1523 25ca5b0
Syntax: x264 [options] -o outfile infile [widthxheight]
Infile can be raw YUV 4:2:0 (in which case resolution is required),
or YUV4MPEG 4:2:0 (*.y4m),
or Avisynth if compiled with support (no).
or libav* formats if compiled with lavf support (no) or ffms support (no).
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC support (yes)
Options:
-h, --help List basic options
--longhelp List more options
--fullhelp List all options
Example usage:
Constant quality mode:
x264 --crf 24 -o <output> <input>
Two-pass with a bitrate of 1000kbps:
x264 --pass 1 --bitrate 1000 -o <output> <input>
x264 --pass 2 --bitrate 1000 -o <output> <input>
Lossless:
x264 --crf 0 -o <output> <input>
Maximum PSNR at the cost of speed and visual quality:
x264 --preset placebo --tune psnr -o <output> <input>
Constant bitrate at 1000kbps with a 2 second-buffer:
x264 --vbv-bufsize 2000 --bitrate 1000 -o <output> <input>
Presets:
--profile Force the limits of an H.264 profile [high]
Overrides all settings.
- baseline,main,high
--preset Use a preset to select encoding settings [medium]
Overridden by user settings.
- ultrafast,superfast,veryfast,faster,fast
- medium,slow,slower,veryslow,placebo
--tune Tune the settings for a particular type of source
or situation
Overridden by user settings.
Multiple tunings are separated by commas.
Only one psy tuning can be used at a time.
- psy tunings: film,animation,grain,
stillimage,psnr,ssim
- other tunings: fastdecode,zerolatency
Frame-type options:
-I, --keyint <integer> Maximum GOP size [250]
--tff Enable interlaced mode (top field first)
--bff Enable interlaced mode (bottom field first)
Ratecontrol:
-B, --bitrate <integer> Set bitrate (kbit/s)
--crf <float> Quality-based VBR (0-51, 0=lossless) [23.0]
--vbv-maxrate <integer> Max local bitrate (kbit/s) [0]
--vbv-bufsize <integer> Set size of the VBV buffer (kbit) [0]
-p, --pass <integer> Enable multipass ratecontrol
- 1: First pass, creates stats file
- 2: Last pass, does not overwrite stats file
Input/Output:
-o, --output Specify output file
--sar width:height Specify Sample Aspect Ratio
--fps <float|rational> Specify framerate
--seek <integer> First frame to encode
--frames <integer> Maximum number of frames to encode
--level <string> Specify level (as defined by Annex A)
--quiet Quiet Mode
--pulldown <string> Use soft pulldown to change frame rate
- none, 22, 32, 64, double, triple, euro (requires cfr input)
Dark Shikari
7th April 2010, 22:33
or libav* formats if compiled with lavf support (no) or ffms support (no).
lavf input: no
ffms input: no
As I said.
As an Ubuntu user you might find this guide (http://ubuntuforums.org/showthread.php?t=786095) useful.
Sude
8th April 2010, 14:12
sudo apt-get install libavcodec-dev yasm libavutil-dev libpostproc-dev libbz2-dev libgpac-dev libxvidcore4-dev
You're missing libavformat-dev
iMaiden
8th April 2010, 18:06
Thanks for your assistance:
sneaker_ger, LoRd_MuldeR, Boolsheet and Dark Shikari.
I am able to do a straight encode. Can someone tell me the most effective command line way to append the audio and resize under linux?
TIA
LoRd_MuldeR
8th April 2010, 18:31
Thanks for your assistance:
sneaker_ger, LoRd_MuldeR, Boolsheet and Dark Shikari.
I am able to do a straight encode. Can someone tell me the most effective command line way to append the audio and resize under linux?
TIA
Currently x264 doesn't handle audio at all. Furthermore video filters (like resize) aren't available in x264 yet. However either MEncoder or FFmpeg should be able to do both under Linux.
iMaiden
4th May 2010, 21:53
I was able to complete my task via ffmpeg but feel that I have lost some of the "control" over the compression process and have returned here with another compile error:
sudo apt-get remove ffmpeg x264 libx264-dev
git clone git://git.videolan.org/x264.git
~/x264$ ./configure --enable-pthread --enable-avs-input --enable-mp4-output --enable-ffms-input --enable-lavf-input --prefix=/usr --enable-shared
Platform: X86_64
System: LINUX
asm: yes
avs input: no
lavf input: no
ffms input: no
mp4 output: yes
pthread: yes
debug: no
gprof: no
PIC: yes
shared: yes
visualize: no
You can run 'make' or 'make fprofiled' now.
make -j 4
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/mc.o common/mc.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/predict.o common/predict.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/pixel.o common/pixel.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/macroblock.o common/macroblock.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/frame.o common/frame.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/dct.o common/dct.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/cpu.o common/cpu.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/cabac.o common/cabac.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/common.o common/common.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/mdate.o common/mdate.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/rectangle.o common/rectangle.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/set.o common/set.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/quant.o common/quant.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/deblock.o common/deblock.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/vlc.o common/vlc.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/mvpred.o common/mvpred.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/analyse.o encoder/analyse.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/me.o encoder/me.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/ratecontrol.o encoder/ratecontrol.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/set.o encoder/set.c
encoder/ratecontrol.c: In function ‘rate_estimate_qscale’:
encoder/ratecontrol.c:1909: warning: ‘rce.expected_vbv’ may be used uninitialized in this function
encoder/ratecontrol.c:1909: warning: ‘rce.new_qscale’ may be used uninitialized in this function
encoder/ratecontrol.c:1909: warning: ‘rce.expected_bits’ may be used uninitialized in this function
encoder/ratecontrol.c:1909: warning: ‘rce.misc_bits’ may be used uninitialized in this function
encoder/ratecontrol.c:1909: warning: ‘rce.mv_bits’ may be used uninitialized in this function
encoder/ratecontrol.c:1909: warning: ‘rce.qscale’ may be used uninitialized in this function
encoder/ratecontrol.c:1909: warning: ‘rce.tex_bits’ may be used uninitialized in this function
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/macroblock.o encoder/macroblock.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/cabac.o encoder/cabac.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/cavlc.o encoder/cavlc.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/encoder.o encoder/encoder.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o encoder/lookahead.o encoder/lookahead.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/x86/mc-c.o common/x86/mc-c.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o common/x86/predict-c.o common/x86/predict-c.c
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/cabac-a.o common/x86/cabac-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/dct-a.o common/x86/dct-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/deblock-a.o common/x86/deblock-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/mc-a.o common/x86/mc-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/mc-a2.o common/x86/mc-a2.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/pixel-a.o common/x86/pixel-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/predict-a.o common/x86/predict-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/quant-a.o common/x86/quant-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/sad-a.o common/x86/sad-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/cpu-a.o common/x86/cpu-a.asm
yasm -f elf -m amd64 -DPIC -DARCH_X86_64 -Icommon/x86/ -o common/x86/dct-64.o common/x86/dct-64.asm
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o x264.o x264.c
gcc -O3 -ffast-math -Wall -I. -std=gnu99 -fPIC -s -fomit-frame-pointer -c -o input/timecode.o input/timecode.c
input/timecode.c: In function ‘parse_tcfile’:
input/timecode.c:191: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:224: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
input/timecode.c:273: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
output/mp4.c:130: error: ‘mp4_hnd_t’ has no member named ‘p_file’
output/mp4.c:130: error: ‘mp4_hnd_t’ has no member named ‘i_track’
output/mp4.c:270: warning: implicit declaration of function ‘gf_isom_avc_config_update’
output/mp4.c:270: error: ‘mp4_hnd_t’ has no member named ‘p_file’
output/mp4.c:270: error: ‘mp4_hnd_t’ has no member named ‘i_track’
output/mp4.c:270: error: ‘mp4_hnd_t’ has no member named ‘p_config’
output/mp4.c:274: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:274: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:275: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c: In function ‘write_frame’:
output/mp4.c:285: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:285: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:286: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:288: error: ‘mp4_hnd_t’ has no member named ‘i_numframe’
output/mp4.c:289: error: ‘mp4_hnd_t’ has no member named ‘i_delay_time’
output/mp4.c:291: error: ‘mp4_hnd_t’ has no member named ‘i_delay_time’
output/mp4.c:291: error: ‘mp4_hnd_t’ has no member named ‘i_time_inc’
output/mp4.c:292: error: ‘mp4_hnd_t’ has no member named ‘i_delay_time’
output/mp4.c:292: error: ‘mp4_hnd_t’ has no member named ‘i_time_inc’
output/mp4.c:294: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:295: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:296: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:297: warning: implicit declaration of function ‘gf_isom_add_sample’
output/mp4.c:297: error: ‘mp4_hnd_t’ has no member named ‘p_file’
output/mp4.c:297: error: ‘mp4_hnd_t’ has no member named ‘i_track’
output/mp4.c:297: error: ‘mp4_hnd_t’ has no member named ‘i_descidx’
output/mp4.c:297: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:299: error: ‘mp4_hnd_t’ has no member named ‘p_sample’
output/mp4.c:300: error: ‘mp4_hnd_t’ has no member named ‘i_numframe’
make: *** [output/mp4.o] Error 1
Any Ideas?
RunningSkittle
4th May 2010, 22:41
As Dark_shikari said:
http://ubuntuforums.org/showthread.php?t=786095
Follow this guide...
iMaiden
5th May 2010, 01:05
That is the guide that I was following. The problem with it is that it does not specify MP4 output enabled. I need to compile x264 with mp4 support.
kemuri-_9
5th May 2010, 01:33
sudo apt-get install libgpac-dev
and you can remove it when done, since x264cli uses the static library.
iMaiden
5th May 2010, 18:29
Thank you. That allowed me to compile for mp4 output. But now I am getting this error:
./x264 -o t.mp4 ./test.mov
x264 [error]: could not open input file `./test.mov' via any method!
Any suggestions?
RunningSkittle
5th May 2010, 18:56
did you compile with ffms/lavf support?
iMaiden
5th May 2010, 21:19
Is there a special trick to compile with these options? I config with the following line:
./configure --enable-pthread --enable-avs-input --enable-mp4-output --enable-ffms-input --enable-lavf-input --prefix=/usr --enable-shared
Platform: X86_64
System: LINUX
asm: yes
avs input: no
lavf input: no
ffms input: no
mp4 output: yes
pthread: yes
debug: no
gprof: no
PIC: yes
shared: yes
visualize: no
You can run 'make' or 'make fprofiled' now.
Dark Shikari
5th May 2010, 21:20
You need ffmpeg (and associated libs/dev headers..) installed if you want x264 to be able to decode arbitrary inputs.
iMaiden
6th May 2010, 00:48
When I compiled x264 it listed "ffms input: no" but lavf input as yes. I am able to run the compressor but will this be an issue for me in some way that I do not understand?
Dark Shikari
6th May 2010, 01:10
When I compiled x264 it listed "ffms input: no" but lavf input as yes. I am able to run the compressor but will this be an issue for me in some way that I do not understand?ffms tends to be a bit more reliable at times, and lavf doesn't show the full progress indicator, but otherwise it should work fine.
qyot27
7th May 2010, 00:39
Is there a special trick to compile with these options? I config with the following line:
./configure --enable-pthread --enable-avs-input --enable-mp4-output --enable-ffms-input --enable-lavf-input --prefix=/usr --enable-shared
--enable-pthread, --enable-mp4-output, --enable-ffms-input, and --enable-lavf-input are autodetected if you've already installed them (and pthreads come standard anyway). You don't need to specify them. The reason it won't autodetect ffms2 is because you haven't compiled and installed it.
--enable-avs-input is a Windows-only option, so it's irrelevant on Linux. Unless suddenly that's changed.
The proper steps are below. I've amended them in parts from the guide on Ubuntu Forums (and my own instructions for Karmic I posted on page 23 there - er, page 90...I always forget that I have these types of forums set on 40 posts per page), since I don't need a lot of FFmpeg's extras. But this gives the bulk of what's needed.
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
svn checkout http://ffmpegsource.googlecode.com/svn/trunk/ ffms2
git clone git://git.videolan.org/x264.git
mkdir ffms2_build
cd ffmpeg
./configure --prefix=$HOME/ffms2_build --enable-gpl --enable-version3 --enable-postproc --enable-pthreads --disable-encoders --disable-muxers --disable-debug --disable-network --enable-libfaad --disable-decoder=aac --disable-hwaccels --disable-filters --disable-indevs --disable-outdevs --enable-runtime-cpudetect
make
make install
cd ../ffms2
./configure --prefix=$HOME/ffms2_build PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig
make
make install
cd ../x264
PKG_CONFIG_PATH=$HOME/ffms2_build/lib/pkgconfig ./configure --enable-shared
make
sudo checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | head -c 7`" --backup=no --default
make distclean
cd ../ffms2
make uninstall
make distclean
cd ../ffmpeg
make uninstall
make distclean
As long as you've got the dev files for faad2 and gpac installed, then everything should be properly enabled.
iMaiden
20th May 2010, 21:00
I believe that I have compiled the program correctly. My first test is lossless. I am using this command:
x264 --qp 0 -o output.mp4 test.mov
Which produces a completely white mp4.
There seems to be no errors:
x264 --qp 0 -o output.mp4 test.mov
lavf [info]: 1920x1088p 0:1 @ 24000/1001 fps (vfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Slow
x264 [info]: profile High 4:4:4 Predictive, level 4.0
x264 [info]: frame I:5 Avg QP: 0.00 size:855287
x264 [info]: frame P:987 Avg QP: 0.00 size:816137
x264 [info]: mb I I16..4: 23.0% 6.3% 70.7%
x264 [info]: mb P I16..4: 32.7% 19.1% 45.0% P16..4: 0.6% 1.0% 1.6% 0.0% 0.0% skip: 0.0%
x264 [info]: 8x8 transform intra:19.6% inter:48.1%
x264 [info]: coded y,uvDC,uvAC intra: 99.9% 99.6% 99.6% inter: 100.0% 99.9% 99.9%
x264 [info]: i16 v,h,dc,p: 51% 49% 0% 0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 49% 49% 0% 0% 0% 0% 0% 0% 0%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 49% 39% 2% 1% 3% 2% 2% 1% 1%
x264 [info]: i8c dc,h,v,p: 0% 87% 12% 0%
x264 [info]: Weighted P-Frames: Y:0.0%
x264 [info]: ref P L0: 56.8% 22.8% 12.2% 8.2%
x264 [info]: kb/s:156579.66
encoded 992 frames, 0.65 fps, 156579.76 kb/s
Any suggestions?
Dark Shikari
20th May 2010, 21:16
How are you viewing the mp4?
iMaiden
20th May 2010, 21:55
Quicktime. I tried to open it with another player and it worked. Can you tell me why the quicktime player would have difficulty?
Dark Shikari
20th May 2010, 22:04
Quicktime. I tried to open it with another player and it worked. Can you tell me why the quicktime player would have difficulty?Quicktime doesn't support lossless H.264.
iMaiden
21st May 2010, 00:21
I have switched viewers and now I am looking for tools to analyze what x264 is actually doing. I have found h264Visa which seems pretty good. Does anybody know other tools? I am open to any operating system but prefer linux.
Dark Shikari
21st May 2010, 00:45
I have switched viewers and now I am looking for tools to analyze what x264 is actually doing. I have found h264Visa which seems pretty good. Does anybody know other tools? I am open to any operating system but prefer linux.elecard streameye
(also doesn't support lossless fyi)
iMaiden
25th May 2010, 01:56
I need to add multiple watermarks on the same encoded output. e.g. (editor, DP, sound) Does anybody know the best way to achieve this?
J_Darnley
25th May 2010, 01:58
avisynth would be the easiest
iMaiden
25th May 2010, 04:57
Is it even possible to watermark after the encode?
poisondeathray
25th May 2010, 05:50
Is it even possible to watermark after the encode?
No; unless you do something like soft sub, but I doubt that's what you want
iMaiden
25th May 2010, 13:14
Now that I can actually encode my test footage I would like to actually encode my source which is a dpx sequence. I am having a difficult time finding information on importing from anything other than tiff and want a clean work flow. Am I missing something easy here?
kieranrk
25th May 2010, 13:56
ffmpeg has a dpx decoder.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.