
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (68)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)
Sur d’autres sites (6820)
-
Can not add tmcd stream using libavcodec to replicate behavior of ffmpeg -timecode option
2 août, par Sailor JerryI'm trying to replicate option of command line ffmpeg -timecode in my C/C++ code. For some reasons the tcmd stream is not written to the output file. However the av_dump_format shows it in run time


Here is my minimal test


#include <iostream>
extern "C" {
#include <libavcodec></libavcodec>avcodec.h>
#include <libavformat></libavformat>avformat.h>
#include <libavutil></libavutil>avutil.h>
#include <libswscale></libswscale>swscale.h>
#include <libavutil></libavutil>opt.h>
#include <libavutil></libavutil>imgutils.h>
#include <libavutil></libavutil>samplefmt.h>
}
bool checkProResAvailability() {
 const AVCodec* codec = avcodec_find_encoder_by_name("prores_ks");
 if (!codec) {
 std::cerr << "ProRes codec not available. Please install FFmpeg with ProRes support." << std::endl;
 return false;
 }
 return true;
}

int main(){
 av_log_set_level(AV_LOG_INFO);

 const char* outputFileName = "test_tmcd.mov";
 AVFormatContext* formatContext = nullptr;
 AVCodecContext* videoCodecContext = nullptr;

 if (!checkProResAvailability()) {
 return -1;
 }

 std::cout << "Creating test file with tmcd stream: " << outputFileName << std::endl;

 // Allocate the output format context
 if (avformat_alloc_output_context2(&formatContext, nullptr, "mov", outputFileName) < 0) {
 std::cerr << "Failed to allocate output context!" << std::endl;
 return -1;
 }

 if (avio_open(&formatContext->pb, outputFileName, AVIO_FLAG_WRITE) < 0) {
 std::cerr << "Failed to open output file!" << std::endl;
 avformat_free_context(formatContext);
 return -1;
 }

 // Find ProRes encoder
 const AVCodec* videoCodec = avcodec_find_encoder_by_name("prores_ks");
 if (!videoCodec) {
 std::cerr << "Failed to find the ProRes encoder!" << std::endl;
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 // Video stream setup
 AVStream* videoStream = avformat_new_stream(formatContext, nullptr);
 if (!videoStream) {
 std::cerr << "Failed to create video stream!" << std::endl;
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 videoCodecContext = avcodec_alloc_context3(videoCodec);
 if (!videoCodecContext) {
 std::cerr << "Failed to allocate video codec context!" << std::endl;
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 videoCodecContext->width = 1920;
 videoCodecContext->height = 1080;
 videoCodecContext->pix_fmt = AV_PIX_FMT_YUV422P10;
 videoCodecContext->time_base = (AVRational){1, 30}; // Set FPS: 30
 videoCodecContext->bit_rate = 2000000;

 if (avcodec_open2(videoCodecContext, videoCodec, nullptr) < 0) {
 std::cerr << "Failed to open ProRes codec!" << std::endl;
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 if (avcodec_parameters_from_context(videoStream->codecpar, videoCodecContext) < 0) {
 std::cerr << "Failed to copy codec parameters to video stream!" << std::endl;
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 videoStream->time_base = videoCodecContext->time_base;

 // Timecode stream setup
 AVStream* timecodeStream = avformat_new_stream(formatContext, nullptr);
 if (!timecodeStream) {
 std::cerr << "Failed to create timecode stream!" << std::endl;
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 timecodeStream->codecpar->codec_type = AVMEDIA_TYPE_DATA;
 timecodeStream->codecpar->codec_id = AV_CODEC_ID_TIMED_ID3;
 timecodeStream->codecpar->codec_tag = MKTAG('t', 'm', 'c', 'd'); // Timecode tag
 timecodeStream->time_base = (AVRational){1, 30}; // FPS: 30

 if (av_dict_set(&timecodeStream->metadata, "timecode", "00:00:30:00", 0) < 0) {
 std::cerr << "Failed to set timecode metadata!" << std::endl;
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 // Write container header
 if (avformat_write_header(formatContext, nullptr) < 0) {
 std::cerr << "Failed to write file header!" << std::endl;
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 // Encode a dummy video frame
 AVFrame* frame = av_frame_alloc();
 if (!frame) {
 std::cerr << "Failed to allocate video frame!" << std::endl;
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 frame->format = videoCodecContext->pix_fmt;
 frame->width = videoCodecContext->width;
 frame->height = videoCodecContext->height;

 if (av_image_alloc(frame->data, frame->linesize, frame->width, frame->height, videoCodecContext->pix_fmt, 32) < 0) {
 std::cerr << "Failed to allocate frame buffer!" << std::endl;
 av_frame_free(&frame);
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);
 return -1;
 }

 // Fill frame with black
 memset(frame->data[0], 0, frame->linesize[0] * frame->height); // Y plane
 memset(frame->data[1], 128, frame->linesize[1] * frame->height / 2); // U plane
 memset(frame->data[2], 128, frame->linesize[2] * frame->height / 2); // V plane

 // Encode the frame
 AVPacket packet;
 av_init_packet(&packet);
 packet.data = nullptr;
 packet.size = 0;

 if (avcodec_send_frame(videoCodecContext, frame) == 0) {
 if (avcodec_receive_packet(videoCodecContext, &packet) == 0) {
 packet.stream_index = videoStream->index;
 av_interleaved_write_frame(formatContext, &packet);
 av_packet_unref(&packet);
 }
 }

 av_frame_free(&frame);

 // Write a dummy packet for the timecode stream
 AVPacket tmcdPacket;
 av_init_packet(&tmcdPacket);
 tmcdPacket.stream_index = timecodeStream->index;
 tmcdPacket.flags |= AV_PKT_FLAG_KEY;
 tmcdPacket.data = nullptr; // Empty packet for timecode
 tmcdPacket.size = 0;
 tmcdPacket.pts = 0; // Set necessary PTS
 tmcdPacket.dts = 0;
 av_interleaved_write_frame(formatContext, &tmcdPacket);

 // Write trailer
 if (av_write_trailer(formatContext) < 0) {
 std::cerr << "Failed to write file trailer!" << std::endl;
 }

 av_dump_format(formatContext, 0, "test.mov", 1);

 // Cleanup
 avcodec_free_context(&videoCodecContext);
 avio_close(formatContext->pb);
 avformat_free_context(formatContext);

 std::cout << "Test file with timecode created successfully: " << outputFileName << std::endl;

 return 0;
}
</iostream>


The code output is :


Creating test file with tmcd stream: test_tmcd.mov
[prores_ks @ 0x11ce05790] Autoselected HQ profile to keep best quality. It can be overridden through -profile option.
[mov @ 0x11ce04f20] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mov @ 0x11ce04f20] Encoder did not produce proper pts, making some up.
Output #0, mov, to 'test.mov':
 Metadata:
 encoder : Lavf61.7.100
 Stream #0:0: Video: prores (HQ) (apch / 0x68637061), yuv422p10le, 1920x1080, q=2-31, 2000 kb/s, 15360 tbn
 Stream #0:1: Data: timed_id3 (tmcd / 0x64636D74)
 Metadata:
 timecode : 00:00:30:00
Test file with timecode created successfully: test_tmcd.mov



The ffprobe output is :


$ ffprobe test_tmcd.mov
ffprobe version 7.1.1 Copyright (c) 2007-2025 the FFmpeg developers
 built with Apple clang version 16.0.0 (clang-1600.0.26.6)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
 libavutil 59. 39.100 / 59. 39.100
 libavcodec 61. 19.101 / 61. 19.101
 libavformat 61. 7.100 / 61. 7.100
 libavdevice 61. 3.100 / 61. 3.100
 libavfilter 10. 4.100 / 10. 4.100
 libswscale 8. 3.100 / 8. 3.100
 libswresample 5. 3.100 / 5. 3.100
 libpostproc 58. 3.100 / 58. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_tmcd.mov':
 Metadata:
 major_brand : qt 
 minor_version : 512
 compatible_brands: qt 
 encoder : Lavf61.7.100
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0[0x1]: Video: prores (HQ) (apch / 0x68637061), yuv422p10le, 1920x1080, 15360 tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : FFMP
$ 




Spent hours with all AI models, no help. Appeal to the human intelligence now


-
android ffmpeg compilation error
28 août 2012, par swapnil adsurehey guys i am going to share my script and error please help me to solve it
i want to compile ffmpeg on android'# !/bin/bash
# Author : Dmitry Dzakhov (based on Guo Mingyu's script)# Creating conf.sh in ffmpeg directory
NDK=~/android-ndk
PLATFORM=$NDK/platforms/android-14/arch-arm
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86
output="conf.sh"
[ -f conf.sh ] && echo "Old $output has been removed."
echo '#!/bin/bash' > $output
echo "PREBUILT=$PREBUILT" >> $output
echo "PLATFORM=$PLATFORM" >> $output
echo './configure --target-os=linux \
--prefix=./android/armv7-a \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=arm \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 -mfloat-abi=softfp -mfpu=neon -marm -march=armv7-a -mtune=cortex-a8 " \
--disable-shared \
--enable-static \
--extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \
--enable-parsers \
--enable-encoders \
--enable-decoders \
--enable-muxers \
--enable-demuxers \
--enable-swscale \
--enable-swscale-alpha \
--disable-ffplay \
--disable-ffprobe \
--enable-ffserver \
--enable-network \
--enable-indevs \
--disable-bsfs \
--enable-filters \
--enable-avfilter \
--enable-protocols \
--disable-asm \
--enable-neon' >> $output
# start configure
sudo chmod +x $output
echo "configuring..."
./$output || (echo configure failed && exit 1)
# modify the config.h
echo "modifying the config.h..."
sed -i "s/#define restrict restrict/#define restrict/g" config.h
# remove static functions in libavutil/libm.h
echo "removing static functions in libavutil/libm.h..."
sed -i "/static/,/}/d" libavutil/libm.h
# modify Makefiles
echo "modifying Makefiles..."
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavcodec/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavcodec/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavfilter/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavfilter/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavformat/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavformat/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libavutil/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libavutil/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libpostproc/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libpostproc/Makefile
sed -i "/include \$(SUBDIR)..\/subdir.mak/d" libswscale/Makefile
sed -i "/include \$(SUBDIR)..\/config.mak/d" libswscale/Makefile
# generate av.mk in ffmpeg
echo "generating av.mk in ffmpeg..."
echo '# LOCAL_PATH is one of libavutil, libavcodec, libavformat, or libswscale
#include $(LOCAL_PATH)/../config-$(TARGET_ARCH).mak
include $(LOCAL_PATH)/../config.mak
OBJS :=
OBJS-yes :=
MMX-OBJS-yes :=
include $(LOCAL_PATH)/Makefile
# collect objects
OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes)
OBJS += $(OBJS-yes)
FFNAME := lib$(NAME)
FFLIBS := $(foreach,NAME,$(FFLIBS),lib$(NAME))
FFCFLAGS = -DHAVE_AV_CONFIG_H -Wno-sign-compare -Wno-switch -Wno-pointer-sign
FFCFLAGS += -DTARGET_CONFIG=\"config-$(TARGET_ARCH).h\"
ALL_S_FILES := $(wildcard $(LOCAL_PATH)/$(TARGET_ARCH)/*.S)
ALL_S_FILES := $(addprefix $(TARGET_ARCH)/, $(notdir $(ALL_S_FILES)))
ifneq ($(ALL_S_FILES),)
ALL_S_OBJS := $(patsubst %.S,%.o,$(ALL_S_FILES))
C_OBJS := $(filter-out $(ALL_S_OBJS),$(OBJS))
S_OBJS := $(filter $(ALL_S_OBJS),$(OBJS))
else
C_OBJS := $(OBJS)
S_OBJS :=
endif
C_FILES := $(patsubst %.o,%.c,$(C_OBJS))
S_FILES := $(patsubst %.o,%.S,$(S_OBJS))
FFFILES := $(sort $(S_FILES)) $(sort $(C_FILES))' > av.mk
echo 'include $(all-subdir-makefiles)' > ../Android.mk
echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_STATIC_LIBRARIES := libavformat libavcodec libavutil libpostproc libswscale
LOCAL_MODULE := ffmpeg
include $(BUILD_SHARED_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))' > Android.mk
echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_CFLAGS += -include "string.h" -Dipv6mr_interface=ipv6mr_ifindex
LOCAL_LDLIBS := -lz
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavformat/Android.mk
echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_CFLAGS += -std=c99
LOCAL_LDLIBS := -lz
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavcodec/Android.mk
echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavfilter/Android.mk
echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libavutil/Android.mk
echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libpostproc/Android.mk
echo 'LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../av.mk
LOCAL_SRC_FILES := $(FFFILES)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH) \
$(LOCAL_PATH)/..
LOCAL_CFLAGS += $(FFCFLAGS)
LOCAL_STATIC_LIBRARIES := $(FFLIBS)
LOCAL_MODULE := $(FFNAME)
include $(BUILD_STATIC_LIBRARY)' > libswscale/Android.mk
# start build!
echo "start ndk-building..."
cd ../..
$NDK/ndk-build
# Change previous line to "$NDK/ndk-build V=1" if you'll get errors. This will give some more information.'and here is the error i got
WARNING : /Users/swapnil/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/arm-linux-androideabi-pkg-config not found, library detection may fail.
WARNING : Compiler does not indicate floating-point ABI, guessing soft.
modifying the config.h -
Yet another ffmpeg/libx264 issue
26 décembre 2013, par kerim yucelMy current situation is ; ffmpeg and libx264 has been compiled for Android, as shared and static libraries respectively. Since I have libx264.a and libffmpeg.so with me, only thing that remains is to link them and obtain a ffmpeg library that would allow me to proceed with my application. However, some questions remain unanswered. I am using Ubuntu with a virtual machine under Windows 7. I am using x264’s last version, ffmpeg 0.10.4 release and NDK 7.
I have tried to adjust flags (extracf and extrald) in order to include libx264 to ffmpeg compilation process as well, however I keep failing. Below you may find my build script for ffmpeg and the errors I have encountered.
NDK=~/Android_NDK_r7b
PLATFORM=$NDK/platforms/android-8/arch-arm/
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
x264=/usr/local
#x264v2=~/x264
function build_one
{
./configure --target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=arm \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
# --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \
--extra-cflags="-I$x264/include" \
--enable-shared \
--enable-static \
#--extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \
--extra-ldflags="-L$x264/lib" \
--disable-everything \
# --enable-demuxer=mov \
# --enable-demuxer=h264 \
# --disable-ffplay \
--enable-gpl \
--enable-libx264 \
# --enable-protocol=file \
# --enable-avformat \
# --enable-avcodec \
# --enable-encoder=libx264 \
# --enable-decoder=rawvideo \
#--enable-decoder=mjpeg \
# --enable-decoder=h263 \
# --enable-decoder=mpeg4 \
# --enable-encoder=h264 \
# --disable-network \
#--enable-zlib \
# --disable-avfilter \
#--disable-avdevice \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
}
#arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./androidIncludeTrialsNDK7/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_oneIf I basically delete the lines extracf and extrald flags and use other ones (commented outs), it works fine except libx264 not found error. Otherwise, I get the following erros.
./buildnew.sh: line 35: --extra-cflags=-I/usr/local/include: No such file or directory
./buildnew.sh: line 38: --extra-ldflags=-L/usr/local/lib: No such file or directory
./buildnew.sh: line 40: --disable-everything: command not found
./buildnew.sh: line 44: --enable-gpl: command not foundThe compilation process ends with the following.
make: *** [libavdevice/v4l.o] Error 1
make: *** Waiting for unfinished jobs....
/home/mehmet/Android_NDK_r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ar: creating libavcodec/libavcodec.a
/home/mehmet/Android_NDK_r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-ld: cannot open output file ./androidIncludeTrialsNDK7/armv7-a/libffmpeg.so: No such file or directoryI have x264 installed in my directory /home/mehmet/x264 and I also check whereis x264.a, it shows me as /usr/local/lib. I have tried changing the path $x264 to point out to home/mehmet/x264 folder, but I get the same error.
Lastly, if I enable both extracf and extrald flags ( both commented ones and the used ones) . I get the same error mentioned above. I am afraid I am doing a simple typo here, but can`t see it and it is driving me crazy. Thanks a lot for your help.
Best.
EDIT
I have deleted the comments and now obtain the following.
./buildnew.sh: 4: ./buildnew.sh: function: not found
ERROR: libx264 not foundAbove error is observed from the terminal when I run the script. It build upto some point and finishes the process with the following error.
libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:159: undefined reference to `x264_picture_init'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:179: undefined reference to `x264_encoder_reconfig'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:191: undefined reference to `x264_encoder_encode'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:197: undefined reference to `x264_encoder_delayed_frames'
libavcodec/libavcodec.a(libx264.o): In function `encode_nals':
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:196: undefined reference to `x264_bit_depth'
libavcodec/libavcodec.a(libx264.o): In function `X264_close':
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:231: undefined reference to `x264_encoder_close'
libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:284: undefined reference to `x264_param_default'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:292: undefined reference to `x264_param_default_preset'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:305: undefined reference to `x264_param_parse'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:502: undefined reference to `x264_param_apply_fastfirstpass'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:505: undefined reference to `x264_param_apply_profile'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:544: undefined reference to `x264_encoder_open_125'
/home/mehmet/ffmpeg-0.10.4/libavcodec/libx264.c:554: undefined reference to `x264_encoder_headers'
./buildnew.sh: 51: ./buildnew.sh: build_one: not found