Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Any x264 command line experts? (Read 7479 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Any x264 command line experts?

I'm looking to just get to know how to encode a movie clip with the x264 codec through the command line. I figure if I can encode a small movie clip with it, I can build up from there. If it's anything like encoding WAV through the command line, it shouldn't be that hard for me to pick it up.

Any x264 command line experts?

Reply #1
You could try using something like MeGUI and seeing what command line it creates.
I'm on a horse.

Any x264 command line experts?

Reply #2
It's going to be confusing at first, but every switch is well-documented if you know where to look  . First, you can use --longhelp to see descriptions of every available switch. Other resources you can use include the "MPEG-4 AVC" forum on Doom9 and some random guide I found. Just keep practicing and searching, and you'll get the hang of things.

 

Any x264 command line experts?

Reply #3
Quote
If it's anything like encoding WAV through the command line, it shouldn't be that hard for me to pick it up.


it is just like that only that you need to feed the encoder with the yv12 data, so intermediate step is necessary, using avisynth;

Code: [Select]
avisource("myclip.avi")
converttoyv12()


here is an example of the procedure;

Quote
1. - avisynth 2.5x  http://www.doom9.org/index.html?/software2.htm
notepad, input avi is of DV type:

DirectShowsource("film.avi").info
#remove .info before encoding
LanczosResize(512,384)
assumefps(25)
ConvertToYV12

save as film.avs

2. - x264.exe http://x264.nl/ (x264-xxx-install.exe) or http://forum.doom9.org/showthread.php?t=89979
x264 -B 500 -o "film.mp4" film.avs

3. -mp4box  http://forum.doom9.org/showthread.php?t=94874
mp4box -add film.mp4 film_final.mp4

4. -mplayer  http://www.mplayerhq.hu or http://oss.netfarm.it/mplayer-win32.php
extract audio from avi:
mplayer -ao pcm -vo null film.avi

5. -faac http://www.rarewares.org/aac.html
faac -b 128 --mpeg-vers 4 audiodump.wav

6. muxing and hinting:
mp4box -add audiodump.aac film_final.mp4 -hint

7. delete some temporary files:
del  audiodump.*
del film.mp4
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung