Recherche avancée

Médias (1)

Mot : - Tags -/framasoft

Autres articles (54)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

Sur d’autres sites (9728)

  • ffmpeg -f sdl works, ffmpeg -c codec -f sdl doesn't

    3 octobre 2022, par lunadir

    running on windows
    
anyone knows why this works

    


    ffmpeg -re -i "sample_itunes.mp4" -an -f sdl2 -


    


    and this doesn't

    


    ffmpeg -re -i "sample_itunes.mp4" -an -c libx264 -f sdl2 -


    


    doesn't show any window, output is

    


    ffmpeg.exe -re -i "sample_itunes.mp4" -an -c libx264 -r 1 -f sdl2 -
ffmpeg version n4.4-79-gde1132a891-20210803 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20210408
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20210803
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample_itunes.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2036-02-06T06:28:16.000000Z
    encoder         : HandBrake 0.10.2 2015060900
  Duration: 00:01:25.50, start: 0.000000, bitrate: 245 kb/s
  Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x480 [SAR 1:1 DAR 4:3], 116 kb/s, 10 fps, 10 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2036-02-06T06:28:16.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, mono, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2036-02-06T06:28:16.000000Z
      handler_name    : Mono
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0000025cce1ab7c0] using SAR=1/1
[libx264 @ 0000025cce1ab7c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000025cce1ab7c0] profile High, level 2.2, 4:2:0, 8-bit
[sdl,sdl2 @ 0000025cce769040] Only supports one rawvideo stream
Output #0, sdl,sdl2, to 'pipe:':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.76.100
  Stream #0:0(und): Video: h264, yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 1 fps, 1 tbn (default)
    Metadata:
      creation_time   : 2036-02-06T06:28:16.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.134.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTSrate=N/A speed=   0x
    Last message repeated 3 times
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTSrate=N/A speed=   0x
    Last message repeated 3 times
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTSrate=N/A speed=   0x
    Last message repeated 4 times
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTSrate=N/A speed=   0x
    Last message repeated 3 times
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTSrate=N/A speed=   0x
    Last message repeated 4 times
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTSrate=N/A speed=   0x
    Last message repeated 3 times
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTSrate=N/A speed=   0x
debug=1
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 4 times
[h264 @ 0000025ccc8fd8c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
[libx264 @ 0000025cce1ab7c0] non-strictly-monotonic PTS
[h264 @ 0000025ccc8fd8c0] slice:1 F mb:0 B fix frame:15 poc:65622/65622 ref:1/1 qp:7 loop:1:0:0 weight:0 SPAT
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
    Last message repeated 8 times
...
frame=   60 fps=8.4 q=25.0 Lsize=N/A time=-00:00:00.10 bitrate=N/A speed=N/A
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (sample_itunes.mp4):
  Input stream #0:0 (video): 74 packets read (22110 bytes); 61 frames decoded;
  Input stream #0:1 (audio): 1 packets read (18 bytes);
  Total: 75 packets (22128 bytes) demuxed
Output file #0 (pipe:):
  Output stream #0:0 (video): 60 frames encoded; 1 packets muxed (866 bytes);
  Total: 1 packets (866 bytes) muxed
61 frames successfully decoded, 0 decoding errors
[libx264 @ 000001d2952aa600] frame I:1     Avg QP: 7.93  size:   866
[libx264 @ 000001d2952aa600] frame P:23    Avg QP:13.48  size:   535
[libx264 @ 000001d2952aa600] frame B:36    Avg QP:10.98  size:    81
[libx264 @ 000001d2952aa600] consecutive B-frames: 16.7% 10.0%  0.0% 73.3%
[libx264 @ 000001d2952aa600] mb I  I16..4: 99.7%  0.1%  0.2%
[libx264 @ 000001d2952aa600] mb P  I16..4:  6.2%  3.1%  0.8%  P16..4:  1.4%  0.4%  0.2%  0.0%  0.0%    skip:88.1%
[libx264 @ 000001d2952aa600] mb B  I16..4:  0.2%  0.0%  0.0%  B16..8:  2.2%  0.2%  0.0%  direct: 0.1%  skip:97.2%  L0:35.9% L1:61.8% BI: 2.3%
[libx264 @ 000001d2952aa600] 8x8 transform intra:21.1% inter:48.3%
[libx264 @ 000001d2952aa600] coded y,uvDC,uvAC intra: 6.7% 1.9% 0.5% inter: 0.2% 0.1% 0.0%
[libx264 @ 000001d2952aa600] i16 v,h,dc,p: 57% 41%  2%  0%
[libx264 @ 000001d2952aa600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 34% 51%  0%  0%  0%  0%  1%  0%
[libx264 @ 000001d2952aa600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 34% 21%  2%  2%  3%  3%  3%  2%
[libx264 @ 000001d2952aa600] i8c dc,h,v,p: 84% 15%  2%  0%
[libx264 @ 000001d2952aa600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001d2952aa600] ref P L0: 84.5%  3.6%  6.3%  5.5%
[libx264 @ 000001d2952aa600] ref B L0: 78.0% 21.2%  0.9%
[libx264 @ 000001d2952aa600] ref B L1: 96.8%  3.2%
[libx264 @ 000001d2952aa600] kb/s:21.46
[AVIOContext @ 000001d29529e780] Statistics: 232272 bytes read, 2 seeks
Conversion failed!


    


  • Hello. I'd like to play a video on my app on android, I tried with videoplayer, it works but doesn't load the video simply open theUI but not thevideo

    26 octobre 2022, par Abdul

    I'd like to play a video on my app on android, I tried with videoplayer, it works but doesn't load the video ( simply open the UI but not the video).

    


    I found out i may need ffpyplayer so I changed buildozer requirements :
requirements = python3,kivy, android,ffpyplayer

    


    but buildozer failed to build apk when i added ffpyplayer and ffmpeg in buildozer.spec file in requirement.

    


    [DEBUG]:    If you think configure made a mistake, make sure you are using the latest&#xA;[DEBUG]:    version from Git.  If the latest version fails, report the problem to the&#xA;[DEBUG]:    ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.&#xA;[DEBUG]:    Include the log file "ffbuild/config.log" produced by configure as this will help&#xA;[DEBUG]:    solve the problem.&#xA;Exception in thread background thread for pid 77802:&#xA;Traceback (most recent call last):&#xA;  File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner&#xA;    self.run()&#xA;  File "/usr/lib/python3.7/threading.py", line 870, in run&#xA;    self._target(*self._args, **self._kwargs)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 1641, in wrap&#xA;    fn(*rgs, **kwargs)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2569, in background_thread&#xA;    handle_exit_code(exit_code)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2269, in fn&#xA;    return self.command.handle_command_exit_code(exit_code)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 869, in handle_command_exit_code&#xA;    raise exc&#xA;sh.ErrorReturnCode_1: &#xA;&#xA;  RAN: /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-gpl --enable-libx264 --enable-libshine --enable-libvpx --enable-parsers --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls,udp,tcp --enable-small --enable-hwaccels --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --sysroot=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg&#xA;&#xA;  STDOUT:&#xA;tput: No value for $TERM and no -T specified&#xA;tput: No value for $TERM and no -T specified&#xA;armv7a-linux-androideabi21-clang is unable to create an executable file.&#xA;C compiler test failed.&#xA;&#xA;If you think configure made a mistake, make sure you are using the latest&#xA;version from Git.  If the latest version fails, report the problem to the&#xA;ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.&#xA;Include the log file "ffbuild/config.log" produced by configure as this will help&#xA;solve the problem.&#xA;&#xA;&#xA;  STDERR:&#xA;&#xA;&#xA;Traceback (most recent call last):&#xA;  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main&#xA;    "__main__", mod_spec)&#xA;  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code&#xA;    exec(code, run_globals)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1297, in <module>&#xA;    main()&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main&#xA;    ToolchainCL()&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 730, in __init__&#xA;    getattr(self, command)(args)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 153, in wrapper_func&#xA;    build_dist_from_args(ctx, dist, args)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 215, in build_dist_from_args&#xA;    args, "ignore_setup_py", False&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 505, in build_recipes&#xA;    recipe.build_arch(arch)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/ffmpeg/__init__.py", line 143, in build_arch&#xA;    shprint(configure, *flags, _env=env)&#xA;  File "/content/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint&#xA;    for line in output:&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 915, in next&#xA;    self.wait()&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 845, in wait&#xA;    self.handle_command_exit_code(exit_code)&#xA;  File "/usr/local/lib/python3.7/dist-packages/sh.py", line 869, in handle_command_exit_code&#xA;    raise exc&#xA;sh.ErrorReturnCode_1: &#xA;&#xA;  RAN: /content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg/configure --disable-everything --enable-openssl --enable-nonfree --enable-protocol=https,tls_openssl --enable-gpl --enable-libx264 --enable-libshine --enable-libvpx --enable-parsers --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --disable-symver --disable-programs --disable-doc --enable-filter=aresample,resample,crop,adelay,volume,scale --enable-protocol=file,http,hls,udp,tcp --enable-small --enable-hwaccels --enable-pic --disable-static --disable-debug --enable-shared --target-os=android --enable-cross-compile --cross-prefix=armv7a-linux-androideabi21- --arch=arm --strip=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --sysroot=/root/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot --enable-neon --prefix=/content/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/ffmpeg/armeabi-v7a__ndk_target_21/ffmpeg&#xA;&#xA;  STDOUT:&#xA;tput: No value for $TERM and no -T specified&#xA;tput: No value for $TERM and no -T specified&#xA;armv7a-linux-androideabi21-clang is unable to create an executable file.&#xA;C compiler test failed.&#xA;&#xA;If you think configure made a mistake, make sure you are using the latest&#xA;version from Git.  If the latest version fails, report the problem to the&#xA;ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.&#xA;Include the log file "ffbuild/config.log" produced by configure as this will help&#xA;solve the problem.&#xA;&#xA;&#xA;  STDERR:&#xA;&#xA;# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,ffpyplayer,kivy,openssl,certifi,android,pytube,plyer,pyjnius,kivmob,jnius,future,libshine,libx264,ffpyplayer_codecs,Pillow,liblzma,opencv,requests,urllib3,chardet,idna,youtube_search --arch armeabi-v7a --copy-libs --color=always --storage-dir="/content/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug&#xA;# ENVIRONMENT:&#xA;#     NV_LIBCUBLAS_DEV_VERSION = &#x27;11.4.1.1043-1&#x27;&#xA;#     NV_CUDA_COMPAT_PACKAGE = &#x27;cuda-compat-11-2&#x27;&#xA;#     NV_CUDNN_PACKAGE_DEV = &#x27;libcudnn8-dev=8.1.1.33-1&#x2B;cuda11.2&#x27;&#xA;#     PYDEVD_USE_FRAME_EVAL = &#x27;NO&#x27;&#xA;#     LD_LIBRARY_PATH = &#x27;/usr/local/nvidia/lib:/usr/local/nvidia/lib64&#x27;&#xA;#     NV_LIBNCCL_DEV_PACKAGE = &#x27;libnccl-dev=2.8.4-1&#x2B;cuda11.2&#x27;&#xA;#     TCLLIBPATH = &#x27;/usr/share/tcltk/tcllib1.19&#x27;&#xA;#     CLOUDSDK_PYTHON = &#x27;python3&#x27;&#xA;#     LANG = &#x27;en_US.UTF-8&#x27;&#xA;#     NV_LIBNPP_DEV_PACKAGE = &#x27;libnpp-dev-11-2=11.3.2.152-1&#x27;&#xA;#     ENABLE_DIRECTORYPREFETCHER = &#x27;1&#x27;&#xA;#     HOSTNAME = &#x27;875ade0bb031&#x27;&#xA;#     OLDPWD = &#x27;/&#x27;&#xA;#     CLOUDSDK_CONFIG = &#x27;/content/.config&#x27;&#xA;#     USE_AUTH_EPHEM = &#x27;1&#x27;&#xA;#     NV_LIBNPP_VERSION = &#x27;11.3.2.152-1&#x27;&#xA;#     NV_NVPROF_DEV_PACKAGE = &#x27;cuda-nvprof-11-2=11.2.152-1&#x27;&#xA;#     NVIDIA_VISIBLE_DEVICES = &#x27;all&#x27;&#xA;#     NV_NVPROF_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     NV_LIBCUSPARSE_VERSION = &#x27;11.4.1.1152-1&#x27;&#xA;#     DATALAB_SETTINGS_OVERRIDES = &#x27;{"kernelManagerProxyPort":6000,"kernelManagerProxyHost":"172.28.0.3","jupyterArgs":["--ip=172.28.0.2"],"debugAdapterMultiplexerPath":"/usr/local/bin/dap_multiplexer","enableLsp":true}&#x27;&#xA;#     NV_LIBCUBLAS_DEV_PACKAGE = &#x27;libcublas-dev-11-2=11.4.1.1043-1&#x27;&#xA;#     ENV = &#x27;/root/.bashrc&#x27;&#xA;#     PAGER = &#x27;cat&#x27;&#xA;#     NCCL_VERSION = &#x27;2.8.4-1&#x27;&#xA;#     TF_FORCE_GPU_ALLOW_GROWTH = &#x27;true&#x27;&#xA;#     JPY_PARENT_PID = &#x27;60&#x27;&#xA;#     NO_GCE_CHECK = &#x27;False&#x27;&#xA;#     PWD = &#x27;/content&#x27;&#xA;#     NVARCH = &#x27;x86_64&#x27;&#xA;#     NV_LIBCUSPARSE_DEV_VERSION = &#x27;11.4.1.1152-1&#x27;&#xA;#     HOME = &#x27;/root&#x27;&#xA;#     KMP_LISTEN_PORT = &#x27;6000&#x27;&#xA;#     LAST_FORCED_REBUILD = &#x27;20221021&#x27;&#xA;#     CLICOLOR = &#x27;1&#x27;&#xA;#     NV_LIBNCCL_PACKAGE_VERSION = &#x27;2.8.4-1&#x27;&#xA;#     NV_LIBNCCL_PACKAGE = &#x27;libnccl2=2.8.4-1&#x2B;cuda11.2&#x27;&#xA;#     DEBIAN_FRONTEND = &#x27;noninteractive&#x27;&#xA;#     NV_LIBNCCL_DEV_PACKAGE_NAME = &#x27;libnccl-dev&#x27;&#xA;#     NV_CUDA_LIB_VERSION = &#x27;11.2.2-1&#x27;&#xA;#     NV_LIBNPP_PACKAGE = &#x27;libnpp-11-2=11.3.2.152-1&#x27;&#xA;#     NV_LIBNCCL_PACKAGE_NAME = &#x27;libnccl2&#x27;&#xA;#     LIBRARY_PATH = &#x27;/usr/local/cuda/lib64/stubs&#x27;&#xA;#     NV_NVTX_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     NV_LIBCUBLAS_VERSION = &#x27;11.4.1.1043-1&#x27;&#xA;#     NV_LIBCUBLAS_PACKAGE = &#x27;libcublas-11-2=11.4.1.1043-1&#x27;&#xA;#     GCE_METADATA_TIMEOUT = &#x27;3&#x27;&#xA;#     NV_CUDNN_VERSION = &#x27;8.1.1.33&#x27;&#xA;#     VM_GCE_METADATA_HOST = &#x27;169.254.169.254&#x27;&#xA;#     NV_CUDA_CUDART_DEV_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     KMP_TARGET_PORT = &#x27;9000&#x27;&#xA;#     GLIBCPP_FORCE_NEW = &#x27;1&#x27;&#xA;#     TBE_CREDS_ADDR = &#x27;172.28.0.1:8008&#x27;&#xA;#     TERM = &#x27;xterm-color&#x27;&#xA;#     SHELL = &#x27;/bin/bash&#x27;&#xA;#     GCS_READ_CACHE_BLOCK_SIZE_MB = &#x27;16&#x27;&#xA;#     NV_NVML_DEV_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     PYTHONWARNINGS = &#x27;ignore:::pip._internal.cli.base_command&#x27;&#xA;#     MPLBACKEND = &#x27;module://ipykernel.pylab.backend_inline&#x27;&#xA;#     CUDA_VERSION = &#x27;11.2.2&#x27;&#xA;#     NV_LIBCUBLAS_PACKAGE_NAME = &#x27;libcublas-11-2&#x27;&#xA;#     NVIDIA_DRIVER_CAPABILITIES = &#x27;compute,utility&#x27;&#xA;#     TBE_RUNTIME_ADDR = &#x27;172.28.0.1:8011&#x27;&#xA;#     SHLVL = &#x27;1&#x27;&#xA;#     PYTHONPATH = &#x27;/env/python&#x27;&#xA;#     NV_LIBCUBLAS_DEV_PACKAGE_NAME = &#x27;libcublas-dev-11-2&#x27;&#xA;#     NVIDIA_REQUIRE_CUDA = (&#x27;cuda>=11.2 brand=tesla,driver>=418,driver&lt;419 &#x27;&#xA; &#x27;brand=tesla,driver>=450,driver&lt;451&#x27;)&#xA;#     NV_LIBNPP_DEV_VERSION = &#x27;11.3.2.152-1&#x27;&#xA;#     TBE_EPHEM_CREDS_ADDR = &#x27;172.28.0.1:8009&#x27;&#xA;#     NV_CUDA_CUDART_VERSION = &#x27;11.2.152-1&#x27;&#xA;#     NV_CUDNN_PACKAGE_NAME = &#x27;libcudnn8&#x27;&#xA;#     GLIBCXX_FORCE_NEW = &#x27;1&#x27;&#xA;#     PATH = &#x27;/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin&#x27;&#xA;#     NV_LIBNCCL_DEV_PACKAGE_VERSION = &#x27;2.8.4-1&#x27;&#xA;#     LD_PRELOAD = &#x27;/usr/lib/x86_64-linux-gnu/libtcmalloc.so.4&#x27;&#xA;#     NV_CUDNN_PACKAGE = &#x27;libcudnn8=8.1.1.33-1&#x2B;cuda11.2&#x27;&#xA;#     GIT_PAGER = &#x27;cat&#x27;&#xA;#     _ = &#x27;/usr/local/bin/buildozer&#x27;&#xA;#     PACKAGES_PATH = &#x27;/root/.buildozer/android/packages&#x27;&#xA;#     ANDROIDSDK = &#x27;/root/.buildozer/android/platform/android-sdk&#x27;&#xA;#     ANDROIDNDK = &#x27;/root/.buildozer/android/platform/android-ndk-r23b&#x27;&#xA;#     ANDROIDAPI = &#x27;30&#x27;&#xA;#     ANDROIDMINAPI = &#x27;21&#x27;&#xA;# &#xA;# Buildozer failed to execute the last command&#xA;# The error might be hidden in the log above this error&#xA;# Please read the full log, and search for it before&#xA;# raising an issue with buildozer itself.&#xA;# In case of a bug report, please add a full log with log_level = 2&#xA;</module>

    &#xA;

    kindly help me anyone would be very appreciate thank you.

    &#xA;

  • How to use (django-celery,RQ) worker to execute a video filetype conversion (ffmpeg) in django on heroku (My code works locally)

    15 janvier 2013, par GetItDone

    One part of my website includes a form that allows users to upload video. I use ffmpeg to convert the video to flv. My media and static files are stored on Amazon S3. I can get everything to work perfectly locally, however I can't seem to figure out how to use a worker to run the video conversion subprocess in production. I have dj-celery and rq installed in my app. The code in my view that I was able to get to work locally is :

    #views.py
    def upload_broadcast(request):
       if request.method == &#39;POST&#39;:
           form = VideoUploadForm(request.POST, request.FILES)
           if form.is_valid():
               new_video=form.save()
               def convert_to_flv(video):
                   filename = video.video_upload
                   sourcefile = "%s%s" % (settings.MEDIA_ROOT, filename)
                   flvfilename = "%s.flv" % video.id
                   imagefilename = "%s.png" % video.id
                   thumbnailfilename = "%svideos/flv/%s" % (settings.MEDIA_ROOT, imagefilename)
                   targetfile = "%svideos/flv/%s" % (settings.MEDIA_ROOT, flvfilename)
                   ffmpeg = "ffmpeg -i %s -acodec mp3 -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
                   grabimage = "ffmpeg -y -i %s -vframes 1 -ss 00:00:02 -an -vcodec png -f rawvideo -s 320x240 %s" % (sourcefile, thumbnailfilename)
                   print ("SOURCE: %s" % sourcefile)
                   print ("TARGET: %s" % targetfile)
                   print ("TARGET IMAGE: %s" % thumbnailfilename)
                   print ("FFMPEG TASK CODE: %s" % ffmpeg)
                   print ("IMAGE TASK CODE: %s" % grabimage)
                   try:
                       ffmpegresult = subprocess.call(ffmpeg)
                       print "---------------FFMPEG---------------"
                       print ffmpegresult
                   except:
                       print "Not working."
                   try:
                       videothumbnail = subprocess.call(grabimage)
                       print "---------------IMAGE---------------"
                       print videothumbnail
                   except:
                       print "Not working."
                   video.flvfilename = flvfilename
                   video.videothumbnail = imagefilename
                   video.save()

               convert_to_flv(new_video)

               return HttpResponseRedirect(&#39;/video_list/&#39;)
       else:
    ...

    This is my first time trying to use a worker (or ever pushing a project to production), so even with the documentation it is still unclear to me what I need to do. I have tried several different things but nothing seems to work. Is there just a simple way to tell celery to run the ffmpegresult = subprocess.call(ffmpeg) ? Thanks in advance for any help or insight.

    EDIT- Added heroku logs

    2013-01-10T20:58:57+00:00 app[web.1]: TARGET: /media/videos/flv/8.flv
    2013-01-10T20:58:57+00:00 app[web.1]: IMAGE TASK CODE: ffmpeg -y -i /media/videos/practice.wmv -vframes 1 -ss 00:00:02 - an -vcodec png -f rawvideo -s 320x240 /media/videos/flv/8.png
    2013-01-10T20:58:57+00:00 app[web.1]: SOURCE: /media/videos/practice.wmv
    2013-01-10T20:58:57+00:00 app[web.1]: FFMPEG TASK CODE: ffmpeg -i /media/videos/practice.wmv -acodec mp3 -ar 22050 -f fl v -s 320x240 /media/videos/flv/8.flv
    2013-01-10T20:58:57+00:00 app[web.1]: TARGET IMAGE: /media/videos/flv/8.png
    2013-01-10T20:58:57+00:00 app[web.1]: Not working.
    2013-01-10T20:58:57+00:00 app[web.1]: Not working.

    NEWER EDIT

    I tried adding a tasks.py and added the task :

    celery = Celery(&#39;tasks&#39;, broker=&#39;redis://guest@localhost//&#39;)

    @celery.task
    def ffmpeg_task(video):
       converted_file = subprocess.call(video)
       return converted_file

    then I changed the relevant section of my view to :

    ...
    try:
       ffmpeg_task.delay(ffmpeg)
       print "---------------FFMPEG---------------"
       print ffmpegresult
    except:
       print "Not working."
    ...

    My new logs are :

    2013-01-15T13:19:52+00:00 app[web.1]: TARGET IMAGE: /media/videos/flv/12.png
    2013-01-15T13:19:52+00:00 app[web.1]: SOURCE: /media/videos/practice.wmv
    2013-01-15T13:19:52+00:00 app[web.1]: FFMPEG TASK CODE: ffmpeg -i /media/videos/practice.wmv -acodec mp3 -ar 22050 -f fl v -s 320x240 /media/videos/flv/12.flv
    2013-01-15T13:19:52+00:00 app[web.1]: IMAGE TASK CODE: ffmpeg -y -i /media/videos/practice.wmv -vframes 1 -ss 00:00:02 -an -vcodec png -f rawvideo -s 320x240 /media/videos/flv/12.png
    2013-01-15T13:19:52+00:00 app[web.1]: TARGET: /media/videos/flv/12.flv
    2013-01-15T13:20:17+00:00 app[web.1]: 2013-01-15 13:20:17 [2] [CRITICAL] WORKER TIMEOUT (pid:12)
    2013-01-15T13:20:17+00:00 app[web.1]: 2013-01-15 13:20:17 [2] [CRITICAL] WORKER TIMEOUT (pid:12)
    2013-01-15T13:20:17+00:00 app[web.1]: 2013-01-15 13:20:17 [19] [INFO] Booting worker with pid: 19

    Am I completely missing something ? I'll keep trying, but will be very appreciative of any direction or assistance.