Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
FFmpeg compile for Android (configure, make)
11 août 2013, par manutdI want to compile ffmpeg for Android ver.
But everytime I try, I can't compile the source of ffmpeg.
I think my configuration option may be invalid.I used this script for configure.
#!/bin/sh NDK_PATH=$HOME/android-ndk-r8 PREBUILT=$NDK_PATH/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86 LDFLAGS="-Wl,-T,$PREBUILT/armelf_linux_eabi.x -Wl,-rpath-link=$NDK_PATH/platforms/android-8/arch-arm/usr/lib \ -L$NDK_PATH/platforms/android-8/arch-arm/usr/lib -nostdlib $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/crtbegin.o \ $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/crtend.o -lc -lm -ldl" COMMON_CONFIG="\ ./configure --target-os=linux \ --arch=arm \ --enable-cross-compile \ --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \ --as=$PREBUILT/bin/arm-linux-androideabi-gcc \ --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \ --sysinclude=$NDK_PATH/platforms/android-8/arch-arm/usr/include \ --nm=$PREBUILT/bin/arm-linux-androideabi-nm \ --extra-ldflags=\"$LDFLAGS\" \ --extra-cflags=-I$NDK_PATH/platforms/android-8/arch-arm/usr/include \ eval "$COMMON_CONFIG" if [ $? -ne 0 ]; then exit 1 fi
I have to give compiler a new header file path (by --extra-cflags) because when I typed 'make', compiler didn't know where are header files (like math.h, ctime.h)
After configure using this scripts and type 'make', I got these error.
CC libavdevice/alldevices.o In file included from /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/stdlib.h:42, from ./libavutil/common.h:35, from ./libavutil/avutil.h:126, from libavdevice/avdevice.h:22, from libavdevice/alldevices.c:22: /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/strings.h:49: warning: redundant redeclaration of 'index' /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/string.h:47: note: previous declaration of 'index' was here /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/strings.h:50: warning: redundant redeclaration of 'strcasecmp' /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/string.h:57: note: previous declaration of 'strcasecmp' was here /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/strings.h:51: warning: redundant redeclaration of 'strncasecmp' /Users/gyeongmingim/android-ndk-r8/platforms/android-8/arch-arm/usr/include/string.h:58: note: previous declaration of 'strncasecmp' was here In file included from ./libavutil/internal.h:178, from ./libavutil/common.h:342, from ./libavutil/avutil.h:126, from libavdevice/avdevice.h:22, from libavdevice/alldevices.c:22: ./libavutil/libm.h:62: error: static declaration of 'lrint' follows non-static declaration ./libavutil/libm.h:69: error: static declaration of 'lrintf' follows non-static declaration ./libavutil/libm.h:76: error: static declaration of 'round' follows non-static declaration ./libavutil/libm.h:90: error: static declaration of 'trunc' follows non-static declaration make: *** [libavdevice/alldevices.o] Error 1
What is the wrong?
Does my configuration have wrong info? or any missing flag?OS : Mac Lion
Android-ndk ver : android-ndk-r8 -
Get .avi video's duriation in ffmpeg
11 août 2013, par Vardan HovhannisyanI would like to get
.avi
video duration usingffmpeg
library? I have try to use code in this link: how to use libavcodec/ffmpeg to find duration of video file, but it's not work for .avi(but for .mp4 it does). -
Steps for writing NAL packets to mp4 using libavformat
11 août 2013, par Nisar AhmedI am writing h.264 NAL packets to mp4 container using libavformat but the output movie does not play on vlc player at all and ffmpeg -i output.mp4 gives "Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), 720x480, 13954 kb/s): unspecified pixel format"
I have followed the steps mentioned in muxing.c sample but the results are same.
Furthermore I don't want to encode frames as they are already encoded so I am bypassing avcodec_open2 function call.
Please tell me what steps should I take in order to correctly write h264 to mp4.
-
ffmpeg : 1 image + 1 audio = 1 video (how can it encode faster ?)
11 août 2013, par user1062949I want ffmpeg to take a png image and a mp3 audio file as input and generate a video file of the same duration as the audio file. I'm using the following command:
ffmpeg -loop 1 -shortest -y -i image.png -i audio.mp3 -acodec copy \ -vcodec libx264 video.mov
However, given a 40min mp3 file (160kbps) as input, it is taking more than 2 hours to encode the whole video on a MacBook Pro i5 2.5GHz.
I tried to use the -preset ultrafast option, but it is not really improving the encoding speed significantly.
Is there any way to encode it faster using ffmpeg?
I was following the instructions provided in this post: ffmpeg: 1 image + 1 audio file = 1 video
Any help will be appreciated, thank you.
-
FFMPEG : How to convert 1000 jpegs and 100 mp3 seconds into video ?
11 août 2013, par SpenderSo my programm generates JPegs and MP3 stereo track. I want to convert my programm results with FFMPEG to h264+aac or OGG (vorbis+theora) 100 seconds video. So how to do It from commandline at least (or using pure ffmpeg lib from C)?