Recherche avancée

Médias (1)

Mot : - Tags -/lev manovitch

Autres articles (69)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (10470)

  • ffmpeg - spark - azure databricks - error writing trailer of "filename.mp3" : Operation not supported

    4 juillet 2021, par CRAFTY DBA

    I have been trying to figure out this tough problem.

    


    I am trying to convert *.mp4 files to *.mp3 files.

    


    I tried using MoviePy but I found out that is uses ffmpeg and was having the same issue.

    


    I used these two articles to get the latest version of ffmpeg installed on the Azure Databricks Cluster during startup. I am using a single node cluster for this POC code.

    


    Pyspark : Use ffmpeg on the driver and workers
    
https://ubuntuhandbook.org/index.php/2020/06/install-ffmpeg-4-3-via-ppa-ubuntu-18-04-16-04

    


    The issue is that even the simplest command results in errors.

    


    %%bash ffmpeg -i /dbfs/Craftydba/recording.mp4 /dbfs/Craftydba/recording.mp3

    


    I even tried .wav as an output format and still the same issue.

    


    I retested this command on a Data Science VM in Azure with Python and FFMPEG. It works fine on that OS/Build.

    


    It has something to do with the version of the code on the spark cluster.

    


    Any help is appreciated.

    


    Sincerely

    


    John Miner

    


    PS : I am add a dump of the OS version as well as a ffmpeg error.

    


    Os Version Dump

    


    NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

    


    FFMPEG Dump

    


    ffmpeg version 4.3.2-0york0~18.04 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --prefix=/usr --extra-version='0york0~18.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libzimg --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/dbfs/Craftydba/recording.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2
    creation_time   : 2021-06-18T19:07:17.000000Z
  Duration: 00:04:48.64, start: 0.000000, bitrate: 1065 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920x1080, 1000 kb/s, 7.96 fps, 8 tbr, 10k tbn, 20k tbc (default)
    Metadata:
      creation_time   : 2021-06-18T19:07:17.000000Z
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono, fltp, 63 kb/s (default)
    Metadata:
      creation_time   : 2021-06-18T19:07:17.000000Z
Stream mapping:
  Stream #0:1 -> #0:0 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to '/dbfs/Craftydba/recording.mp3':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2
    TSSE            : Lavf58.45.100
    Stream #0:0(eng): Audio: mp3 (libmp3lame), 16000 Hz, mono, fltp (default)
    Metadata:
      creation_time   : 2021-06-18T19:07:17.000000Z
      encoder         : Lavc58.91.100 libmp3lame
Error writing trailer of /dbfs/Craftydba/recording.mp3: Operation not supported
size=     846kB time=00:04:48.65 bitrate=  24.0kbits/s speed=86.9x    
video:0kB audio:846kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.036945%


    


  • How to get correct sample_aspect_ratio and display_aspect_ratio when exporting AVI file to fragmented mp4 using javacv

    28 mai 2021, par Thomas

    I have an AVI movie file (h264 encoded) that I would like to export to a fragmented MP4 file using JavaCV. This movie file has a display aspect ratio that is different from the sample aspect ratio as can be seen from the output of the ffprobe command :

    


    


    ffprobe -show_streams bureau.avi

    


    


    which results in (partial results shown for brevity)

    


    .
. 
 Duration: 00:00:31.00, start: 0.000000, bitrate: 1014 kb/s
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(progressive), 720x576 [SAR 4320:3037 DAR 5400:3037], 1010 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
.
.
sample_aspect_ratio=4320:3037
display_aspect_ratio=5400:3037
.
.


    


    When converting this video file using the ffmpeg command

    


    


    ffmpeg -i bureau.avi -vf scale='trunc(ih*dar):ih',setsar=1/1 -frag_duration 1 -movflags empty_moov+default_base_moof+frag_keyframe bureau_scaled_fragmented.mp4

    


    


    the ffprobe results of the mp4 file are (partial output for brevity)

    


    .
.
Duration: 00:00:31.00, start: 0.000000, bitrate: 416 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 414 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
.
.
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
.
.


    


    When playing this video file with VLC, the aspect ratio of the video is correct.

    


    I would like to be able to get the same result by using the JavaCV library (currently using version 1.5.5, but was not succesfull with the following small Java program where I tried using an FfmpegFrameFilter to scale each frame as it is being grabbed. The program does result in an mp4 file being generated but the aspect ratio of the video is incorrect when playing it with e.g. VLC. The result of the ffprobe command also show that the SAR and DAR are missing :

    


      Duration: 00:00:31.00, start: 0.000000, bitrate: 383 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 720x576, 357 kb/s, 25 fps, 25 tbr, 12800 tbn, 25600 tbc (default)
.
.
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
.
.


    


    Is is possible to use such a frame filter (or by any other means) to scale the video so the resulting sample_aspect_ratio and display_aspect_ratio are the same as when using the ffmpeg command ?

    


    The Java program being used.

    


    import org.bytedeco.ffmpeg.global.avcodec;
import org.bytedeco.javacv.FFmpegFrameFilter;
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.FFmpegFrameRecorder;
import org.bytedeco.javacv.Frame;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class App {


    public static void main(String[] args) throws IOException {
        File file = new File("/Users/werk/projects/video/bureau.avi");
        FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(file.getAbsolutePath());
        String fileName = null;
        Frame captured_frame = null;
        FFmpegFrameRecorder recorder = null;

        try {
            frameGrabber.start();
            fileName = file.getAbsolutePath().replace(".avi", "_edited.mp4");
            recorder = new FFmpegFrameRecorder(fileName, frameGrabber.getImageWidth(), frameGrabber.getImageHeight(), frameGrabber.getAudioChannels());
            recorder.setVideoCodec(avcodec.AV_CODEC_ID_H264);
            recorder.setVideoCodecName("avc");
            recorder.setFormat("mp4");
            // enable fragmented mp4 generation
            Map options = new HashMap<>();
            options.put("frag_duration", "1");
            options.put("movflags", "empty_moov+default_base_moof+frag_keyframe");
            recorder.setOptions(options);

            recorder.setFrameRate(frameGrabber.getFrameRate());

            FFmpegFrameFilter filter = new FFmpegFrameFilter("scale='trunc(ih*dar):ih',setsar=1/1", frameGrabber.getImageWidth(), frameGrabber.getImageHeight());
            filter.start();

            recorder.start();
            while (true) {
                try {
                    captured_frame = frameGrabber.grabFrame();

                    if (captured_frame == null) {
                        break;
                    }

                    filter.push(captured_frame);
                    Frame scaledFrame = filter.pull();
                    recorder.record(scaledFrame);

                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            recorder.stop();
            recorder.release();
            frameGrabber.stop();
            filter.stop();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}


    


  • FFMPEG Mpeg-DASH what attributes options and flags do we need to make H264 playable .mpd universally playable

    22 mars 2021, par Jintor

    I want to encode from any source to a universally playable .mpd with h264 codec.

    


    Here my command

    


    /usr/bin/ffmpeg -re -i 1.webm -c:v libx264 -preset ultrafast 
-tune zerolatency -c:a aac -ac 2 -strict -2 -crf 18 -profile:v baseline 
-maxrate 1000k -pix_fmt yuv420p -flags -global_header -streaming 1 
-use_template 1 -use_timeline 0 -seg_duration 2 -remove_at_exit 1 
-f dash index.mpd


    


    but with dash.js the log says

    


    dash.js videoCodec (video/mp4;codecs="avc1") is not supported.


    


    **EXTRA NOTE : When using -c:v libx264 and output in HLS .m3u8 —> it's working in all browsers

    


    HTML with dash.js

    


    <code class="echappe-js">&lt;script src=&quot;http://cdn.dashjs.org/latest/dash.all.min.js&quot;&gt;&lt;/script&gt;&#xA;    

    &#xA; &lt;script&gt;&amp;#xA;    (function(){&amp;#xA;        var url = &quot;https://www.---domain--path-to.mpd&quot;;&amp;#xA;        var player = dashjs.MediaPlayer().create();&amp;#xA;        player.initialize(document.querySelector(&quot;#videoPlayer&quot;), url, true);&amp;#xA;player.updateSettings({&amp;#xA;            streaming: {&amp;#xA;                 lowLatencyEnabled: true, &amp;#xA;                 liveDelay: 4,&amp;#xA;                 liveCatchup: {&amp;#xA;                    minDrift: 0.02,&amp;#xA;                    maxDrift: 0,&amp;#xA;                    playbackRate: 0.5,&amp;#xA;                    latencyThreshold: 60    &amp;#xA;                  }&amp;#xA;            }&amp;#xA;        });&amp;#xA;    })();     &amp;#xA;    video = document.getElementById(&quot;videoPlayer&quot;);&amp;#xA;    video.addEventListener(&quot;loadedmetadata&quot;, function(){ video.muted = true; video.play(); }, false);&amp;#xA;    &lt;/script&gt;&#xA;

    &#xA;

    I do have "-c:v libx264" but why dash.js sees avc1... I know that h264 have avc1, but how to fix this. Is it fixing the ffmpeg command or changing the player.initialize in the javascript

    &#xA;