Recherche avancée

Médias (91)

Autres articles (96)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (10376)

  • Camera app fails on android ffmpeg application

    22 mars 2021, par connor449

    I am trying to run a simple video recorder app on android. The code is below :

    


    package com.example.camera&#xA;&#xA;//import android.R&#xA;import android.content.DialogInterface&#xA;import android.content.pm.PackageManager&#xA;import android.os.Build&#xA;import android.os.Bundle&#xA;import android.widget.Toast&#xA;import androidx.appcompat.app.AlertDialog&#xA;import androidx.appcompat.app.AppCompatActivity&#xA;import androidx.core.app.ActivityCompat&#xA;import androidx.core.content.ContextCompat&#xA;import com.arthenica.mobileffmpeg.FFmpeg&#xA;&#xA;&#xA;const val EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE"&#xA;&#xA;class MainActivity : AppCompatActivity() {&#xA;    override fun onCreate(savedInstanceState: Bundle?) {&#xA;        super.onCreate(savedInstanceState)&#xA;        setContentView(R.layout.activity_main)&#xA;        if (checkPermission()) {&#xA;            //main logic or main code&#xA;           FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 /sdcard/test.mp4")&#xA;&#xA;            // . write your main code to execute, It will execute if the permission is already given.&#xA;        } else {&#xA;            requestPermission()&#xA;        }&#xA;    }&#xA;&#xA;    private fun checkPermission(): Boolean {&#xA;        return if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)&#xA;            != PackageManager.PERMISSION_GRANTED&#xA;        ) {&#xA;            // Permission is not granted&#xA;            false&#xA;        } else true&#xA;    }&#xA;&#xA;    private fun requestPermission() {&#xA;        ActivityCompat.requestPermissions(&#xA;            this, arrayOf(android.Manifest.permission.CAMERA),&#xA;            PERMISSION_REQUEST_CODE&#xA;        )&#xA;    }&#xA;&#xA;    override fun onRequestPermissionsResult(&#xA;        requestCode: Int,&#xA;        permissions: Array<string>,&#xA;        grantResults: IntArray&#xA;    ) {&#xA;        when (requestCode) {&#xA;            PERMISSION_REQUEST_CODE -> if (grantResults.size > 0 &amp;&amp; grantResults[0] == PackageManager.PERMISSION_GRANTED&#xA;            ) {&#xA;                Toast.makeText(applicationContext, "Permission Granted", Toast.LENGTH_SHORT)&#xA;                    .show()&#xA;&#xA;                // main logic&#xA;            } else {&#xA;                Toast.makeText(applicationContext, "Permission Denied", Toast.LENGTH_SHORT)&#xA;                    .show()&#xA;                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {&#xA;                    if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.CAMERA)&#xA;                        != PackageManager.PERMISSION_GRANTED&#xA;                    ) {&#xA;                        showMessageOKCancel("You need to allow access permissions",&#xA;                            DialogInterface.OnClickListener { dialog, which ->&#xA;                                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {&#xA;                                    requestPermission()&#xA;                                }&#xA;                            })&#xA;                    }&#xA;                }&#xA;            }&#xA;        }&#xA;    }&#xA;&#xA;    private fun showMessageOKCancel(&#xA;        message: String,&#xA;        okListener: DialogInterface.OnClickListener&#xA;    ) {&#xA;        AlertDialog.Builder(this@MainActivity)&#xA;            .setMessage(message)&#xA;            .setPositiveButton("OK", okListener)&#xA;            .setNegativeButton("Cancel", null)&#xA;            .create()&#xA;            .show()&#xA;    }&#xA;&#xA;    companion object {&#xA;        private const val PERMISSION_REQUEST_CODE = 200&#xA;    }&#xA;}&#xA;&#xA;&#xA;</string>

    &#xA;

    The main command to call the video recorder is here :

    &#xA;

               FFmpeg.execute("-f android_camera -i 0:0 -r 30 -pixel_format bgr0 -t 00:00:05 /sdcard/test.mp4")&#xA;

    &#xA;

    The app opens on my android 10 Motorola G Power. I tap 'allow' for allowing permissions. Then the app crashes and I keep getting this error :

    &#xA;

    2021-03-22 13:42:51.534 31138-31138/com.example.camera E/AndroidRuntime: FATAL EXCEPTION: main&#xA;    Process: com.example.camera, PID: 31138&#xA;    java.lang.IllegalStateException: Could not find method sendMessage(View) in a parent or ancestor Context for android:onClick attribute defined on view class com.google.android.material.button.MaterialButton with id &#x27;button2&#x27;&#xA;        at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:436)&#xA;        at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:393)&#xA;        at android.view.View.performClick(View.java:7161)&#xA;        at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:967)&#xA;        at android.view.View.performClickInternal(View.java:7133)&#xA;        at android.view.View.access$3500(View.java:804)&#xA;        at android.view.View$PerformClick.run(View.java:27416)&#xA;        at android.os.Handler.handleCallback(Handler.java:883)&#xA;        at android.os.Handler.dispatchMessage(Handler.java:100)&#xA;        at android.os.Looper.loop(Looper.java:241)&#xA;        at android.app.ActivityThread.main(ActivityThread.java:7617)&#xA;        at java.lang.reflect.Method.invoke(Native Method)&#xA;        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)&#xA;        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941)&#xA;2021-03-22 13:42:51.546 31138-31138/com.example.camera I/Process: Sending signal. PID: 31138 SIG: 9&#xA;

    &#xA;

    What am I doing wrong ? Please advise.

    &#xA;

    edit

    &#xA;

    layout xml

    &#xA;

    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;&#xA;&#xA;    &#xA;&#xA;    &#xA;&#xA;

    &#xA;

  • youtube-dl (ffmpeg) blank error on embedding subtitles

    22 mars 2021, par Human1

    I am new to using youtube-dl, and therefore is quite unfamiliar with how it works. I configured it to download auto subs and english subs (if there were any), and embed them in the video. It worked for me for quite a good while (1 or 2 months), and it suddenly stopped working with blank errors starting to pop up, and I have no idea why that happened. I have checked that I am using the most updated version of youtube-dl and ffmpeg. I am currently using a m1 mac , and I don't know if that caused the problem. Below is the output I got with the -v command, as well as some background information.

    &#xA;

    [debug] System config: []&#xA;[debug] User config: [&#x27;-o&#x27;, &#x27;~/Documents/playlists/%(playlist)s/%(playlist_index)-i%(title)s.%(ext)s&#x27;, &#x27;-f&#x27;, &#x27;mp4&#x27;, &#x27;--write-sub&#x27;, &#x27;--sub-lang&#x27;, &#x27;en&#x27;, &#x27;--write-auto-sub&#x27;, &#x27;--embed-subs&#x27;]&#xA;[debug] Custom config: []&#xA;[debug] Command-line args: [&#x27;https://youtube.com/playlist?list=PL4cUxeGkcC9i3FXJSUfmsNOx8E7u6UuhG&#x27;, &#x27;-v&#x27;]&#xA;[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8&#xA;[debug] youtube-dl version 2021.03.14&#xA;[debug] Git HEAD: 59ada80ca&#xA;[debug] Python version 3.9.2 (CPython) - macOS-11.2.3-arm64-arm-64bit&#xA;[debug] exe versions: ffmpeg present, ffprobe present, rtmpdump 2.4&#xA;[debug] Proxy map: {}&#xA;[youtube:tab] PL4cUxeGkcC9i3FXJSUfmsNOx8E7u6UuhG: Downloading webpage&#xA;[download] Downloading playlist: CSS Flexbox Tutorial&#xA;[youtube:tab] playlist CSS Flexbox Tutorial: Downloading 12 videos&#xA;[download] Downloading video 1 of 12&#xA;[youtube] Y8zMYaD1bz0: Downloading webpage&#xA;[info] Writing video subtitles to: /Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.en.vtt&#xA;[debug] Invoking downloader on &#x27;https://r2---sn-45gpjx-3x4e.googlevideo.com/videoplayback?expire=1616392628&amp;ei=VN1XYKikA9eo1gai6KegBg&amp;ip=45.133.192.196&amp;id=o-APtlxrUI2wU4tPFiSxBi5MzLnuR5EFYL3-TE-BpiPEYG&amp;itag=22&amp;source=youtube&amp;requiressl=yes&amp;mh=U3&amp;mm=31%2C29&amp;mn=sn-45gpjx-3x4e%2Csn-5hne6nlr&amp;ms=au%2Crdu&amp;mv=m&amp;mvi=2&amp;pl=24&amp;initcwndbps=1155000&amp;vprv=1&amp;mime=video%2Fmp4&amp;ns=r0wuXA2lBVMGhop9uJeEHHUF&amp;ratebypass=yes&amp;dur=317.161&amp;lmt=1607169749865434&amp;mt=1616370759&amp;fvip=3&amp;fexp=24001373%2C24007246&amp;c=WEB&amp;txp=5432434&amp;n=_jK4PI5-7sa9Q0X2ye&amp;sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cratebypass%2Cdur%2Clmt&amp;sig=AOq0QJ8wRAIgR0wbVc18mWDheT_QVT5Jsbmd647wKJNyVfzGRJd_oOkCIArV-vvKQmD3D7W90dw1l9b3zaJQNzltitp3BJPt2fqA&amp;lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&amp;lsig=AG3C_xAwRgIhAI9I7LQw5zTAldgCydhe3yzicBgvxYfxeHxI8lCxh3sLAiEAlT8Dpf93fiPbdMI3rHOebH-nFkToCZr1VfWaoX0HVeg%3D&#x27;&#xA;[download] /Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.mp4 has already been downloaded&#xA;[download] 100% of 16.50MiB&#xA;[ffmpeg] Embedding subtitles in &#x27;/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.mp4&#x27;&#xA;[debug] ffmpeg command line: ffmpeg -y -loglevel repeat&#x2B;info -i &#x27;file:/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.mp4&#x27; -i &#x27;file:/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.en.vtt&#x27; -map 0 -c copy -map -0:s -map -0:d -c:s mov_text -map 1:0 -metadata:s:s:0 language=eng &#x27;file:/Users/{username}/Documents/playlists/CSS Flexbox Tutorial/1CSS Flexbox Tutorial #1 - Introduction.temp.mp4&#x27;&#xA;ERROR: &#xA;Traceback (most recent call last):&#xA;  File "/opt/homebrew/Cellar/youtube-dl/2021.3.14/libexec/lib/python3.9/site-packages/youtube_dl/YoutubeDL.py", line 2106, in post_process&#xA;    files_to_delete, info = pp.run(info)&#xA;  File "/opt/homebrew/Cellar/youtube-dl/2021.3.14/libexec/lib/python3.9/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 426, in run&#xA;    self.run_ffmpeg_multiple_files(input_files, temp_filename, opts)&#xA;  File "/opt/homebrew/Cellar/youtube-dl/2021.3.14/libexec/lib/python3.9/site-packages/youtube_dl/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files&#xA;    raise FFmpegPostProcessorError(msg)&#xA;youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError&#xA;

    &#xA;

    I would be very grateful if anyone can tell me what happened and what should I do next. Thanks ! ;)

    &#xA;

  • Could not convert video to audio using ffmpeg or moviepy

    5 avril 2021, par Parv Jain

    I want to convert a mp4 video file to mp3/wav audio using python ffmpeg or moviepy.&#xA;when I run this command

    &#xA;

    ffmpeg -i vid.mp4 -ar 44100 -vn audio.wav&#xA;

    &#xA;

    It returns

    &#xA;

    Output file #0 does not contain any stream&#xA;

    &#xA;

    Here is the full Log

    &#xA;

    ffmpeg version N-55702-g920046a Copyright (c) 2000-2013 the FFmpeg developers&#xA;  built on Aug 21 2013 18:10:00 with gcc 4.7.3 (GCC)&#xA;  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib&#xA;  libavutil      52. 42.100 / 52. 42.100&#xA;  libavcodec     55. 29.100 / 55. 29.100&#xA;  libavformat    55. 14.101 / 55. 14.101&#xA;  libavdevice    55.  3.100 / 55.  3.100&#xA;  libavfilter     3. 82.100 /  3. 82.100&#xA;  libswscale      2.  5.100 /  2.  5.100&#xA;  libswresample   0. 17.103 /  0. 17.103&#xA;  libpostproc    52.  3.100 / 52.  3.100&#xA;Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;vid.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : dash&#xA;    minor_version   : 0&#xA;    compatible_brands: iso6avc1mp41&#xA;    creation_time   : 2021-03-12 14:13:58&#xA;  Duration: 00:07:28.87, start: 0.000000, bitrate: 1199 kb/s&#xA;    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1197 kb/s, 23.98 tbr, 24k tbn, 47.95 tbc&#xA;    Metadata:&#xA;      creation_time   : 2021-03-12 14:13:58&#xA;      handler_name    : ISO Media file produced by Google Inc.&#xA;Output #0, wav, to &#x27;audio.wav&#x27;:&#xA;  Metadata:&#xA;    major_brand     : dash&#xA;    minor_version   : 0&#xA;    compatible_brands: iso6avc1mp41&#xA;Output file #0 does not contain any stream&#xA;

    &#xA;

    I searched the internet for this but could not find a solution

    &#xA;

    Please tell if there is a way to do this with ffmpeg or another way

    &#xA;

    I also tried to use moviepy but it was not successful.

    &#xA;

    Here is moviepy log

    &#xA;

    Traceback (most recent call last):&#xA;  File "path\to\file\script.py", line 3, in <module>&#xA;    clip.audio.write_audiofile(r&#x27;audio.mp3&#x27;)&#xA;AttributeError: &#x27;NoneType&#x27; object has no attribute &#x27;write_audiofile&#x27;&#xA;</module>

    &#xA;

    this is my code for moviepy

    &#xA;

    import moviepy.editor as mp&#xA;clip = mp.VideoFileClip(&#x27;vid.mp4&#x27;)&#xA;clip.audio.write_audiofile(r&#x27;audio.mp3&#x27;)&#xA;

    &#xA;