
Recherche avancée
Médias (1)
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (111)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (8971)
-
ffmpeg conversion x264 [error] : malloc of size 769152 failed
18 décembre 2014, par prashanthpI am trying to convert video recorded from Android smart watch (.mp4 format) to a format (.mp4) which playable on all browsers. The video recorded from smart watch is not playing in the browsers. so, i’ve used ffmpeg to convert in into a playable mp4 format.
But sometimes it is showing error as
x264 [error]: malloc of size 503008 failed
What is the reason for this. Sometimes it’s getting converted and sometimes it is showing error .
Here is the console output.
/usr/local/ffmpeg_build/ffmpeg/bin/ffmpeg -i /home/xestatt1/public_html/app/webroot/mobile/uploads/in/Dec152014161945.mp4 -vcodec libx264 -r 24 -s 352*288 -acodec aac -ab 12k -strict -2 /home/xestatt1/public_html/app/webroot/mobile/uploads/out/ot12.mp4
ffmpeg version 2.5.git Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 13 2014 05:42:08 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-55)
configuration: --prefix=/usr/local/ffmpeg_build/ffmpeg --enable-libx264 --enable-gpl --extra-cflags=-I/usr/local/ffmpeg_build/x264/include --extra-ldflags=-L/usr/local/ffmpeg_build/x264/lib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 14.100 / 56. 14.100
libavformat 56. 15.103 / 56. 15.103
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/xestatt1/public_html/app/webroot/mobile/uploads/in/Dec152014161945.mp4':
Metadata:
major_brand : 3gp4
minor_version : 0
compatible_brands: isom3gp4
creation_time : 2014-12-15 10:50:02
Duration: 00:00:10.12, start: 0.000000, bitrate: 151 kb/s
Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 135 kb/s, 13.14 fps, 50 tbr, 90k tbn, 200 tbc (default)
Metadata:
creation_time : 2014-12-15 10:50:02
handler_name : VideoHandle
encoder :
Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
Metadata:
creation_time : 2014-12-15 10:50:02
handler_name : SoundHandle
File '/home/xestatt1/public_html/app/webroot/mobile/uploads/out/ot12.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0x13b69120] using SAR=12/11
[libx264 @ 0x13b69120] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x13b69120] profile High, level 1.3
[libx264 @ 0x13b69120] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/home/xestatt1/public_html/app/webroot/mobile/uploads/out/ot12.mp4':
Metadata:
major_brand : 3gp4
minor_version : 0
compatible_brands: isom3gp4
encoder : Lavf56.15.103
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 352x288 [SAR 12:11 DAR 4:3], q=-1--1, 24 fps, 12288 tbn, 24 tbc (default)
Metadata:
creation_time : 2014-12-15 10:50:02
handler_name : VideoHandle
encoder : Lavc56.14.100 libx264
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 8000 Hz, mono, fltp, 12 kb/s (default)
Metadata:
creation_time : 2014-12-15 10:50:02
handler_name : SoundHandle
encoder : Lavc56.14.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (amr_nb (amrnb) -> aac (native))
Press [q] to stop, [?] for help
Past duration 1.000000 too large
Multiple frames in a packet from stream 1
Past duration 1.000000 too large
av_interleaved_write_frame(): Cannot allocate memory
x264 [error]: malloc of size 769152 failed
Video encoding failed
[libx264 @ 0x13b69120] frame I:1 Avg QP:22.20 size: 3166
[libx264 @ 0x13b69120] mb I I16..4: 28.3% 70.5% 1.3%
[libx264 @ 0x13b69120] 8x8 transform intra:70.5%
[libx264 @ 0x13b69120] coded y,uvDC,uvAC intra: 47.5% 55.3% 12.4%
[libx264 @ 0x13b69120] i16 v,h,dc,p: 16% 26% 6% 52%
[libx264 @ 0x13b69120] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 19% 15% 12% 3% 3% 3% 5% 16%
[libx264 @ 0x13b69120] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 2% 20% 10% 16% 14% 4% 11% 6%
[libx264 @ 0x13b69120] i8c dc,h,v,p: 61% 17% 19% 4%
[libx264 @ 0x13b69120] kb/s:607.87
[aac @ 0x13b6a4c0] 2 frames left in the queue on closing
Conversion failed!UPDATED
When i execute this from shell it is working fine. But when i create a script file and trying to execute that script file from php , it is showing error’s. I increased the memory limit in php, still it is showing error. Also , we are using ZEND framework. Is there any problems with ZEND ??
-
Webrtc to rtmp using ffmpeg for live streaming from webcam to browsers and mobile
6 février 2017, par Omar SuleimanI am new in live streaming, and i am working on the website to allows user to broadcasting and visitors can watch and listen the video, I use webrtc from webcam and the url is blob, so I can not find the best way to transcode webrtc to rtmp or hls to show the live streaming in the browsers as a flash and on mobile as hls. I dont know from where can i start.
what is the best way for transcoding (ffmpeg or red5 or nginx or what) - like : 1 broadcaster to 1000 viewers can watch and listen and there is many broadcasters also.
what about CPU usage.
I am used asp.net MVC
your help is very appreciated.
Thanks. -
How to build FFMPEG lib with android ndk
27 janvier 2017, par S. Le GalloudecI introduce my problem : I’m a student working on a project asked by a company to my school.
My part is to develop an android application (i have to use c++) who can make an authentication, ask to an api wich camera the client can watch, then display in real time the stream of the IP camera (using RTSP protocol)To be honnest i’m pretty lost. I’ve found the library FFMPEG, wich looks like useful to my project. If i got it right, the library can display a stream from a camera. So i built the library for my project, and then i tried to include it in my program.
I did it the same way i did to include the library curl that i already use.
But when i try to run my program, i got this message :
FAILURE : Build failed with an exception.
-
What went wrong :
Execution failed for task ’:app:externalNativeBuildDebug’.
Build command failed.
Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
[1/1] Linking CXX shared library ../obj/x86/liblecteur.so
FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
/local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/src/main/cpp/lecteur.cpp:19 : error : undefined reference to ’avcodec_configuration’
clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
ninja : build stopped : subcommand failed.Try :
Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.
And i know that the problem comes from my cmakelist, or from my tree. But i don’t see the mistake, so if you could help me. Here is my cmakelist :
cmake_minimum_required(VERSION 3.4.1)
set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)
add_library(lib-curl STATIC IMPORTED)
add_library(ffmpeg SHARED IMPORTED)
set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library( # Sets the name of the library.
downloader
SHARED
src/main/cpp/downloader.cpp
#src/main/cpp/downloader.h
)
add_library( # Sets the name of the library.
getrequest
SHARED
src/main/cpp/getrequest.cpp
#src/main/cpp/getrequest.h
)
add_library( # Sets the name of the library.
lecteur
SHARED
src/main/cpp/lecteur.cpp
#src/main/cpp/lecteur.h
)
target_include_directories(downloader PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(getrequest PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(lecteur PRIVATE
${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)
find_library( # Sets the name of the path variable.
log-lib
log )
target_link_libraries( # Specifies the target library.
downloader
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
getrequest
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
lecteur
ffmpeg
z
${log-lib}
)If you want to understand how i made my cmake, and what looks like my program you can check here : https://github.com/samylegalloudec/android-ndk-ffmepg
Hope i was clear
Best regards
Edit n°1 :
I think i’ve made a mistake in my cmakelist.txt so i fixed it (i guess) this way :
cmake_minimum_required(VERSION 3.4.1)
set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)
add_library(lib-curl STATIC IMPORTED)
set_target_properties(lib-curl PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/curl/lib/${ANDROID_ABI}/libcurl.a)
add_library(ffmpeg-codec STATIC IMPORTED)
set_target_properties(ffmpeg-codec PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavcodec.a)
add_library(ffmpeg-device STATIC IMPORTED)
set_target_properties(ffmpeg-device PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavdevice.a)
add_library(ffmpeg-filter STATIC IMPORTED)
set_target_properties(ffmpeg-filter PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavfilter.a)
add_library(ffmpeg-format STATIC IMPORTED)
set_target_properties(ffmpeg-format PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavformat.a)
add_library(ffmpeg-util STATIC IMPORTED)
set_target_properties(ffmpeg-util PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libavutil.a)
add_library(ffmpeg-postproc STATIC IMPORTED)
set_target_properties(ffmpeg-postproc PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libpostproc.a)
add_library(ffmpeg-sample STATIC IMPORTED)
set_target_properties(ffmpeg-sample PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswresample.a)
add_library(ffmpeg-scale STATIC IMPORTED)
set_target_properties(ffmpeg-scale PROPERTIES IMPORTED_LOCATION ${distribution_DIR}/ffmpeg/${ANDROID_ABI}/lib/libswscale.a)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_library( # Sets the name of the library.
downloader
SHARED
src/main/cpp/downloader.cpp
#src/main/cpp/downloader.h
)
add_library( # Sets the name of the library.
getrequest
SHARED
src/main/cpp/getrequest.cpp
#src/main/cpp/getrequest.h
)
add_library( # Sets the name of the library.
lecteur
SHARED
src/main/cpp/lecteur.cpp
#src/main/cpp/lecteur.h
)
target_include_directories(downloader PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(getrequest PRIVATE
${distribution_DIR}/curl/include)
target_include_directories(lecteur PRIVATE
${distribution_DIR}/ffmpeg/${ANDROID_ABI}/include)
find_library( # Sets the name of the path variable.
log-lib
log )
target_link_libraries( # Specifies the target library.
downloader
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
getrequest
lib-curl
z
${log-lib}
)
target_link_libraries( # Specifies the target library.
lecteur
ffmpeg-codec
ffmpeg-device
ffmpeg-filter
ffmpeg-format
ffmpeg-util
ffmpeg-postproc
ffmpeg-sample
ffmpeg-scale
z
${log-lib}
)Now i have another message :
FAILURE : Build failed with an exception.
-
What went wrong :
Execution failed for task ’:app:externalNativeBuildDebug’.
Build command failed.
Error while executing ’/local/Android/Sdk/cmake/3.6.3155560/bin/cmake’ with arguments —build /local/Bureau/Projet2/videosurveillance/Application_Android/App_Android/app/.externalNativeBuild/cmake/debug/x86 —target lecteur
[1/1] Linking CXX shared library ../obj/x86/liblecteur.so
FAILED : : && /local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target i686-none-linux-android -gcc-toolchain /local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64 —sysroot=/local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,—noexecstack -Wformat -Werror=format-security -fno-exceptions -fno-rtti -std=gnu++11 -O0 -fno-limit-debug-info -Wl,—build-id -Wl,—warn-shared-textrel -Wl,—fatal-warnings -Wl,—no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,liblecteur.so -o ../obj/x86/liblecteur.so CMakeFiles/lecteur.dir/src/main/cpp/lecteur.cpp.o ../../../../../distribution/ffmpeg/x86/lib/libavcodec.a ../../../../../distribution/ffmpeg/x86/lib/libavdevice.a ../../../../../distribution/ffmpeg/x86/lib/libavfilter.a ../../../../../distribution/ffmpeg/x86/lib/libavformat.a ../../../../../distribution/ffmpeg/x86/lib/libavutil.a ../../../../../distribution/ffmpeg/x86/lib/libpostproc.a ../../../../../distribution/ffmpeg/x86/lib/libswresample.a ../../../../../distribution/ffmpeg/x86/lib/libswscale.a -lz /local/Android/Sdk/ndk-bundle/platforms/android-9/arch-x86/usr/lib/liblog.so -lm "/local/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" && :
/local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : warning : shared library text segment is not shareable
/local/Android/Sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld : error : treating warnings as errors
clang++ : error : linker command failed with exit code 1 (use -v to see invocation)
ninja : build stopped : subcommand failed. -
Try :
Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.
-