Recherche avancée

Médias (0)

Mot : - Tags -/page unique

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (17)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

Sur d’autres sites (5798)

  • MediaElement ffmpeg windows 8.1 [on hold]

    30 mai 2014, par user3084145

    how can in read an ffmpeg stream in windows 8.1 app
    i’ve tryed with MediaElement but didn’t work

  • FileNotFoundError : [WinError 2] The system cannot find the file specified - FFMPEG

    5 avril 2024, par shiftyscales

    I am running a script using conda environment on Windows and getting this error (stack trace below), which is apparently caused by python executable not being able to find the ffmpeg.exe. There are numerous questions about this, but none of the solutions unfortunately worked for me, so I hope someone has fresh ideas.

    


    What I tried :

    


      

    • conda install -c conda-forge ffmpeg (after this I can run ffmpeg in command line, but still getting the error)
    • 


    • pip install ffmpeg-python
    • 


    • Added the folder where ffmpeg.exe is located in conda env to the Windows Path as well as to sys.path in python.
    • 


    • copied the same ffmpeg.exe a) to the location of python.exe in conda env, b) to the location of the script I am running, c) to the location of subprocess.py.
    • 


    • Downloaded ffmpeg windows binary and repeated the last two steps with that file.
    • 


    


    Is there anything else that I can try to make it work ?

    


    ---------------------------------------------------------------------------&#xA;FileNotFoundError                         Traceback (most recent call last)&#xA;Cell In[10], line 22&#xA;     19 truncate_second = 8.2         # Video end = start_second &#x2B; truncate_second&#xA;     21 # Extract Video CAVP Features &amp; New Video Path:&#xA;---> 22 cavp_feats, new_video_path = extract_cavp(video_path, start_second, truncate_second, tmp_path=tmp_path)&#xA;&#xA;File D:\Software\Anaconda\envs\diff_foley\Lib\site-packages\torch\nn\modules\module.py:1518, in Module._wrapped_call_impl(self, *args, **kwargs)&#xA;   1516     return self._compiled_call_impl(*args, **kwargs)  # type: ignore[misc]&#xA;   1517 else:&#xA;-> 1518     return self._call_impl(*args, **kwargs)&#xA;&#xA;File D:\Software\Anaconda\envs\diff_foley\Lib\site-packages\torch\nn\modules\module.py:1527, in Module._call_impl(self, *args, **kwargs)&#xA;   1522 # If we don&#x27;t have any hooks, we want to skip the rest of the logic in&#xA;   1523 # this function, and just call forward.&#xA;   1524 if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks or self._forward_pre_hooks&#xA;   1525         or _global_backward_pre_hooks or _global_backward_hooks&#xA;   1526         or _global_forward_hooks or _global_forward_pre_hooks):&#xA;-> 1527     return forward_call(*args, **kwargs)&#xA;   1529 try:&#xA;   1530     result = None&#xA;&#xA;File D:\Software\Anaconda\envs\diff_foley\Lib\site-packages\torch\utils\_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)&#xA;    112 @functools.wraps(func)&#xA;    113 def decorate_context(*args, **kwargs):&#xA;    114     with ctx_factory():&#xA;--> 115         return func(*args, **kwargs)&#xA;&#xA;File D:\Work\DIff-Foley\Diff-Foley\inference\demo_util.py:131, in Extract_CAVP_Features.forward(self, video_path, start_second, truncate_second, tmp_path)&#xA;    129 print("truncate second: ", truncate_second)&#xA;    130 # Load the video, change fps:&#xA;--> 131 video_path_low_fps = reencode_video_with_diff_fps(video_path, self.tmp_path, self.fps, start_second, truncate_second)&#xA;    132 video_path_high_fps = reencode_video_with_diff_fps(video_path, self.tmp_path, 21.5, start_second, truncate_second)&#xA;    134 # read the video:&#xA;&#xA;File D:\Work\DIff-Foley\Diff-Foley\inference\demo_util.py:42, in reencode_video_with_diff_fps(video_path, tmp_path, extraction_fps, start_second, truncate_second)&#xA;     31 def reencode_video_with_diff_fps(video_path: str, tmp_path: str, extraction_fps: int, start_second, truncate_second) -> str:&#xA;     32     &#x27;&#x27;&#x27;Reencodes the video given the path and saves it to the tmp_path folder.&#xA;     33 &#xA;     34     Args:&#xA;   (...)&#xA;     40         str: The path where the tmp file is stored. To be used to load the video from&#xA;     41     &#x27;&#x27;&#x27;&#xA;---> 42     assert which_ffmpeg() != &#x27;&#x27;, &#x27;Is ffmpeg installed? Check if the conda environment is activated.&#x27;&#xA;     43     # assert video_path.endswith(&#x27;.mp4&#x27;), &#x27;The file does not end with .mp4. Comment this if expected&#x27;&#xA;     44     # create tmp dir if doesn&#x27;t exist&#xA;     45     os.makedirs(tmp_path, exist_ok=True)&#xA;&#xA;File D:\Work\DIff-Foley\Diff-Foley\inference\demo_util.py:26, in which_ffmpeg()&#xA;     20 def which_ffmpeg() -> str:&#xA;     21     &#x27;&#x27;&#x27;Determines the path to ffmpeg library&#xA;     22 &#xA;     23     Returns:&#xA;     24         str -- path to the library&#xA;     25     &#x27;&#x27;&#x27;&#xA;---> 26     result = subprocess.run([&#x27;which&#x27;, &#x27;ffmpeg&#x27;], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)&#xA;     27     ffmpeg_path = result.stdout.decode(&#x27;utf-8&#x27;).replace(&#x27;\n&#x27;, &#x27;&#x27;)&#xA;     28     return ffmpeg_path&#xA;&#xA;File D:\Software\Anaconda\envs\diff_foley\Lib\subprocess.py:548, in run(input, capture_output, timeout, check, *popenargs, **kwargs)&#xA;    545     kwargs[&#x27;stdout&#x27;] = PIPE&#xA;    546     kwargs[&#x27;stderr&#x27;] = PIPE&#xA;--> 548 with Popen(*popenargs, **kwargs) as process:&#xA;    549     try:&#xA;    550         stdout, stderr = process.communicate(input, timeout=timeout)&#xA;&#xA;File D:\Software\Anaconda\envs\diff_foley\Lib\subprocess.py:1026, in Popen.__init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize, process_group)&#xA;   1022         if self.text_mode:&#xA;   1023             self.stderr = io.TextIOWrapper(self.stderr,&#xA;   1024                     encoding=encoding, errors=errors)&#xA;-> 1026     self._execute_child(args, executable, preexec_fn, close_fds,&#xA;   1027                         pass_fds, cwd, env,&#xA;   1028                         startupinfo, creationflags, shell,&#xA;   1029                         p2cread, p2cwrite,&#xA;   1030                         c2pread, c2pwrite,&#xA;   1031                         errread, errwrite,&#xA;   1032                         restore_signals,&#xA;   1033                         gid, gids, uid, umask,&#xA;   1034                         start_new_session, process_group)&#xA;   1035 except:&#xA;   1036     # Cleanup if the child failed starting.&#xA;   1037     for f in filter(None, (self.stdin, self.stdout, self.stderr)):&#xA;&#xA;File D:\Software\Anaconda\envs\diff_foley\Lib\subprocess.py:1538, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_gid, unused_gids, unused_uid, unused_umask, unused_start_new_session, unused_process_group)&#xA;   1536 # Start the process&#xA;   1537 try:&#xA;-> 1538     hp, ht, pid, tid = _winapi.CreateProcess(executable, args,&#xA;   1539                              # no special security&#xA;   1540                              None, None,&#xA;   1541                              int(not close_fds),&#xA;   1542                              creationflags,&#xA;   1543                              env,&#xA;   1544                              cwd,&#xA;   1545                              startupinfo)&#xA;   1546 finally:&#xA;   1547     # Child is launched. Close the parent&#x27;s copy of those pipe&#xA;   1548     # handles that only the child should have open.  You need&#xA;   (...)&#xA;   1551     # pipe will not close when the child process exits and the&#xA;   1552     # ReadFile will hang.&#xA;   1553     self._close_pipe_fds(p2cread, p2cwrite,&#xA;   1554                          c2pread, c2pwrite,&#xA;   1555                          errread, errwrite)&#xA;&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;</locals>

    &#xA;

  • Cant link against ffmpeg static build

    24 mars 2017, par David Barishev

    I have build ffmpeg libraries statically for x86 android using a custom configuration.Now i wanted to add them in my android project.

    Im using ffmpeg 3.2.git, android studio 2.3.

    I created a folder named distribution which had my binaries, and the minimum headers i needed for it to not tell me about missing header (Except for the avutil- i just included them all), located the root of my project.
    Here is a file tree :

    distribution
    ├── libavcodec
    │   ├── lib
    │   │   └── x86
    │   │       └── libavcodec.a
    │   ├── avcodec.h
    │   └── version.h
    ├── libavfilter
    │   ├── lib
    │   │   └── x86
    │   │       └── libavfilter.a
    │   ├── avfiltergraph.h
    │   └── avfilter.h
    ├── libavformat
    │   ├── lib
    │   │   └── x86
    │   │       └── libavformat.a
    │   ├── avformat.h
    │   ├── avio.h
    │   └── version.h
    ├── libavutil
    │   ├── lib
    │   │   └── x86
    │   │       └── libavutil.a
    │   ├── attributes.h
    │   ├── avconfig.h
    │   ├── avutil.h
    │   ├── buffer.h
    │   ├── buffer_internal.h
    │   ├── camellia.h
    │   ├── cast5.h
    │   ├── channel_layout.h
    │   ├── colorspace.h
    │   ├── color_utils.h
    │   ├── common.h
    │   ├── cpu.h
    │   ├── cpu_internal.h
    │   ├── crc.h
    │   ├── des.h
    │   ├── dict.h
    │   ├── display.h
    │   ├── downmix_info.h
    │   ├── dynarray.h
    │   ├── error.h
    │   ├── eval.h
    │   ├── ffmath.h
    │   ├── ffversion.h
    │   ├── fifo.h
    │   ├── file.h
    │   ├── fixed_dsp.h
    │   ├── float_dsp.h
    │   ├── frame.h
    │   ├── hash.h
    │   ├── hmac.h
    │   ├── hwcontext_cuda.h
    │   ├── hwcontext_cuda_internal.h
    │   ├── hwcontext_dxva2.h
    │   ├── hwcontext.h
    │   ├── hwcontext_internal.h
    │   ├── hwcontext_qsv.h
    │   ├── hwcontext_vaapi.h
    │   ├── hwcontext_vdpau.h
    │   ├── imgutils.h
    │   ├── integer.h
    │   ├── internal.h
    │   ├── intfloat.h
    │   ├── intmath.h
    │   ├── intreadwrite.h
    │   ├── lfg.h
    │   ├── libm.h
    │   ├── lls.h
    │   ├── log.h
    │   ├── lzo.h
    │   ├── macros.h
    │   ├── mastering_display_metadata.h
    │   ├── mathematics.h
    │   ├── md5.h
    │   ├── mem.h
    │   ├── mem_internal.h
    │   ├── motion_vector.h
    │   ├── murmur3.h
    │   ├── opencl.h
    │   ├── opencl_internal.h
    │   ├── opt.h
    │   ├── parseutils.h
    │   ├── pca.h
    │   ├── pixdesc.h
    │   ├── pixelutils.h
    │   ├── pixfmt.h
    │   ├── qsort.h
    │   ├── random_seed.h
    │   ├── rational.h
    │   ├── rc4.h
    │   ├── replaygain.h
    │   ├── reverse.h
    │   ├── ripemd.h
    │   ├── samplefmt.h
    │   ├── sha512.h
    │   ├── sha.h
    │   ├── softfloat.h
    │   ├── softfloat_ieee754.h
    │   ├── softfloat_tables.h
    │   ├── spherical.h
    │   ├── stereo3d.h
    │   ├── tablegen.h
    │   ├── tea.h
    │   ├── thread.h
    │   ├── threadmessage.h
    │   ├── timecode.h
    │   ├── time.h
    │   ├── time_internal.h
    │   ├── timer.h
    │   ├── timestamp.h
    │   ├── tree.h
    │   ├── twofish.h
    │   └── version.h
    └── libswresample
       ├── lib
       │   └── x86
       │       └── libswresample.a
       ├── swresample.h
       └── swresample_internal.h

    I edited my cmake to include the libraries :

    add_library(
            native-lib
            SHARED
            src/main/cpp/native-lib.cpp )

    set(distribution_DIR ${CMAKE_SOURCE_DIR}/../distribution)

    add_library(lib_avcodec STATIC IMPORTED)
    set_target_properties(lib_avcodec PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/libavcodec/lib/${ANDROID_ABI}/libavcodec.a)

    add_library(lib_avfilter STATIC IMPORTED)
    set_target_properties(lib_avfilter PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/libavfilter/lib/${ANDROID_ABI}/libavfilter.a)

    add_library(lib_avformat STATIC IMPORTED)
    set_target_properties(lib_avformat PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/libavformat/lib/${ANDROID_ABI}/libavformat.a)

    add_library(lib_avutil STATIC IMPORTED)
    set_target_properties(lib_avutil PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/libavutil/lib/${ANDROID_ABI}/libavutil.a)

    add_library(lib_swresample STATIC IMPORTED)
    set_target_properties(lib_swresample PROPERTIES IMPORTED_LOCATION
       ${distribution_DIR}/libswresample/lib/${ANDROID_ABI}/libswresample.a)


    include_directories(
                             ${distribution_DIR}
                             )


    target_link_libraries(
                          native-lib

                          lib_avcodec
                          lib_avfilter
                          lib_avformat
                          lib_avutil
                          lib_swresample
                           )

    I also restricted the build to only x86, in my app build.gradle :

    ndk {
               // Specifies the ABI configurations of your native
               // libraries Gradle should build and package with your APK.
               abiFilters 'x86'
       }

    The project gradle sync worked successfully.
    I wrote the following code in my cpp file :

    #include


    extern "C"{
       #include "libavformat/avformat.h"
    }
    JNIEXPORT void JNICALL
    Java_com_example_david_testffmpegcpp_MainActivity_stringFromJNI(
           JNIEnv *env,
           jobject /* this */) {

       av_register_all ();
       avformat_network_init ();


    }

    Just to check if the library works, but i cant seem to link against the libraries correctly. It complains about undefined symbols.
    What did i do wrong ?

    Error :

    [2/2] Linking CXX shared library

    ..\..\..\..\build\intermediates\cmake\debug\obj\x86\libnative-lib.so
    FAILED: cmd.exe /C "cd . &amp;&amp; D:\AndroidSDK\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe  --target=i686-none-linux-android --gcc-toolchain=D:/AndroidSDK/ndk-bundle/toolchains/x86-4.9/prebuilt/windows-x86_64 --sysroot=D:/AndroidSDK/ndk-bundle/platforms/android-16/arch-x86 -fPIC -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security  -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,--noexecstack -Wformat -Werror=format-security   -O0 -fno-limit-debug-info -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 -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,libnative-lib.so -o ..\..\..\..\build\intermediates\cmake\debug\obj\x86\libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o  -llog ../../../../../distribution/libavcodec/lib/x86/libavcodec.a ../../../../../distribution/libavfilter/lib/x86/libavfilter.a ../../../../../distribution/libavformat/lib/x86/libavformat.a ../../../../../distribution/libavutil/lib/x86/libavutil.a ../../../../../distribution/libswresample/lib/x86/libswresample.a -lm "D:/AndroidSDK/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a" &amp;&amp; cd ."
    src/libavformat/allformats.c:51: error: undefined reference to 'avcodec_register_all'
     src/libavformat/id3v2.c:1009: error: undefined reference to 'uncompress'
     src/libavformat/id3v2.c:1153: error: undefined reference to 'av_init_packet'
     src/libavformat/matroskadec.c:1393: error: undefined reference to 'inflateInit_'
     src/libavformat/matroskadec.c:1408: error: undefined reference to 'inflate'
     src/libavformat/matroskadec.c:1401: error: undefined reference to 'inflateEnd'
     src/libavformat/matroskadec.c:1411: error: undefined reference to 'inflateEnd'
     src/libavformat/matroskadec.c:3113: error: undefined reference to 'av_new_packet'
     src/libavformat/matroskadec.c:3134: error: undefined reference to 'av_packet_new_side_data'
     src/libavformat/matroskadec.c:2855: error: undefined reference to 'av_new_packet'
     src/libavformat/matroskadec.c:3147: error: undefined reference to 'av_packet_new_side_data'
     src/libavformat/matroskadec.c:3022: error: undefined reference to 'av_new_packet'
     src/libavformat/matroskadec.c:3031: error: undefined reference to 'av_packet_new_side_data'
     src/libavformat/matroskadec.c:3042: error: undefined reference to 'av_packet_new_side_data'
     src/libavformat/matroskadec.c:3151: error: undefined reference to 'av_packet_unref'
     src/libavformat/matroskadec.c:2680: error: undefined reference to 'av_packet_unref'
     src/libavformat/matroskadec.c:963: error: undefined reference to 'av_fast_padded_malloc'
     src/libavformat/matroskadec.c:2163: error: undefined reference to 'av_get_codec_tag_string'
     src/libavformat/matroskadec.c:2680: error: undefined reference to 'av_packet_unref'
     src/libavformat/matroskadec.c:2579: error: undefined reference to 'av_init_packet'
     src/libavformat/matroskadec.c:2580: error: undefined reference to 'av_new_packet'
     src/libavformat/matroskadec.c:1715: error: undefined reference to 'avpriv_mpeg4audio_sample_rates'
     src/libavformat/matroskadec.c:1715: error: undefined reference to 'avpriv_mpeg4audio_sample_rates'
     src/libavformat/matroskadec.c:1715: error: undefined reference to 'avpriv_mpeg4audio_sample_rates'
     src/libavformat/matroskadec.c:1866: error: undefined reference to 'avcodec_chroma_pos_to_enum'
     src/libavformat/matroskadec.c:2680: error: undefined reference to 'av_packet_unref'
     src/libavformat/matroskaenc.c:2482: error: undefined reference to 'avcodec_get_type'
     src/libavformat/matroskaenc.c:646: error: undefined reference to 'avpriv_split_xiph_headers'
     src/libavformat/matroskaenc.c:1066: error: undefined reference to 'av_get_bits_per_sample'
     src/libavformat/matroskaenc.c:723: error: undefined reference to 'avpriv_mpeg4audio_get_config'
     src/libavformat/matroskaenc.c:875: error: undefined reference to 'avcodec_enum_to_chroma_pos'
     src/libavformat/matroskaenc.c:813: error: undefined reference to 'avcodec_get_name'
     src/libavformat/matroskaenc.c:806: error: undefined reference to 'avcodec_get_name'
     src/libavformat/matroskaenc.c:824: error: undefined reference to 'avcodec_get_name'
     .....