Recherche avancée

Médias (1)

Mot : - Tags -/vidéo

Autres articles (111)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • 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 (9073)

  • avcodec_encode_video2 crash on MinGW32 (but not on MinGW64)

    27 février 2018, par ksb496

    I have been testing for years a software that I am developing, compiled only for 64-bit systems through Qt-MinGW64, without experiencing any kind of issue regarding video encoding (which is one of the features of such application). Recently, I have been attempting to build the corresponding x86 version of my software by compiling it with Qt-MingGW32.

    However, after bulding the same ffmpeg and x264 library versions to create the 32-bit versions and successfully linking them to my project, the application keeps crashing after few frames are encoded, due to segmentation fault error. This is very strange because, as I indicated before, it works flawlessly when compiled for 64-bit systems.

    I have also lost a considerable amount hours trying to combine a big amount of different versions of both ffmpeg and x264 libraries, but with no luck either. Neither it works when disabling threads both for x264 and ffmpeg libraries, hence it does not seem to be a win32 threading issue. Therefore, I have concluded that the error is most likely in my code, which by some chance beyond my comprehension tells ffmpeg to allocate the right amount of memory in the x64 version, but not in the x86 version.

    It must be pointed out also that before the avcodec_encode_video2 call, I do the following calls, among others, in order to allocate the memory associated to the corresponding items (AVFrame, AVCodec, etc.), such as

    avcodec_open2( my_codec_context, my_codec, &opt );
    my_av_frame=av_frame_alloc();

    More precisely, the details involving the code structure that I am using can be found here.

    Therefore, the error appears to be more subtle than just issues regarding uninitialized memory.

    Many thanks in advance.

    UPDATE :

    I have discovered the focus of the problem. For some reason, FFmpeg/x264 libraries behave abnormally in Win32 GUI applications compiled with Qt-MinGW32, while they run correctly in Win32 console applications, also compiled with Qt-WinGW32. I have proven this claim performing two dummy tests, in which the exact same piece of code is run through a console application and on a GUI application, succeeding in the first case and failing in the latter one. The code for such tests can be found below, along with the x264 and FFmpeg libraries used in my projects, together with instructions to build them in msys2 with MinGW32 :

    https://takeafile.com/?f=hisusinivi

    I have no idea whether it can be solved by simply tweaking the code or it is a serious bug involving an incompatibility issue. If it is the latter, should it be reported to the Qt/FFmpeg/x264 staff as a major bug ?

  • FFMPEG - Read Audio File on html player while writing ?

    23 février 2018, par Nathan Ferreyrolles

    I have the project to record a streams of french radios and after read files on my website (record every weeks) I have segmented by hours and for 7 days.
    But i have 2 questions :
    When i play the mp3 file who writing at the time on my website i have a bug like -02:30:33s remain ? What’s wrong for you ?

    This is my ffmpeg code : ./ffmpeg -y -i http://broadcast.infomaniak.net/radioscoop-bourg-128.mp3 -f segment -strftime 1 -segment_atclocktime 1 -segment_time 3600 -reconnect 1 -reconnect_at_eof 1 -reconnect_delay_max 2 -timeout 200000 -acodec copy /var/www/mysite.fr/public_html/rsbourg/%A/%H.mp3

    And i would like to know a code to reconnect the record if i have a problem, because this morning the programm has stopped for nothing reasons ? I use Putty and the programm Screen for record many radios at same time :)

    Best regards :)
    (sorry for my bad english i’m french :/ )
    Nathan

  • Why does ffmpeg not work with some files ?

    18 février 2018, par Hollo1001

    I’m using FFmpeg and PHP to generate thumbnails from video and get their data. It seems to work ok, but some files just output no thumbnails and also no data(specs like time, height...). I have searched a lot online, but have not found anything like that. Have I missed something ? If you have an idea whats wrong, would be cool if you could help me and maybe others how might have such a problem.
    Here is my PHP code for the specs :

    function _get_video_attributes($video, $ffmpeg) {

       $command = $ffmpeg . ' -i ' . $video . ' -vstats 2>&1';
       $output = shell_exec($command);

       $regex_sizes = "/Video: ([^,]*), ([^,]*), ([0-9]{1,4})x([0-9]{1,4}), ([^,]*), ([0-9]{1,4})/"; // or : $regex_sizes = "/Video: ([^\r\n]*), ([^,]*), ([0-9]{1,4})x([0-9]{1,4})/"; (code from @1owk3y)
       if (preg_match($regex_sizes, $output, $regs)) {
           $codec = $regs [1] ? $regs [1] : null;
           $width = $regs [3] ? $regs [3] : null;
           $height = $regs [4] ? $regs [4] : null;
           $fps = $regs [6] ? $regs [6] : null;
       }

       $regex_duration = "/Duration: ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}).([0-9]{1,2})/";
       if (preg_match($regex_duration, $output, $regs)) {
           $hours = $regs [1] ? $regs [1] : null;
           $mins = $regs [2] ? $regs [2] : null;
           $secs = $regs [3] ? $regs [3] : null;
           $ms = $regs [4] ? $regs [4] : null;
       }

       return array('codec' => $codec,
           'width' => $width,
           'height' => $height,
           'hours' => $hours,
           'mins' => $mins,
           'secs' => $secs,
           'ms' => $ms,
           'fps' => $fps,
       );
    }

    And the thumbs :

    if($duration < 10){
           $interval = floor($duration / 2);
           $image = "thumb/".$filenopath."_thumb_".$num.".jpg";
           shell_exec($ffmpeg." -ss ".$interval." -i ".$upfile." -vf select='eq(pict_type,I)' -vframes 1 -vf scale=-1:240 ".$thumb."00".$i.".jpg");
           rename($image,"thumb/".$image);
    }else{
    for ($i = 1; $i <= 6; $i++) {
           $interval = floor(($i - 0.5) * $duration / $i);
           $log  = $ffmpeg." -ss ".$interval." -i ".$upfile." -vf select='eq(pict_type,I)' -vframes 1 -vf scale=-1:240 ".$thumb."00".$i.".jpg".PHP_EOL;
           //file_put_contents('./log'.date("j.n.Y").'.txt', $log, FILE_APPEND);
           shell_exec($ffmpeg." -ss ".$interval." -i ".$upfile." -vf select='eq(pict_type,I)' -vframes 1 -vf scale=-1:240 ".$thumb."00".$i.".jpg");
    }