Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Use ffmpeg with python
24 février 2014, par user2063350I have an ffmpeg setup on my pc, which streams mp3 with this code:
ffmpeg -f dshow -i audio="Input device" -c:a libmp3lame -f mpegts udp://192.168.1.2:7777
Also i have a server and I want to start recording stream to mp3 file whenever stream starts. Server is running all day long listening for pc to connect. How can I do this with python? I want to create unique file with time and date in filename in filename each time stream starts. Can I do this using udp protocol or what protocol do You suggest me to use? and what modules in python are helpful for this task?
subprocess.call('ffmpeg -y -i udp://192.168.1.2:7777 -acodec copy output.mp3')
P.S. Sorry for my bad English.
-
FFMPEG build for android on ubuntu
23 février 2014, par jamesI am developing a media app which provides support for all video formats for implementing this feature we require FFMPEG the very best library for codecs. Compiling FFMPEG on windows for android is very long battle so I migrated to ubuntu I have almost compiled it shows the the binaries but it gives at last point following message
>AR libpostproc/libpostproc.a AR libswresample/libswresample.a AR libswscale/libswscale.a AR libavcodec/libavcodec.a AR libavutil/libavutil.a INSTALL libavfilter/libavfilter.a INSTALL libavformat/libavformat.a INSTALL libavresample/libavresample.a INSTALL libpostproc/libpostproc.a INSTALL libswresample/libswresample.a INSTALL libswscale/libswscale.a INSTALL libavutil/libavutil.a LD ffmpeg_g INSTALL libavcodec/libavcodec.a CP ffmpeg STRIP ffmpeg skipping strip ffmpeg INSTALL install-progs-yes INSTALL ffmpeg /home/akshay/Desktop/android-ndk-r9c/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-ld: -: unknown option
Here is my script
#!/bin/bash NDK=/home/akshay/Desktop/android-ndk-r9c PLATFORM=$NDK/platforms/android-8/arch-arm PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 PREFIX=./android-ffmpeg function build_one { ./configure --target-os=linux --prefix=$PREFIX \ --enable-cross-compile \ --enable-runtime-cpudetect \ --disable-asm \ --arch=arm \ #--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \ --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \ --disable-stripping \ #--nm=$PREBUILT/bin/arm-linux-androideabi-nm \ --sysroot=$PLATFORM \ --enable-nonfree \ --enable-version3 \ --disable-everything \ --enable-gpl \ --disable-doc \ --enable-avresample \ --enable-demuxer=rtsp \ --enable-muxer=rtsp \ --disable-ffplay \ --disable-ffserver \ --enable-ffmpeg \ --disable-ffprobe \ --enable-encoders \ --enable-decoders \ --enable-protocols \ --enable-hwaccels \ --enable-zlib \ --disable-devices \ --disable-avdevice \ --extra-cflags="-I/home/android-ffmpeg/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" \ --extra-ldflags="-L/home/android-ffmpeg/lib" 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 -L$PREFIX/lib -soname libffmpeg.so -shared - nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavfilter/ libavfilter.a libavresample/libavresample.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.8/libgcc.a } build_one
Please tell me anything wrong in the script
-
ffmpeg and python usage
23 février 2014, par user2063350I have an ffmpeg setup on my pc, which streams mp3 with this code:
ffmpeg -f dshow -i audio="Input device" -c:a libmp3lame -f mpegts udp://192.168.1.2:7777
Also i have a server and I want my python script to run 24/7 on server and start/stop writing stream to mp3 file every time pc get's turned on/off. I need new file every time pc turns on (use time and date for filename for example) to bypass overwriting. Using python's subprocess module and ffmpeg I can save file on my server like this:
subprocess.call('ffmpeg -y -i udp://192.168.1.2:7777 -acodec copy output.mp3')
But I need condition, when to start recording(listen if 7777 port is reciving data or something like that), is it even possible to implement such thing, using python? P.S. Sorry for my bad English.
-
Online video editing server for streaming content
23 février 2014, par netCreateI'm looking for software that will enable me to make online video editing for streaming content. I do have background with FFmpeg (as video multiplying), MLT framework and Red5 as streaming server.
Now what I need to do is to be able to stream online content and modify it - add layers and effects online.
I know how to do this thing offline with Kdenlive or generate MLT scripts. I want to be able to to this online.
What should I do to enable online editing?
-
Issues in integrating ffmpeg with omxil
23 février 2014, par Mayank AgarwalI want to make media player based on OMX IL.I want to use ffmpeg as demuxer.Is there any sample code that shows how to integrate ffmpeg with omxil.Basically i want to give AVFormatContext packets as input to omxil decoder.
Please point me to any docs/sample code.
Regards, Mayank