Newest 'libx264' Questions - Stack Overflow
Les articles publiés sur le site
-
FFMPEG with x264 encoding
21 février 2014, par mmmaaakI'm trying ton encode video from set of jpeg images to h264, using ffmpeg + x264 for it. I init AVCodecContext in such way:
_outputCodec = avcodec_find_encoder(AV_CODEC_ID_H264); _outputCodecContext = avcodec_alloc_context3(_outputCodec); avcodec_get_context_defaults3(_outputCodecContext, _outputCodec); _outputCodecContext->width = _currentWidth; _outputCodecContext->height = _currentHeight; _outputCodecContext->pix_fmt = AV_PIX_FMT_YUV420P; _outputCodecContext->time_base.num = 1; _outputCodecContext->time_base.den = 25; _outputCodecContext->profile =FF_PROFILE_H264_BASELINE; _outputCodecContext->level = 50;
avcodec_open return no errors, anything is OK, but when I call avcodec_encode_video2() I get such messages (I think it's from x264):
using mv_range_thread = %d %s profile %s, level %s
And then app crashs. My be there are more neccessary settings for codec context, when use x264 &&
-
How to reduce the quality of H264 Video
20 février 2014, par user3239282How to reduce the quality of H264 video using libx264 library, for transmission over internet.
I want to reduce the quality, so that the frame size will become small and decreases the network latency while transferring over internet.
-
Reduce Bandwidth requirement for Video Streaming
19 février 2014, par user3239282Please suggest some points on, how to reduce the bandwidth requirement for a video stream.
We are actually streaming the desktop across internet, Remote Access Application.
Encoder : libx264.lib
Decoder : Ffmpeg
Codec : H264
Following is how am configuring h264 for encoding:
x264_param_default_preset(&this->m_x264Settings, "veryfast", "zerolatency"); this->m_x264Settings.i_threads = 1; this->m_x264Settings.i_width = width / 2; this->m_x264Settings.i_height = height / 2; this->m_x264Settings.i_keyint_max = 10;//fps; this->m_x264Settings.b_intra_refresh = 1; this->m_x264Settings.i_fps_num = 10; this->m_x264Settings.i_fps_den = 1; // Intra refres: this->m_x264Settings.i_keyint_max = 25; this->m_x264Settings.b_intra_refresh = 1; //Rate control: this->m_x264Settings.rc.i_rc_method = X264_RC_CRF; this->m_x264Settings.rc.f_rf_constant = 25; this->m_x264Settings.rc.f_rf_constant_max = 35; //For streaming: this->m_x264Settings.b_repeat_headers = 1; this->m_x264Settings.b_annexb = 1; x264_param_apply_profile(&this->m_x264Settings, "baseline"); this->m_width = width; this->m_height = height; this->m_encoder = x264_encoder_open(&this->m_x264Settings); x264_picture_alloc(&this->m_picIn,X264_CSP_I420,(width / 2),(height / 2)); int sws_flags = SWS_BICUBIC; m_imgConverCtx = sws_getContext(width, height, PIX_FMT_RGB32, (width/2), (height/2), PIX_FMT_YUV420P,sws_flags, NULL, NULL, NULL);
Thanks in advance, Paul.
-
Android link many static libraries into shared library
3 février 2014, par nmxprimei have 4 static libraries
libavcodec.a libavutil.a libswscale.a libx264.a
I want to link it with
libmytest.so
I tried below Android.mk script
LOCAL_PATH := $(call my-dir) INITIAL_PATH := $(LOCAL_PATH) include $(CLEAR_VARS) LOCAL_MODULE := mytest LOCAL_SRC_FILES := mytest.c LOCAL_LDLIBS += -llog LOCAL_WHOLE_STATIC_LIBRARIES := libavutil libavcodec libswscale libx264 include $(BUILD_SHARED_LIBRARY)
mytest.c
calls many functions from those libraries. The 4 libraries are placed insidePROJECTPATH\jni\
.But i get
undefined reference
to all functions from those libraries.I tried giving
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
which allowed me to create shared library, but when i launch the app, i get01-22 07:15:15.650: E/AndroidRuntime(9655): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]: 1868 cannot locate 'avcodec_register_all'... 01-22 07:15:15.650: E/AndroidRuntime(9655): at java.lang.Runtime.loadLibrary(Runtime.java:370) 01-22 07:15:15.650: E/AndroidRuntime(9655): at java.lang.System.loadLibrary(System.java:535)
-
Building ffmpeg for ubuntu No working C compiler found
27 janvier 2014, par WhoamiI am building ffmpeg on ubuntu. I could able to build yasm-1.2.0, and next i tried building x264. x264 requires minumum of yasm-1.2.0, Hence i tried the below command to build x264.
./configure --prefix=
--bindir= --extracflgs= --extra-ldflags= I got the below error:
No working C compiler found.
Not sure what error i commited. Could someone kindly tell me what do i have to do?