Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (17)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Ajout d’utilisateurs manuellement par un administrateur

    12 avril 2011, par

    L’administrateur d’un canal peut à tout moment ajouter un ou plusieurs autres utilisateurs depuis l’espace de configuration du site en choisissant le sous-menu "Gestion des utilisateurs".
    Sur cette page il est possible de :
    1. décider de l’inscription des utilisateurs via deux options : Accepter l’inscription de visiteurs du site public Refuser l’inscription des visiteurs
    2. d’ajouter ou modifier/supprimer un utilisateur
    Dans le second formulaire présent un administrateur peut ajouter, (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (3912)

  • How to change metadata with ffmpeg/avconv ?

    14 juillet 2012, par tampis

    I am writing a python script for producing audio and video podcasts. There are a bunch of recorded media files (audio and video) and text files containing the meta information.

    Now I want to program a function which shall add the information from the meta data text files to all media files (the original and the converted ones). Because I have to handle many different file formats (wav, flac, mp3, mp4, ogg, ogv...) it would be great to have a tool which add meta data to arbitrary formats.

    My Question :

    How can I change the metadata of a file with ffmpeg/avconv without changing the audio or video of it and without creating a new file ? Is there another commandline/python tool which would do the job for me ?

    What I tried so far :

    I thought ffmpeg/avconv could be such a tool, because it can handle nearly all media formats. I hoped, that if I set -i input_file and the output_file to the same file, ffmpeg/avconv will be smart enough to leave the file unchanged. Then I could set -metadata key=value and just the metadata will be changed.

    But I noticed, that if I type avconv -i test.mp3 -metadata title='Test title' test.mp3 the audio test.mp3 will be reconverted in another bitrate.

    So I thought to use -c copy to copy all video and audio information. Unfortunately also this does not work :

    :~$ du -h test.wav # test.wav is 303 MB big
    303M    test.wav

    :~$ avconv -i test.wav -c copy -metadata title='Test title' test.wav
    avconv version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the
    Libav    developers
    built on Jun 12 2012 16:37:58 with gcc 4.6.3
    [wav @ 0x846b260] max_analyze_duration reached
    Input #0, wav, from 'test.wav':
    Duration: 00:29:58.74, bitrate: 1411 kb/s
       Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
    File 'test.wav' already exists. Overwrite ? [y/N] y
    Output #0, wav, to 'test.wav':
    Metadata:
       title           : Test title
       encoder         : Lavf53.21.0
       Stream #0.0: Audio: pcm_s16le, 44100 Hz, 2 channels, 1411 kb/s
    Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Press ctrl-c to stop encoding
    size=     896kB time=5.20 bitrate=1411.3kbits/s    
    video:0kB audio:896kB global headers:0kB muxing overhead 0.005014%

    :~$ du -h test.wav # file size of test.wav changed dramatically
    900K    test.wav

    You see, that I cannot use -c copy if input_file and output_file are the same. Of course I could produce a temporarily file :

    :-$ avconv -i test.wav -c copy -metadata title='Test title' test_temp.mp3
    :-$ mv test_tmp.mp3 test.mp3

    But this solution would create (temporarily) a new file on the filesystem and is therefore not preferable.

  • Improve ffmpeg performance

    8 décembre 2014, par hitesh

    I am using ffmpeg to take screen shot from video , it is video from CDN.

    I am doing below steps

    1.Upload video to CDN using html file tag.

    2.Get CDN url and use it for creating screen shot using ffmpeg.

    3.Upload the screenshot in CDN.

    4.Save video and screenshot CDN url to DB

    the whole process is really time consuming, even if I put loader it is really slow.

    This is code of POC I did for ffmpeg :

    $imageFile = realpath("./videos") . '/test5.png';
    $imageFile2 = realpath("./videos") . '/test6.png';
    $size = "230x155";
    $getfromsecond = 8;

    if (isEnabled('shell_exec')) {
       echo "Shall_exec is enabled " . "<br />";
       shell_exec('echo "hello world"');
       echo "<br />";
    } else {
       echo "shall exec command is not allowed";
    }

    $cmd = "ffmpeg -i $vid -an -ss $getfromsecond -s $size -vframes 1 $imageFile";
    $cmd2 = "ffmpeg -i $remoteVideo -an -ss $getfromsecond -s $size -vframes 1 $imageFile2";

    echo 'command 1 - local Image : ' . $cmd . "<br />";
    echo 'command 2 - remote video : ' . $cmd2 . "<br />";
    echo "<br />command 2 - remote video shell_exec output : " . shell_exec($cmd) . "<br />";
    echo '<br />command 2 - remote video shell_exec output : ' . shell_exec($cmd2) . "<br />";

    if (!shell_exec($cmd)) {
       echo " video Thumbnail created" . "<br />";
    } else {
       echo "Error Creating video thumbnail" . "<br />";
    }
    if (!shell_exec($cmd2)) {
       echo "Remote video Thumbnail created" . "<br />";
    } else {
       echo "Error Creating Remote video thumbnail" . "<br />";
    }

    function isEnabled($func) {
       return is_callable($func) &amp;&amp; false === stripos(ini_get('disable_functions'), $func);
    }  

    Is there some way to improve ffmpeg performance ?

    Thanks

  • Multiple applications to access the same DeckLink device (openCV and rtmp pushing) ? What options do I have ?

    7 septembre 2020, par Giorgi Aptsiauri

    Description :

    &#xA;

    I have a requirement that I must do two things to a single camera stream from a DeckLink device - OpenCV processing and RTMP live streaming. If it is relevant, the device is DeckLink 8K Pro.

    &#xA;

    The DeckLink device (one particular port) does not allow more than one application to access the video stream. My two applications are :

    &#xA;

      &#xA;
    • C++ OpenCV application which must run image processing algorithms on the video stream.
    • &#xA;

    • Unreal Media Server which must RTMP push the stream to a remote endpoint, which should redistribute the stream to clients.
    • &#xA;

    &#xA;

    Both applications must be running on the same Windows workstation.

    &#xA;

    Problem :

    &#xA;

    If either application is running, it has exclusive access to the video stream and the other application cannot read the stream, and there seems to be no solution to this problem.

    &#xA;

    So, I am really looking for a smart solution some of you may have implemented before or have an idea which might work for me.

    &#xA;

    My solution so far :

    &#xA;

    In this solution, Unreal Media Server is replaced with FFMPEG.

    &#xA;

    Since OP's effort must be put into the solution before posting here, I have been browsing through possible solutions the past week. I came up with an FFMPEG-based solution which is the only application which reads the DeckLink video stream and does exactly two things in a single command - pushes video packets via RTMP and creates a local UDP stream. And, OpenCV's VideoCapture class is able to pick up UDP stream. For testing, I have used Twitch as RTMP server and VLC as UDP tester. It works and it seems like a good solution except for the delay introduced in UDP streaming which is about 0.4 seconds. Unfortunately, I am not able to evaluate RTMP delay because Twitch introduces its own >5s delay on its own. But that is not a problem for now.

    &#xA;

    Here's the FFMPEG solution (Note I am using computer webcam here but same goes for DeckLink).

    &#xA;

    Steram via :

    &#xA;

    ffmpeg -threads:v 2 -threads:a 8 -filter_threads 2 -thread_queue_size 512 -y -f dshow -video_size 640x480 -pixel_format yuyv422 -framerate 30 -rtbufsize 100M -i video="HD WebCam" -f dshow -rtbufsize 100M -i audio="Microphone Array (Realtek High Definition Audio(SST))" -preset ultrafast -vcodec libx264 -tune zerolatency -b 900k -map 0:v:0 -f mpegts udp://127.0.0.1:5555 -pix_fmt yuv420p -c:v libx264 -qp:v 19 -profile:v high -rc:v cbr_ld_hq -level:v 4.2 -r:v 60 -g:v 120 -bf:v 3 -refs:v 16 -f flv rtmp://live-fra05.twitch.tv/app/stream_key&#xA;

    &#xA;

    Play via :

    &#xA;

    ffplay -probesize 32 -sync ext udp://127.0.0.1:5555&#xA;

    &#xA;

    I want to hear how you would improve my own solution to better fit the problem (e.g. less latency) or if you have a better solution than mine.

    &#xA;

    Thanks in advance.

    &#xA;