Log in

View Full Version : x264 = Unplayable videos!?


DoomNlNE
22nd December 2012, 16:42
Hi,

I capture a game as my video source; using lossless CamStudio codec. This file plays with any program.

I want to compress it using x264 because CamStudio is a huge file.
I use the latest x264.exe (8 bit) from the official website.
I encode like this on Windows Server 2008 R2:
x264 --preset placebo --crf 0 -o in.avi out.avi

Here is the resulting video file (30 MB):
http://rapidshare.com/files/1823364869/nibelheim.avi

It is unplayable on any of my machines. I have tried VLC, MPC, MPC-HC, WMP etc. I also have ffdshow, haal splitter, etc.

ANY ideas on how to play this file?

Selur
22nd December 2012, 16:47
x264 doesn't support .avi output,..
Outfile type is selected by filename:
.264 -> Raw bytestream
.mkv -> Matroska
.flv -> Flash Video
.mp4 -> MP4 if compiled with GPAC support (yes)source: x264 --fullhelp

ANY ideas on how to play this file?
Looking at it with MediaInfo:

General
Complete name : d:\nibelheim.avi
Format : AVC
Format/Info : Advanced Video Codec
File size : 29.4 MiB

Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:4:4 Predictive@L2.2
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Width : 320 pixels
Height : 240 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 129 r2230 1cffe9f
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / an
alyse=0x3:0x133 / me=esa / subme=9 / psy=0 / mixed_ref=1 / me_range=24 / chroma_
me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_
offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate
=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=
2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=cqp / mbtree
=0 / qp=0
reveals that you did not create an .avi file but a raw .264 file.
-> rename the file (to a .264 extension, some of the tools might now be able to playback the file) and mux it with mp4box (Yamb) or another program to mp4

LoRd_MuldeR
22nd December 2012, 16:55
Alternatively you can save to .mkv or .mp4 right away, which will give you a Matroska or MP4 file that any half-way useful player will handle. H.264 in AVI generally is not a very good idea, although avc2avi (http://www.videohelp.com/tools/avc2avi) could do it, if you insist.

Furthermore you should consider that "--crf 0" triggers lossless mode! This needs a H.264 decoder with "High 4:4:4" Profile support. Software players should handle this fine nowadays (at least if you use an up-to-date version), but Hardware support for anything above plain "High" Profile is pretty much non-existing (in consumer hardware). AFAIK, some CloseSource video editors that use their own proprietray software decoders also have problems...

nixo
22nd December 2012, 21:21
If you absolutely need .avi output, get the kMod build from Komisar:
http://komisar.gin.by

--
Nikolaj

DoomNlNE
23rd December 2012, 16:47
Thanks!

But I've been using x264 with avi for years. How come I've only suddenly experienced this issue? :-s

It might be because I've been uploading the resulting file to youtube...

Bleck
23rd December 2012, 21:27
I think you need a hack to mux 264 with avi container (x264vfw ?).

Selur
23rd December 2012, 21:37
It might be because I've been uploading the resulting file to youtube...
yup youtube doesn't care about the extension, it looks at the headers ;)

I think you need a hack to mux 264 with avi container (x264vfw ?).
same as muxing MPEG-4 ASP (e.g. Xvid) into avi, nothing new, nothing problematic.