Newest 'libx264' Questions - Stack Overflow
Les articles publiés sur le site
-
How to integrate shared object file of libx264 while using ffmpeg for android ?
5 août 2014, par user3665376I am working with integrating ffmpeg for android .
Since I needed H.264 encoding I need to integrate libx264 with ffmpeg . Given below are the steps I followed .
1) Build the latest libx264 using android compiler tool-chain to obtain libx264.so.142 .
2) Build ffmpeg v 2.3 referring to this with --enable -libx264 option while configuring ffmpeg . The method explained in the blog included some editing in configure file of ffmpeg to generate shared object files with extension format [lib name].so rather than the generating shared object file with extension format [lib name].so.[version] (Since android build system supports files with extension .so only).
The building process was successful but since the generated .so files (after building ffmpeg) has dynamic dependency with libx264.so.142,I need to package libx264.so.142 also with the android .apk file . But since the above format (.so.142) is not supported with android apk building system I cannot package it with the .apk .
So I think the only option I have is to make some changes in configure file of ffmpeg to change the dynamic dependency of libx264.so.142 to libx264.so . Am I right??
What changes do I need to make to ffmpeg configure file to achieve this?
-
Issue #2 when compiling Xuggler for Raspberry pi with libx264
2 août 2014, par Ashish SharmaI am trying to compile Xuggler for Raspberry Pi(Running on Debian OS aka Raspbian),
I followed the 'Basic Build Instructions' available here for compiling Xuggler.
After I successfully installed all the prerequisites and set the correct paths, I ran the following command:
ant run-tests
After sometime I am facing the following error and the ant build fails at libx264:
{scroll at the end of log to see the issue}
common/arm/mc-c.c: In function âx264_weight_cache_neonâ: common/arm/mc-c.c:89:25: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default] common/arm/mc-c.c:94:25: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default] common/arm/mc-c.c:99:21: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default] common/arm/mc-c.c:101:21: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default] common/arm/mc-c.c: In function âx264_mc_init_armâ: common/arm/mc-c.c:236:19: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default] common/arm/mc-c.c:237:19: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default] common/arm/mc-c.c:238:19: warning: assignment discards âconstâ qualifier from pointer target type [enabled by default] gcc -Wshadow -O3 -fno-fast-math -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include -Wall -I. -I. -I'/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include' -std=gnu99 -mcpu=cortex-a8 -mfpu=neon -fPIC -fomit-frame-pointer -fno-tree-vectorize -c -o common/arm/predict-c.o common/arm/predict-c.c as -I/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include -Wall -I. -I. -I'/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/stage/home/pi/Downloads/xuggler/include' -std=gnu99 -mcpu=cortex-a8 -mfpu=neon -c -DPIC -DHIGH_BIT_DEPTH=0 -DBIT_DEPTH=8 -o common/arm/cpu-a.o common/arm/cpu-a.S as: unrecognized option '-std=gnu99' make[1]: *** [common/arm/cpu-a.o] Error 1 make[1]: Leaving directory `/home/pi/Downloads/xuggle-xuggler/build/native/armv6l-unknown-linux-gnueabihf/captive/libx264/csrc' make: *** [all-local] Error 2
I am unable to understand the problem statment "unrecognized option '-std=gnu99'" here, Can someone please tell me how can I resolve this or circumvent it in xuggler?
-
How to build ffmpeg with libx264 support for android ?
30 juillet 2014, par user3665376I am working on video editing using ffmpeg in android . I successfully build ffmpeg by following the steps mentioned at here .
I wanted to integrate libx264 library with ffmpeg for enabling H.264 encoding . Has anybody successful integrating libx264 with android? What all changes I need to make to the configure file or build script to make it compatible with android?
-
Get x264 options from stream
29 juillet 2014, par HardRockI have a problem with H264 encoding, actually with libx264 :(
I want to encode series of images from web camera into h264 and send stream to chines DVR. Problem is DVR can't decode my stream. I tried to adjust (using h264stream_analyzer) SPS and PPS in libx264 to match SPS and PPS headers from "correct stream", produced by other chinese DVR's and IP cameras. But no luck :( Looks like problem in bitstream.
My stream and "correct" stream - are both may be converted and played with avconv (ffmpeg), for example. Transport is ok. If i send "correct stream" - DVR understand it. Problem in stream.
One strange thing - "correct stream" contains a lot of 28 and 29 slice types. From h264 specification this is must be "fragmentation" units. But my stream contains only P and I slices, но fragmens.
So how i can get exact stream encoding parameters from existing sample stream? It may be difference in x264 versions?
-
Encoding H.264 video using FFmpeg C API
18 juillet 2014, par GummiBI'm trying to encode a H.264 video with the FFMPEG C API. I have successfully compiled and executed the decoding/encoding example provided by FFMPEG.
The problem I'm facing is that the .mpg file (encoded with AV_CODEC_ID_MPEG1VIDEO) the example creates works. Windows creates a thumbnail and everything. On the other hand the .h264 (encoded with AV_CODEC_ID_H264) file does not. When I try to play the file in VLC the play/pause button just flickers, no thumbnail in windows, no nothing.
During encoding libx264 reports the following:
[libx264 @ 004b81a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX [libx264 @ 004b81a0] profile High, level 1.3 [libx264 @ 004b81a0] frame I:3 Avg QP:26.79 size: 2116 [libx264 @ 004b81a0] frame P:12 Avg QP:26.60 size: 789 [libx264 @ 004b81a0] frame B:10 Avg QP:31.39 size: 499 [libx264 @ 004b81a0] consecutive B-frames: 20.0% 80.0% [libx264 @ 004b81a0] mb I I16..4: 78.3% 11.6% 10.1% [libx264 @ 004b81a0] mb P I16..4: 77.4% 0.6% 0.1% P16..4: 20.3% 0.7% 0.9% 0.0% 0.0% skip: 0.0% [libx264 @ 004b81a0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 9.4% 0.2% 0.0% direct:11.0% skip:79.4% L0:25.4% L1:35.4% BI:39.2% [libx264 @ 004b81a0] final ratefactor: 17.03 [libx264 @ 004b81a0] 8x8 transform intra:3.4% inter:31.3% [libx264 @ 004b81a0] direct mvs spatial:0.0% temporal:100.0% [libx264 @ 004b81a0] coded y,uvDC,uvAC intra: 4.4% 35.8% 1.6% inter: 1.3% 34.5% 9.5% [libx264 @ 004b81a0] i16 v,h,dc,p: 0% 0% 0% 100% [libx264 @ 004b81a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 7% 20% 17% 49% 0% 0% 0% 1% 6% [libx264 @ 004b81a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 7% 18% 45% 2% 7% 2% 3% 2% [libx264 @ 004b81a0] i8c dc,h,v,p: 2% 6% 4% 88% [libx264 @ 004b81a0] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 004b81a0] ref P L0: 95.6% 1.6% 2.2% 0.5% 0.2% [libx264 @ 004b81a0] ref B L0: 67.5% 28.5% 3.2% 0.8% [libx264 @ 004b81a0] kb/s:166.45
"ffprobe.exe test.h264 -show_streams" returns
[STREAM] index=0 codec_name=h264 codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 profile=High codec_type=video codec_time_base=1/50 codec_tag_string=[0][0][0][0] codec_tag=0x0000 width=352 height=288 has_b_frames=1 sample_aspect_ratio=0:1 display_aspect_ratio=0:1 pix_fmt=yuv420p level=13 timecode=N/A id=N/A r_frame_rate=50/2 avg_frame_rate=25/1 time_base=1/1200000 start_pts=N/A start_time=N/A duration_ts=N/A duration=N/A bit_rate=N/A nb_frames=N/A nb_read_frames=N/A nb_read_packets=N/A DISPOSITION:default=0 DISPOSITION:dub=0 DISPOSITION:original=0 DISPOSITION:comment=0 DISPOSITION:lyrics=0 DISPOSITION:karaoke=0 DISPOSITION:forced=0 DISPOSITION:hearing_impaired=0 DISPOSITION:visual_impaired=0 DISPOSITION:clean_effects=0 DISPOSITION:attached_pic=0 [/STREAM]
There you can see:
start_time=N/A duration_ts=N/A duration=N/A
I have tried countless changes to the AVCodecContext and multitude of parameters options to av_opt_set function. Still no luck getting a working H.264 video. I have even tried different builds of FFmpeg. No luck.
I'm using the "FFmpeg git-0fb64da 32-bit Dev" build from Zeranoe and MinGw 4.7.2