View Full Version : x264 CLI RAW encode
nubianxp
25th May 2007, 07:58
greetings! this is my first time encoding a DivX video to x264 using the CLI version. The following is what I did:
1. created the AVISynth script
AVISource("divxvideo.avi")
BicubicResize(512,384)
ConvertToYV12
2. encoded the .avs into RAW using x264 CLI:
x264 -B 500 -o video.264 divxvideo.avs
3. used the same AVS script to encode the audio using FAAC
the problem arised when I started muxing the RAW h264 video and AAC audio
to MKV using mkv-merge gui, it finished successfully but when I try to play the MKV file only the audio is played and not the video. I tried Yamb as well, but it gives a "file is truncated" error. anything I did wrong? should i used MKV or MP4 instead of RAW when using x264 CLI?
x264 version is 0.54.638
AviSynth 2.57
MKVMergeGUI v2.0.0 ("After The Rain Has Fallen")
Yamb 1.6 / MP4Box GPAC 0.2.4
Sirber
25th May 2007, 13:40
If you want mkv: x264 -B 500 -o video.mkv divxvideo.avs
If you want mp4: x264 -B 500 -o video.mp4 divxvideo.avs
as simple as that
nubianxp
25th May 2007, 14:09
If you want mkv: x264 -B 500 -o video.mkv divxvideo.avs
If you want mp4: x264 -B 500 -o video.mp4 divxvideo.avs
as simple as that
can I add the audio to the MKV/MP4 file afterwards? as well as subtitles if any? I thought I need to first convert it to raw and
then add the audio and stuff using a muxer...
i'll try that tonight, thanks for your help. :)
Sirber
25th May 2007, 14:23
mkvmerge or mp4box can merge it's own kind.
mp4box -add video.mp4 -add audio.mp4 -new output.mp4
mkvmerge -o output.mkv video.mkv audio.mp4
not sure about mkvmerge syntax... been a while :)
DarkZell666
25th May 2007, 15:41
can I add the audio to the MKV/MP4 file afterwards? as well as subtitles if any? I thought I need to first convert it to raw and
then add the audio and stuff using a muxer...
i'll try that tonight, thanks for your help. :)
Well, it should have worked with RAW to be honest, but sometimes raw streams require some extra info to be passed to the muxer (fps, sometimes picture dimensions, aspect ratio, etc.), whereas any mp4 or mkv file should already have them.
I don't see what went wrong with your procedure, but the workarounds mentionned by Sirber should work fine :)
Perhaps you could upload a sample of the raw .264, the audio, and the final broken muxed file ? Wherever you can, just make sure it isn't too big and can be downloaded easily :)
Also, you could try with a later x264 version (take r655 from x264.nl for example).
nubianxp
25th May 2007, 21:38
mkvmerge or mp4box can merge it's own kind.
mp4box -add video.mp4 -add audio.mp4 -new output.mp4
mkvmerge -o output.mkv video.mkv audio.mp4
not sure about mkvmerge syntax... been a while :)
i see, i'm trying it right now. thanks! :)
i've successfully tried encoding to H.264 using VFW in VirtualDubMod and was very impress by the results, that's why i've been reading up the AVC forums because I'd like to move some of my XviD/DivX files to H.264 because of smaller filesize and good quality. The CLI x264 is my best option since I wanted it in batches, then leave it running 24/7.
@DarkZell: yes, i've read that the raw files should be enough, i don't know what went wrong, i'll do more test i'll try and download the latest x264 version and start with that, and maybe learn something... :)
:thanks:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.