Newest 'x264' Questions - Stack Overflow
Les articles publiés sur le site
-
x264 command line options for openh264 decoder
6 octobre 2015, par DavidOpenH264 is a pretty restrictive decoder. It only decodes baseline, for one thing. I'm using openh264 to decode something encoded with x264 and every 1-10 seconds I'm getting busts of 10-20 frames of decoding errors: dsRefLost, dsBitstreamError, and/or dsDataErrorConcealed. I'm thinking this may be due to x264 set to encode in a way OpenH264 doesn't support to decode. What options should I use for x264 to make sure openh264 can decode properly?
-
Pure C-Code of x264 of ffmpeg
21 septembre 2015, par Codec GuyI am doing some hardware implementation on Ratecontrol of FFMPEG. I am using x264 Encoder, here I am not able to find the C-Code implementation of this function
intra_mbcmp_x3_8x8c
.I tried to trace it back wards, but there is only assembly implementation of the code. Can some body please guide to the Pure C-implementation of the latest x264.
It would also be helpful, if someone helps me in disabling x86 flags in FFMPEG, so that I will be able to run the pure C implementation.
Note:I have checked a similar question here.
But I was not able to get my answer. -
capture my webcam and encode to mp4 with ffmpeg, but the x264 works bad
17 septembre 2015, par zhangxm1991here is my version: ffmpeg version: 2.3.3 libx264 version:142.x
I wat to capture my video and use ffmpeg and x264 to a mp4 file. the solution is 320x240. But i found that the video file is so big. Then i found that the P frame and B frame is very big, even nearly equal to the I frame.I do not know why.
here is my code:
c->codec_id = codec_id; c->bit_rate = 400000; c->width = 320; c->height = 240; c->time_base.den = 10; c->time_base.num = 1; c->pix_fmt = AV_PIX_FMT_YUV420P;
Here is my program output:
[libx264 @ 0xb6200fc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 0xb6200fc0] profile High, level 1.3 [libx264 @ 0xb6200fc0] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=10 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to '/home/2014_09_12/0002b6429579/5/2014_09_12_18_39_12_600.mp4': Stream #0:0: Video: h264 (libx264), yuv420p, 320x240, q=-1--1, 400 kb/s, 10 tbc Stream #0:1: Audio: aac, 8000 Hz, mono, fltp, 32 kb/s [mp4 @ 0xb62005e0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead. [mp4 @ 0xb62005e0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead. [mp4 @ 0xb62005e0] Encoder did not produce proper pts, making some up. [libx264 @ 0xb6200fc0] frame I:3 Avg QP: 2.79 size: 72996 [libx264 @ 0xb6200fc0] frame P:383 Avg QP: 0.14 size: 54075 [libx264 @ 0xb6200fc0] frame B:216 Avg QP: 1.95 size: 64784 [libx264 @ 0xb6200fc0] consecutive B-frames: 30.1% 63.2% 6.0% 0.7% [libx264 @ 0xb6200fc0] mb I I16..4: 16.1% 12.7% 71.2% [libx264 @ 0xb6200fc0] mb P I16..4: 3.5% 5.1% 15.9% P16..4: 20.3% 22.8% 14.0% 0.0% 0.0% skip:18.3% [libx264 @ 0xb6200fc0] mb B I16..4: 0.4% 2.5% 8.2% B16..8: 32.6% 19.8% 13.5% direct:22.2% skip: 0.8% L0:25.5% L1:12.8% BI:61.6% [libx264 @ 0xb6200fc0] final ratefactor: -32.89 [libx264 @ 0xb6200fc0] 8x8 transform intra:21.0% inter:29.6% [libx264 @ 0xb6200fc0] coded y,uvDC,uvAC intra: 100.0% 100.0% 100.0% inter: 83.3% 80.9% 80.9% [libx264 @ 0xb6200fc0] i16 v,h,dc,p: 5% 7% 42% 46% [libx264 @ 0xb6200fc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 12% 23% 8% 6% 6% 8% 9% 14% [libx264 @ 0xb6200fc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 11% 19% 10% 8% 8% 10% 10% 12% [libx264 @ 0xb6200fc0] i8c dc,h,v,p: 78% 3% 4% 15% [libx264 @ 0xb6200fc0] Weighted P-Frames: Y:0.5% UV:0.3% [libx264 @ 0xb6200fc0] ref P L0: 43.4% 14.6% 19.0% 22.9% 0.1% [libx264 @ 0xb6200fc0] ref B L0: 63.3% 35.7% 1.1% [libx264 @ 0xb6200fc0] ref B L1: 97.0% 3.0% [libx264 @ 0xb6200fc0] kb/s:4.53 [aac @ 0xb6201ba0] 2 frames left in the queue on closing
-
x264 encoding taking longer when encoding static frames (than
14 septembre 2015, par DaniloHi, I'm using x264 for live video streaming and I've noticed that the thread responsible for encoding uses more cpu (sometimes 50% more with 1920x1080) when the video stream is frozen (i.e.: camera is sending the same frame over an over again) or when I make it encode the same image over and over again.
This seems somewhat counter intuitive to me, as I would expect x264 to use more processing power when encoding complex scenes other then static ones.
My encoder settings are the following:
1280x720 fps=25/1 timebase=0/0 bitdepth=8 cabac=0 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=1 lookahead_threads=0 sliced_threads=0 slice_max_size=1190 nr=60 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=1200 keyint_min=120 scenecut=40 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=24.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1024 vbv_bufsize=350 crf_max=35.0 nal_hrd=none
I created a github gist based on the example.c encoder bundled in x264's source code and tested encoding times with it. (You can find it here: https://gist.github.com/danilogr/ab4976ff4e0831ab274b)
Average encoding time for the static scene is ~38% bigger than for a scene with movements. (You can find my test case and also the output from my test encoder on the link above).
I've also noticed that by setting
scenecut=0, subme=0, trellis=0 and me=dia
I can get rid of this problem, but with noticeable quality decrease. Could anyone, please, shed some light on the reasons for this odd behavior? Also, what can be done in order to avoid this situation without a major decrease in quality?
-
GNU GPL licensing - x264 encoder (H.264) [closed]
2 septembre 2015, par ProfI'm a little lost here. I have a few questions and i'm just after yes/no answers with a a description as to how you arrived at the answer. I've done some searching, and I've seen GNU GPL questions asked many times, but I've struggled to find a clear answer to my last question.
I'm on a commercial proprietary project, and I want to produce H.264 video using the free x264 encoder (http://www.videolan.org/developers/x264.html), which apparently is under the GNU GPL license (2.0 it seems).
From my limited understanding, if I link the x264 libraries then I have to distribute my source code, even if I'm just making calls into it. Correct?
If the license was GNU lesser, then I wouldn't have to do this? Correct?
If I distribute x264.exe with my application (alongside it as a separate .exe), so my application calls it as a separate process, do I still need to distribute my source code? I believe the answer is no, but I would have to distribute the x264 source code, correct?
Thanks