Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (29)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    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 (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (5375)

  • How to enable LHLS in FFMPEG 4.1 ?

    27 décembre 2020, par mehdi.r

    I am trying to create a low latency CMAF video stream using FFMPEG.
To do so, I would like to enable the lhls option in FFMPEG in order to have the #EXT-X-PREFETCH tag written in the HLS manifest.

    



    From the FFMPEG doc :

    



    https://www.ffmpeg.org/ffmpeg-all.html

    



    


    Enable Low-latency HLS(LHLS). Adds #EXT-X-PREFETCH tag with current >segment’s URI. Apple doesn’t have an official spec for LHLS. Meanwhile >hls.js player folks are trying to standardize a open LHLS spec. The >draft spec is available in https://github.com/video-dev/hlsjs->rfcs/blob/lhls-spec/proposals/0001-lhls.md This option will also try >to comply with the above open spec, till Apple’s spec officially >supports it. Applicable only when streaming and hls_playlist options >are enabled. This is an experimental feature.

    


    



    I am using the following command with FFMPEG 4.1 :

    



    ffmpeg -re -i ~/Documents/videos/BigBuckBunny.mp4 \
    -map 0 -map 0 -map 0 -c:a aac -c:v libx264 -tune zerolatency \
    -b:v:0 2000k -s:v:0 1280x720 -profile:v:0 high \
    -b:v:1 1500k -s:v:1 640x340  -profile:v:1 main \
    -b:v:2 500k -s:v:2 320x170  -profile:v:2 baseline \
    -bf 1 \
    -keyint_min 24 -g 24 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 \
    -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \
    -hls_playlist 1 -seg_duration 1 -streaming 1  -strict experimental -lhls 1 -remove_at_exit 1 \
    -f dash manifest.mpd



    



    The kind of HLS manifest I obtained for a specific resolution :

    



    #EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:1
#EXT-X-MEDIA-SEQUENCE:8
#EXT-X-MAP:URI="init-stream0.mp4"
#EXTINF:0.998458,
#EXT-X-PROGRAM-DATE-TIME:2019-06-21T18:13:56.966+0900
chunk-stream0-00008.mp4
#EXTINF:0.998458,
#EXT-X-PROGRAM-DATE-TIME:2019-06-21T18:13:57.964+0900
chunk-stream0-00009.mp4
#EXTINF:0.998458,
#EXT-X-PROGRAM-DATE-TIME:2019-06-21T18:13:58.963+0900
chunk-stream0-00010.mp4
#EXTINF:0.998458,
#EXT-X-PROGRAM-DATE-TIME:2019-06-21T18:13:59.961+0900
chunk-stream0-00011.mp4
#EXTINF:1.021678,
#EXT-X-PROGRAM-DATE-TIME:2019-06-21T18:14:00.960+0900
chunk-stream0-00012.mp4
...



    



    As you can see the #EXT-X-PREFETCH tag is missing.

    



    Any help would be highly appreciated.

    



    Edit

    



    I also compiled FFmpeg from its master branch by doing the following :

    



    nasm

    



    sudo apt-get install nasm mingw-w64


    



    Codecs

    



    sudo apt-get install libx265-dev libnuma-dev libx264-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev


    



    FFmpeg

    



    mkdir lhls
cd lhls 
git init 
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg 
git checkout master


    



    AOM (inside FFmpeg dir)

    



    git -C aom pull 2> /dev/null || git clone --depth 1 https://aomedia.googlesource.com/aom && \
mkdir -p aom_build && \
cd aom_build && \
PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED=off -DENABLE_NASM=on ../aom && \
PATH="$HOME/bin:$PATH" make && \
make install
cd..


    



    Compiling

    



    PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs="-lpthread -lm" \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libaom \
  --enable-libass \
  --enable-libfdk-aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libvorbis \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree && \
PATH="$HOME/bin:$PATH" make 


    



    Unfortunately, the #EXT-X-PREFETCH is still missing in the HLS Manifest.

    



    I also tried nightly builds from https://ffmpeg.zeranoe.com/builds/ , same result.

    



    Any help would be highly appreciated.

    



    EDIT 2 :resolved

    



    Thanks to @aergistal and @Gyan , the #EXT-X-PREFETCH tag is now present in my HLS manifest.

    



    Here the FFMPEG command I am using :

    



    ./ffmpeg -re -i ~/videos/BigBuckBunny.mp4 -loglevel debug \
  -map 0 -map 0 -map 0 -c:a aac -c:v libx264 -tune zerolatency \
  -b:v:0 2000k -s:v:0 1280x720 -profile:v:0 high -b:v:1 1500k -s:v:1 640x340  -profile:v:1 main -b:v:2 500k -s:v:2 320x170  -profile:v:2 baseline -bf 1 \
 -keyint_min 24 -g 24 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 -window_size 5 \
 -adaptation_sets "id=0,streams=v id=1,streams=a" -hls_playlist 1 -seg_duration 3 -streaming 1 \
 -strict experimental -lhls 1 -remove_at_exit 0 -master_m3u8_publish_rate 3 \
 -f dash -method PUT -http_persistent 1  https://example.com/manifest.mpd


    



    Apparently the mime types are not passed to the server & FFmpeg seems to ignore the -headers option.

    


  • Frames from Video Using OpenCV in Ubuntu with Java 17

    2 août 2023, par bstrdn

    I've been trying to extract frames from a video using OpenCV in an Ubuntu environment with Java 17, but all my attempts have been unsuccessful so far. The main issue is that ffmpeg is not detected by the OpenCV library on ubuntu.

    


    Here's my test code :

    


    Main class

    


    import org.opencv.core.Core;
import org.opencv.videoio.VideoCapture;

public class Main {
  public static String videoPath = "";
  static {
    String osName = System.getProperty("os.name").toLowerCase();
    if (osName.contains("win")) {
      System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
      videoPath = ClassLoader.getSystemResource("video.mp4").getPath();
    } else {
      videoPath = "/video.mp4";
//      System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
      System.load("/usr/lib/opencv_java470.so");
    }
  }

  public static void main(String[] args) throws InterruptedException {
    VideoCapture videoCapture = new VideoCapture(videoPath);
    if (!videoCapture.isOpened()) {
      System.out.println("Error opening video file.");
    } else {
      System.out.println("Everything is fine.");
    }
    System.out.println(Core.getBuildInformation());
    Thread.sleep(1000000000000000000L);
  }
}


    


    Maven :

    


    &lt;?xml version="1.0" encoding="UTF-8"?>&#xA;<project xmlns="http://maven.apache.org/POM/4.0.0">&#xA;  <modelversion>4.0.0</modelversion>&#xA;  <parent>&#xA;    <groupid>org.springframework.boot</groupid>&#xA;    <artifactid>spring-boot-starter-parent</artifactid>&#xA;    <version>3.0.2</version>&#xA;    <relativepath></relativepath> &#xA;  </parent>&#xA;  <groupid>org.example</groupid>&#xA;  <artifactid>untitled</artifactid>&#xA;  <version>1.0-SNAPSHOT</version>&#xA;  <properties>&#xA;    17&#xA;    17&#xA;    UTF-8&#xA;  </properties>&#xA;&#xA;<dependencies>&#xA;<dependency>&#xA;  <groupid>org.bytedeco</groupid>&#xA;  <artifactid>opencv-platform</artifactid>&#xA;  <version>4.7.0-1.5.9</version>&#xA;</dependency>&#xA;&#xA;<dependency>&#xA;  <groupid>org.springframework.boot</groupid>&#xA;  <artifactid>spring-boot-starter-web</artifactid>&#xA;</dependency>&#xA;</dependencies>&#xA;<build>&#xA;<plugins>&#xA;  <plugin>&#xA;    <groupid>org.springframework.boot</groupid>&#xA;    <artifactid>spring-boot-maven-plugin</artifactid>&#xA;  </plugin>&#xA;</plugins>&#xA;</build>&#xA;</project>&#xA;

    &#xA;

    Dockerfile :

    &#xA;

    FROM ubuntu:20.04&#xA;RUN apt-get update &amp;&amp; apt-get install -y openjdk-17-jdk&#xA;RUN apt-get update &amp;&amp; apt-get install -y pkg-config&#xA;RUN apt-get update &amp;&amp; apt-get install -y ffmpeg libavformat-dev libavcodec-dev libswscale-dev libavresample-dev&#xA;ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64&#xA;COPY target/*.jar /app.jar&#xA;COPY src/main/resources/video.mp4 /&#xA;COPY opencv_java470.so /usr/lib&#xA;ENV JAVA_TOOL_OPTIONS="-Djava.library.path=/usr/lib:/lib:/usr/local/lib:/usr/local:/usr/lib/x86_64-linux-gnu"&#xA;ENV LD_LIBRARY_PATH=/usr/lib:/lib:/usr/local/lib:/usr/local:/usr/lib/x86_64-linux-gnu&#xA;ENTRYPOINT [ "sh", "-c", "java $JAVA_TOOL_OPTIONS -jar /app.jar" ]&#xA;

    &#xA;

    The application displays the following text (video is not opened) :

    &#xA;

    Error opening video file.&#xA;&#xA;2023-08-02T13:30:58.448538297Z &#xA;2023-08-02T13:30:58.448572597Z General configuration for OpenCV 4.7.0 =====================================&#xA;2023-08-02T13:30:58.448587327Z   Version control:               v4.7.0&#xA;2023-08-02T13:30:58.448590607Z &#xA;2023-08-02T13:30:58.448593217Z   Platform:&#xA;2023-08-02T13:30:58.448596057Z     Timestamp:                   2023-03-27T23:13:34Z&#xA;2023-08-02T13:30:58.448598747Z     Host:                        Linux 5.4.0-1103-azure x86_64&#xA;2023-08-02T13:30:58.448601377Z     CMake:                       3.25.2&#xA;2023-08-02T13:30:58.448604277Z     CMake generator:             Unix Makefiles&#xA;2023-08-02T13:30:58.448606837Z     CMake build tool:            /usr/bin/make&#xA;2023-08-02T13:30:58.448609327Z     Configuration:               RELEASE&#xA;2023-08-02T13:30:58.448611867Z &#xA;.......there is a lot of text......&#xA;2023-08-02T13:30:58.448772865Z &#xA;2023-08-02T13:30:58.448775355Z   Video I/O:&#xA;2023-08-02T13:30:58.448777845Z     DC1394:                      NO&#xA;2023-08-02T13:30:58.448780535Z     FFMPEG:                      NO&#xA;2023-08-02T13:30:58.448783105Z       avcodec:                   NO&#xA;2023-08-02T13:30:58.448785725Z       avformat:                  NO&#xA;2023-08-02T13:30:58.448788295Z       avutil:                    NO&#xA;2023-08-02T13:30:58.448790755Z       swscale:                   NO&#xA;2023-08-02T13:30:58.448793295Z       avresample:                NO&#xA;2023-08-02T13:30:58.448795845Z     GStreamer:                   NO&#xA;2023-08-02T13:30:58.448798255Z     v4l/v4l2:                    YES (linux/videodev2.h)&#xA;2023-08-02T13:30:58.448800885Z &#xA;2023-08-02T13:30:58.448803525Z   Parallel framework:            pthreads&#xA;2023-08-02T13:30:58.448806345Z &#xA;............&#xA;2023-08-02T13:30:58.448859654Z   Java:                          export all functions&#xA;2023-08-02T13:30:58.448862024Z     ant:                         /usr/bin/ant (ver 1.10.5)&#xA;2023-08-02T13:30:58.448864504Z     JNI:                         /opt/hostedtoolcache/jdk/8.0.362/x64/include /opt/hostedtoolcache/jdk/8.0.362/x64/include/linux /opt/hostedtoolcache/jdk/8.0.362/x64/include&#xA;2023-08-02T13:30:58.448867224Z     Java wrappers:               YES&#xA;2023-08-02T13:30:58.448869804Z     Java tests:                  NO&#xA;2023-08-02T13:30:58.448872314Z &#xA;2023-08-02T13:30:58.448874734Z   Install to:                    /usr/local&#xA;

    &#xA;

    Moreover, ffmpeg is installed on Ubuntu.

    &#xA;

    How can i fix this ? I'm deathly tired(

    &#xA;

    Thank you in advance for your assistance !

    &#xA;

    First I tried installation following the official instructions.https://github.com/bytedeco/javacv#required-software

    &#xA;

    Then the solution provided in https://stackoverflow.com/a/76750478/8087508,

    &#xA;

    but the result is the same.

    &#xA;

  • Urgent Help Needed : FFmpeg Integration in .NET MAUI for Android [closed]

    15 juin 2024, par Billy Vanegas

    I'm currently facing a significant challenge with integrating FFmpeg into my .NET MAUI project for Android. While everything works smoothly on Windows with Visual Studio 2022, I'm having a hard time replicating this on the Android platform. Despite exploring various NuGet packages like FFMpegCore, which appear to be wrappers around FFmpeg but don't include FFmpeg itself, I'm still at a loss.

    &#xA;

    I've tried following the instructions for integrating ffmpeg-kit for Android, but I keep running into issues, resulting in repeated failures and growing confusion. It feels like there is no straightforward way to seamlessly incorporate FFmpeg into a .NET MAUI project that works consistently across both iOS and Android.

    &#xA;

    The Problem :

    &#xA;

    I need to convert MP3 files to WAV format using FFmpeg on the Android platform within a .NET MAUI project. I’m using the FFMpegCore library and have downloaded the FFmpeg binaries from the official FFmpeg website.

    &#xA;

    However, when attempting to use these binaries on an Android emulator, I encounter a permission denied error in the working directory : /data/user/0/com.companyname.projectname/files/ffmpeg

    &#xA;

    Here’s the code snippet where the issue occurs :

    &#xA;

    await FFMpegArguments&#xA;      .FromFileInput(mp3Path)&#xA;      .OutputToFile(wavPath, true, options => options&#xA;          .WithAudioCodec("pcm_s16le")&#xA;          .WithAudioSamplingRate(44100)&#xA;          .WithAudioBitrate(320000)&#xA;          )&#xA;      .ProcessAsynchronously();&#xA;    &#xA;

    &#xA;

    Additional Details :

    &#xA;

    I've updated AndroidManifest.xml with permissions, but the issue persists.

    &#xA;

    I've created a method ConvertMp3ToWav to handle the conversion.&#xA;I also have a method ExtractFFmpegBinaries to manage FFmpeg binaries extraction, but it seems the permission issue might be tied to how these binaries are accessed or executed.

    &#xA;

    AndroidManifest.xml :

    &#xA;

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

    &#xA;

    Method ConvertMp3ToWav :

    &#xA;

    private async Task ConvertMp3ToWav(string mp3Path, string wavPath)&#xA;{&#xA;    try&#xA;    {&#xA;        // Check directory and create if not exists&#xA;        var directory = Path.GetDirectoryName(wavPath);&#xA;        if (!Directory.Exists(directory))&#xA;            Directory.CreateDirectory(directory!);&#xA;&#xA;        // Check if WAV file exists&#xA;        if (!File.Exists(wavPath))&#xA;            Console.WriteLine($"File not found {wavPath}, creating empty file.");&#xA;            using var fs = new FileStream(wavPath, FileMode.CreateNew);&#xA;&#xA;        // Check if MP3 file exists&#xA;        if (!File.Exists(mp3Path))&#xA;            Console.WriteLine($"File not found {mp3Path}");&#xA;&#xA;        // Extract FFmpeg binaries&#xA;        string? ffmpegBinaryPath = await ExtractFFmpegBinaries(Platform.AppContext);&#xA;&#xA;        // Configure FFmpeg options&#xA;        FFMpegCore.GlobalFFOptions.Configure(new FFOptions { BinaryFolder = Path.GetDirectoryName(ffmpegBinaryPath!)! });&#xA;&#xA;        // Convert MP3 to WAV&#xA;        await FFMpegArguments&#xA;              .FromFileInput(mp3Path)&#xA;              .OutputToFile(wavPath, true, options => options&#xA;                  .WithAudioCodec("pcm_s16le")&#xA;                  .WithAudioSamplingRate(44100)&#xA;                  .WithAudioBitrate(320000)&#xA;                  )&#xA;              .ProcessAsynchronously();&#xA;    }&#xA;    catch (Exception ex)&#xA;    {&#xA;        Console.WriteLine($"An error occurred during the conversion process: {ex.Message}");&#xA;        throw;&#xA;    }&#xA;}&#xA;

    &#xA;

    Method ExtractFFmpegBinaries :

    &#xA;

    private async Task<string> ExtractFFmpegBinaries(Context context)&#xA;{&#xA;    var architectureFolder = "x86"; // Adjust according to device architecture&#xA;    var ffmpegBinaryName = "ffmpeg"; &#xA;    var ffmpegBinaryPath = Path.Combine(context.FilesDir!.AbsolutePath, ffmpegBinaryName);&#xA;    var tempFFMpegFileName = Path.Combine(FileSystem.AppDataDirectory, ffmpegBinaryName);&#xA;&#xA;    if (!File.Exists(ffmpegBinaryPath))&#xA;    {&#xA;        try&#xA;        {&#xA;            var assetPath = $"Libs/{architectureFolder}/{ffmpegBinaryName}";&#xA;            using var assetStream = context.Assets!.Open(assetPath);&#xA;           &#xA;            await using var tempFFMpegFile = File.OpenWrite(tempFFMpegFileName);&#xA;            await assetStream.CopyToAsync(tempFFMpegFile);&#xA;&#xA;            // Adjust permissions for FFmpeg binary&#xA;            Java.Lang.Runtime.GetRuntime()!.Exec($"chmod 755 {tempFFMpegFileName}");&#xA;        }&#xA;        catch (Exception ex)&#xA;        {&#xA;            Console.WriteLine($"An error occurred while extracting FFmpeg binaries: {ex.Message}");&#xA;            throw;&#xA;        }&#xA;    }&#xA;    else&#xA;    {&#xA;        Console.WriteLine($"FFmpeg binaries already extracted to: {ffmpegBinaryPath}");&#xA;    }&#xA;&#xA;    return tempFFMpegFileName!;&#xA;}&#xA;</string>

    &#xA;

    What I Need :

    &#xA;

    I urgently need guidance on how to correctly integrate and use FFmpeg in my .NET MAUI project for Android. Specifically :

    &#xA;

    How to properly set up and configure FFmpeg binaries for use on Android within a .NET MAUI project.&#xA;How to resolve the permission denied issue when attempting to execute FFmpeg binaries.

    &#xA;

    Any advice, solutions, or workarounds would be greatly appreciated as this is a critical part of my project and I'm running out of time to resolve it.

    &#xA;

    Thank you in advance for your help !

    &#xA;