Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (104)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (9611)

  • W/System.err : java.lang.Exception : FFmpeg not loaded

    1er juillet 2021, par numa

    I ran an android machine learning code that uses AndroidAudioConverter from https://github.com/adrielcafe/AndroidAudioConverter, but I got the different errors as following.

    


    When I ran it with AVD emulator, it said (the error is in red font) :

    


    E/FFmpeg: issue in coping binary from assets to data. 
java.io.FileNotFoundException: x86/ffmpeg
    at android.content.res.AssetManager.nativeOpenAsset(Native Method)
    at android.content.res.AssetManager.open(AssetManager.java:744)
    at android.content.res.AssetManager.open(AssetManager.java:721)
    at com.github.hiteshsondhi88.libffmpeg.FileUtils.copyBinaryFromAssetsToData(FileUtils.java:29)
    at com.github.hiteshsondhi88.libffmpeg.FFmpegLoadLibraryAsyncTask.doInBackground(FFmpegLoadLibraryAsyncTask.java:27)
    at com.github.hiteshsondhi88.libffmpeg.FFmpegLoadLibraryAsyncTask.doInBackground(FFmpegLoadLibraryAsyncTask.java:8)
    at android.os.AsyncTask$2.call(AsyncTask.java:333)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:764)


    


    But if I ran it on my android smartphone, I am getting the following error :

    


     W/System.err: java.lang.Exception: FFmpeg not loaded&#xA;    W/System.err:     at cafe.adriel.androidaudioconverter.AndroidAudioConverter.convert(AndroidAudioConverter.java:85)&#xA;    W/System.err:     at com.example.coughc19.DetectCoughActivity.convertToWAV(DetectCoughActivity.kt:144)&#xA;        at com.example.coughc19.DetectCoughActivity$onClick$timer$1.onFinish(DetectCoughActivity.kt:103)&#xA;        at android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:127)&#xA;        at android.os.Handler.dispatchMessage(Handler.java:107)&#xA;    W/System.err:     at android.os.Looper.loop(Looper.java:230)&#xA;        at android.app.ActivityThread.main(ActivityThread.java:7815)&#xA;        at java.lang.reflect.Method.invoke(Native Method)&#xA;    W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526)&#xA;        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)&#xA;    D/FFmpeg: Build.CPU_ABI : arm64-v8a&#xA;    I/FFmpeg: Loading FFmpeg for armv7 CPU&#xA;    D/Surface: Surface::connect(this=0x7476ddc000,api=2)&#xA;    D/FFmpeg: FFmpeg is not executable, trying to make it executable ...&#xA;    D/Surface: Surface::disconnect(this=0x7476ddc000,api=2)&#xA;    W/System.err: java.io.FileNotFoundException: /storage/emulated/0/myrec.wav: open failed: ENOENT (No such file or directory)&#xA;    W/System.err:     at libcore.io.IoBridge.open(IoBridge.java:496)&#xA;        at java.io.FileInputStream.<init>(FileInputStream.java:159)&#xA;        at com.example.coughc19.audioHelper.WavFile.openWavFile(WavFile.java:87)&#xA;        at com.example.coughc19.DetectCoughActivity.classifyNoise(DetectCoughActivity.kt:169)&#xA;        at com.example.coughc19.DetectCoughActivity$onClick$timer$1$onFinish$timer2$1.onFinish(DetectCoughActivity.kt:110)&#xA;        at android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:127)&#xA;        at android.os.Handler.dispatchMessage(Handler.java:107)&#xA;    W/System.err:     at android.os.Looper.loop(Looper.java:230)&#xA;        at android.app.ActivityThread.main(ActivityThread.java:7815)&#xA;        at java.lang.reflect.Method.invoke(Native Method)&#xA;        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526)&#xA;        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)&#xA;    W/System.err: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)&#xA;        at libcore.io.Linux.open(Native Method)&#xA;        at libcore.io.ForwardingOs.open(ForwardingOs.java:167)&#xA;        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)&#xA;    W/System.err:     at libcore.io.ForwardingOs.open(ForwardingOs.java:167)&#xA;        at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7714)&#xA;        at libcore.io.IoBridge.open(IoBridge.java:482)&#xA;        ... 11 more&#xA;</init>

    &#xA;

    Also, when ran on an android smartphone and emulator simultaneously, I got the following error :

    &#xA;

    E/AndroidRuntime: FATAL EXCEPTION: main&#xA;Process: com.example.coughc19, PID: 9041&#xA;java.lang.IllegalArgumentException: The size of the array to be loaded does not match the specified shape.&#xA;    at org.tensorflow.lite.support.common.SupportPreconditions.checkArgument(SupportPreconditions.java:104)&#xA;    at org.tensorflow.lite.support.tensorbuffer.TensorBufferFloat.loadArray(TensorBufferFloat.java:87)&#xA;    at com.example.coughc19.DetectCoughActivity.loadModelAndMakePredictions(DetectCoughActivity.kt:258)&#xA;    at com.example.coughc19.DetectCoughActivity.classifyNoise(DetectCoughActivity.kt:230)&#xA;    at com.example.coughc19.DetectCoughActivity$onClick$timer$1$onFinish$timer2$1.onFinish(DetectCoughActivity.kt:110)&#xA;    at android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:127)&#xA;    at android.os.Handler.dispatchMessage(Handler.java:106)&#xA;    at android.os.Looper.loop(Looper.java:193)&#xA;    at android.app.ActivityThread.main(ActivityThread.java:6669)&#xA;    at java.lang.reflect.Method.invoke(Native Method)&#xA;    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)&#xA;    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)&#xA;

    &#xA;

    I used the Android 10 smartphone and Android 9 for AVD. This is a team project, which my friend build. It can run on his smartphone (Android 9). I need to connect the program to the cloud storage but I don't know why it ain't running on my device or emulator.
    &#xA;If anyone knows how to resolve this issue please help.
    &#xA;Thanks.

    &#xA;

  • VB.NET FFMPEG Stops

    18 mars 2012, par Mcqueen_23

    Hi evryone i'm trying to convert files using ffmpeg

    my codes only fetched


    — -Skip--- Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Enrique Iglesias - Tonight.mp4' : Metadata : major_brand : mp42 minor_version : 0 compatible_brands : isommp42 creation_time : 2011-03-20 19:07:02 Duration : 00:03:50.05, start : 0.000000, bitrate : 219 kb/s Stream #0.0(und) : Video : h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 117 kb/s, 29.97 fps, 59.75 tbr, 1k tbn, 59.83 tbc Metadata : creation_time : 1970-01-01 00:00:00 Stream #0.1(und) : Audio : aac, 44100 Hz, stereo, s16, 95 kb/s Metadata : creation_time : 2011-03-20 19:07:03 Output #0, mp3, to 'Enrique Iglesias - Tonight.mp3' : Metadata : major_brand : mp42 minor_version : 0 compatible_brands : isommp42 TDEN : 2011-03-20 19:07:02 TSSE : Lavf52.94.0 Stream #0.0(und) : Audio : libmp3lame, 44100 Hz, stereo, s16, 64 kb/s Metadata : creation_time : 2011-03-20 19:07:03

    and cannot i cannot get the next lines ung Proccess.ErrorDataReceived event

    Here are my Codes

       Public Structure ItemStruct
           Public ID, URL, FileName, FileExt, ConvertExt, ConvertQuery As String
           Public FileSize As Int64
           Public Method, status As Method
           Public prog_bar As ProgressBar
           Public DeleteOrigin, TrimStart, TrimEnd As Boolean
       End Structure

       Friend Class Converter
           Public busy As Boolean = False
           Private _Item As ItemStruct
           Public Event ProgressChange(ByVal id As String, ByVal percent As Integer, ByVal etr As TimeSpan)
           Public Event ConvertFinish(ByVal id As String)
           Private m As Threading.Thread
           Private WithEvents timer As New Timer With {.Interval = 100}

           Public Sub New()
           End Sub

           Public Sub New(ByVal item As ItemStruct)
               _Item = item
               m = New Threading.Thread(AddressOf Convert)
           End Sub

           Public Sub Start()
               m.Start()
               timer.Start()
           End Sub

           Private duration As Decimal = 0.0F
           Private current As Decimal = 0.0F
           Private varIsSet As Boolean = False
           Private Sub Convert()
               Dim cmd As String = _Item.ConvertQuery
               Dim inputName As String = _Item.URL
               Dim fName As String = _Item.FileName & _Item.FileExt
               Dim dir As String = _Item.URL.Replace(fName, "")
               Dim ouputName As String = dir & _Item.FileName & "." & _Item.ConvertExt
               cmd = Replace(cmd, "--i", inputName)
               cmd = Replace(cmd, "--o", ouputName)
               cmd = cmd.Remove(0, 6)
               cmd = cmd.Trim
               Dim proc As New Process
               With proc.StartInfo
                   .FileName = Path.Combine(Application.StartupPath, "ffmpeg.exe")
                   .Arguments = cmd
                   proc.EnableRaisingEvents = False
                   .UseShellExecute = False
                   .CreateNoWindow = True
                   .RedirectStandardError = True
                   .RedirectStandardOutput = True
                   .RedirectStandardInput = True
                   AddHandler proc.ErrorDataReceived, AddressOf UpdateData
                   proc.Start()
                   proc.BeginErrorReadLine()
               End With
           End Sub

           Public Sub Cancel()
               m.Abort()
           End Sub

           Private Sub UpdateData(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
               Dim s As String = e.Data
               If s.Contains("Duration: ") Then
                   duration = GetDuration(s)
               ElseIf s.Contains("frame=") Then
                   current = GetTime(s)
               Else
                   Dim proc As Process = DirectCast(sender, Process)
                   Dim m As Match = Regex.Match(s, "^File\ &#39;(.*?)&#39;\ already\ exists", RegexOptions.IgnoreCase)
                   If m.Success Then
                       Dim w As StreamWriter = proc.StandardInput
                       If MessageBox.Show("File &#39;" & m.Groups(1).ToString & "&#39; already exists." & vbNewLine & "Do you want to Overwrite existing file?", "Overwrite", MessageBoxButtons.YesNo) = DialogResult.Yes Then
                           w.WriteLine("y")
                       Else
                           w.WriteLine("n")
                       End If
                   End If

                   &#39;RaiseEvent ConvertFinish(_Item.ID)
                   &#39;proc.WaitForExit()
                   &#39;proc.Close()
               End If
               Debug.Print(s)
               If Not duration And Not current Then varIsSet = False Else varIsSet = True
           End Sub

           Private Function GetDuration(ByVal s As String) As Double
               Dim m As Match = Regex.Match(s, "Duration: ((.*?), (.*))")
               If m.Success Then
                   Dim duration As String = m.Groups(2).ToString
                   Return TimeSpan.Parse(duration).TotalSeconds
               End If
               Return Nothing
           End Function

           Private Function GetTime(ByVal s As String) As Double
               Dim m As Match = Regex.Match(s, "(.*) time=(.*) bitrate")
               If m.Success Then
                   Dim currentTime As String = m.Groups(2).ToString
                   Return TimeSpan.Parse(currentTime).TotalSeconds
               End If
               Return Nothing
           End Function

           Private Sub timer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles timer.Tick
               If varIsSet Then
                   Dim etr As TimeSpan = TimeSpan.FromSeconds(CInt(current / duration))
                   etr = New TimeSpan(etr.Hours, etr.Minutes, etr.Seconds)
                   RaiseEvent ProgressChange(_Item.ID, CInt((current / duration) * 100 * 100), etr)
               End If
           End Sub
       End Class
  • Everytime I run my code ffmpeg responds with this instead of doing its function. How do I fix ?

    25 juillet 2023, par Oreo F
    Output from ffmpeg/avlib:&#xA;&#xA;ffmpeg version 2023-07-19-git-efa6cec759-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers&#xA;  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      58. 14.100 / 58. 14.100&#xA;  libavcodec     60. 22.100 / 60. 22.100&#xA;  libavformat    60. 10.100 / 60. 10.100&#xA;  libavdevice    60.  2.101 / 60.  2.101&#xA;  libavfilter     9.  8.102 /  9.  8.102&#xA;  libswscale      7.  3.100 /  7.  3.100&#xA;  libswresample   4. 11.100 /  4. 11.100&#xA;  libpostproc    57.  2.100 / 57.  2.100&#xA;

    &#xA;

    Everytime I run the code it does this.

    &#xA;

    code :

    &#xA;

    import praw&#xA;import requests&#xA;import cv2&#xA;import os&#xA;from pydub import AudioSegment&#xA;&#xA;def download_video(url, filename):&#xA;    response = requests.get(url)&#xA;    with open(filename, &#x27;wb&#x27;) as f:&#xA;        f.write(response.content)&#xA;&#xA;def combine_videos(video_urls, output_filename):&#xA;    video_clips = []&#xA;    audio_clips = []&#xA;    for i, url in enumerate(video_urls):&#xA;        temp_filename = f&#x27;temp_video_{i}.mp4&#x27;&#xA;        download_video(url, temp_filename)&#xA;        video_clip = cv2.VideoCapture(temp_filename)&#xA;        audio_clip = AudioSegment.from_file(temp_filename, format="mp4")&#xA;        video_clips.append(video_clip)&#xA;        audio_clips.append(audio_clip)&#xA;    &#xA;    if not video_clips:&#xA;        print("No video clips to combine.")&#xA;        return&#xA;&#xA;    frame_width = int(video_clips[0].get(cv2.CAP_PROP_FRAME_WIDTH))&#xA;    frame_height = int(video_clips[0].get(cv2.CAP_PROP_FRAME_HEIGHT))&#xA;    fps = int(video_clips[0].get(cv2.CAP_PROP_FPS))&#xA;&#xA;    fourcc = cv2.VideoWriter_fourcc(*&#x27;mp4v&#x27;)&#xA;    output_clip = cv2.VideoWriter(output_filename, fourcc, fps, (frame_width, frame_height))&#xA;&#xA;    for i, video_clip in enumerate(video_clips):&#xA;        while True:&#xA;            ret, frame = video_clip.read()&#xA;            if not ret:&#xA;                break&#xA;            output_clip.write(frame)&#xA;    &#xA;    for video_clip in video_clips:&#xA;        video_clip.release()&#xA;    &#xA;    output_clip.release()&#xA;&#xA;    # Combining audio using pydub&#xA;    combined_audio = sum(audio_clips)&#xA;    combined_audio.export("combined_audio.mp3", format="mp3")&#xA;&#xA;    # Merging audio with video using ffmpeg&#xA;    os.system(f&#x27;ffmpeg -i {output_filename} -i combined_audio.mp3 -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 final_output.mp4&#x27;)&#xA;&#xA;    # Cleaning up temporary files&#xA;    os.remove("combined_audio.mp3")&#xA;&#xA;def main():&#xA;    reddit = praw.Reddit(&#xA;       client_id=&#x27;XXX&#x27;,&#xA;        client_secret=&#x27;XXX&#x27;,&#xA;        user_agent=&#x27;Reddit Video Downloader&#x27;&#xA;    )&#xA;    &#xA;    subreddit_name = input("Enter the name of the subreddit: ")&#xA;    limit = int(input("Enter the number of videos to download: "))&#xA;    &#xA;    subreddit = reddit.subreddit(subreddit_name)&#xA;    submissions = subreddit.hot(limit=limit)&#xA;    &#xA;    video_urls = [submission.url for submission in submissions if submission.media and &#x27;reddit_video&#x27; in submission.media]&#xA;    &#xA;    if video_urls:&#xA;        output_filename = input("Enter the output filename (e.g., output.mp4): ")&#xA;        combine_videos(video_urls, output_filename)&#xA;        print("Videos combined successfully!")&#xA;    else:&#xA;        print("No Reddit videos found in the subreddit.")&#xA;&#xA;if __name__ == "__main__":&#xA;    main()&#xA;

    &#xA;

    Anyone got any idea why this happens ?

    &#xA;

    I'm making a script that scrapes videos from a specific subreddit.

    &#xA;

    Also if it helps the temp video file is corrupted when it gets made.

    &#xA;

    I've put this into chatGPT as well and brought an expert friend and he hasn't been able to help me.

    &#xA;