Recherche avancée

Médias (2)

Mot : - Tags -/documentation

Autres articles (96)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Modifier la date de publication

    21 juin 2013, par

    Comment changer la date de publication d’un média ?
    Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
    Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
    Dans la rubrique "Champs à ajouter, cocher "Date de publication "
    Cliquer en bas de la page sur Enregistrer

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

  • unable to create flv file from 3gp using ffmpeg php

    25 septembre 2012, par Naeem

    i am using the following code but it is not generating the flv file, other code is working fine if i convert mp4 to flv, following is my code.

    define('FFMPEG','/usr/local/bin/ffmpeg');
    $src='/home/zimmapp/public_html/images/video/video_3465733831.3gp';
    $destination='/home/zimmapp/public_html/images/video/naeem.flv';

    //i  user this code
    exec(FFMPEG . " -i $src  -sameq -ar 22050 -ab 96000 -deinterlace -nr 500 -s 320x240 -aspect 4:3 -r 20 -g 500 -me_range 20 -b 270k -deinterlace -f flv -y $destination");
    //OR this
    exec( FFMPEG ." -i $src -ar 22050 -ab 32 -f flv -s 320×240 $destination") or print "Convert Error";

    BUT Nothing working
    my website support gave me this error report :

    server I found this error:Seems stream 0 codec frame rate differs from container frame rate : 180000.00
    (180000/1) -> 90000.00 (180000/2) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
    '/home/zimmapp/public_html/images/video/1347616191-2.3gp' : Metadata :
    major_brand : isom minor_version : 0 compatible_brands : isom3gp4 creation_time
     : 2012-09-06 07:02:00 Duration : 00:00:02.32, start : 0.000000, bitrate : 9769 kb/s Stream #0.0(eng) : Video : h264, yuv420p, 1280x720, 11834 kb/s, 29.58 fps, 90k tbr, 90k tbn, 180k tbc Metadata : creation_time : 2012-09-06 07:02:00 Stream #0.1(eng) : Audio : aac, 48000 Hz, stereo, s16, 126 kb/s Metadata :
    creation_time : 2012-09-06 07:02:00 Unable to find a suitable output format for ' -sameq'

  • FFMPEG Segmenting skips when m3u8 changes file

    25 septembre 2012, par user792164

    I am attempting to segment a large video file in to segments. When streamed (even locally) by opening the m3u8 file it will jump forward in time by some period of time less than 1 second.

    The following commands are executed :

    First mp4 —> ts :

    ffmpeg -i input_file.mp4 -bsf:v h264_mp4toannexb -acodec libfaac -vcodec libx264 -f mpegts -threads 0 output.ts

    Then I split using :

    ffmpeg -i output.ts -vcodec copy -acodec copy -map 0 -f segment -segment_time 30 -segment_list output.m3u8 -segment_list_type m3u8 -segment_format mpegts output%03d.ts

    Note : Changing segment time has no effect on issue.

    Generated manifest :

    #EXTM3U
    #EXT-X-VERSION:4
    #EXTINF:30.947578,
    output000.ts
    #EXTINF:30.155111,
    output001.ts
    ...
    #EXTINF:24.023989,
    output082.ts
    #EXT-X-TARGETDURATION:37
    #EXT-X-ENDLIST

    Meta Data :

    $> ffmpeg -version
    ffmpeg version git-2012-08-19-a93c221
    built on Aug 19 2012 13:18:58 with gcc 4.4.5 (Debian 4.4.5-8)
    configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib/ --mandir=/usr/share/man --extra-cflags='-O3 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ -fstack-protector --param=ssp-buffer-size=4 -mtune=generic' --enable-gpl --enable-shared --enable-nonfree --enable-version3 --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-pthreads --enable-libxvid --enable-postproc --enable-libgsm --enable-libspeex --enable-avfilter --disable-decoder=libdirac --enable-libfreetype --enable-libschroedinger --disable-decoder=libschroedinger --enable-libopenjpeg --disable-ffplay --disable-ffserver
    libavutil      51. 70.100 / 51. 70.100
    libavcodec     54. 53.100 / 54. 53.100
    libavformat    54. 25.104 / 54. 25.104
    libavdevice    54.  2.100 / 54.  2.100
    libavfilter     3. 11.101 /  3. 11.101
    libswscale      2.  1.101 /  2.  1.101
    libswresample   0. 15.100 /  0. 15.100
    libpostproc    52.  0.100 / 52.  0.100

    -

    $> ffprobe input_file.mp4

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input_file.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    creation_time   : 2011-09-08 11:43:25
    Duration: 00:41:31.00, start: 0.000000, bitrate: 1146 kb/s
    Stream #0.0(und): Video: h264 (High), yuv420p, 720x404 [PAR 1:1 DAR 180:101], 1015 kb/s,    23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
    Metadata:
     creation_time   : 2011-09-08 11:43:25
    Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 124 kb/s
    Metadata:
     creation_time   : 2011-09-08 11:43:25

    -

    $> ffprobe output_file.ts
    Input #0, mpegts, from 'output_file.ts':
    Duration: 00:41:30.98, start: 1.400000, bitrate: 807 kb/s
    Program 1
    Metadata:
     service_name    : Service01
     service_provider: FFmpeg
    Stream #0.0[0x100]: Video: h264 (High), yuv420p, 720x404 [PAR 1:1 DAR 180:101], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0.1[0x101](und): Audio: aac, 48000 Hz, stereo, s16, 141 kb/

    Is it possible to remove this jump, if so, what encoding parameters or incorrect assumptions have I made ? Thanks.

  • How can I transcode a file with FFMPEG and stream the output file in the response of a Java servlet ?

    6 octobre 2012, par user1700589

    Basically, this is what I'm trying to do :
    1. User passes a URL as a GET parameter to my servlet.
    2. Servlet uses a ProcessBuilder to convert the media contained in that URL to a valid media format (ie : MP3).
    3. The servlet streams the output file being transcoded by FFMPEG back to the browser.

    1 and 2 work fine, but it is 3 I am having a problem with. The best I can do is create a FileInputStream to the output file being transcoded and send that as the response but it is not working. My guess is that it is because the file is being written as I'm trying to stream it.

    Is there anyway to intercept the output file argument in FFMPEG and read it into an InputStream ? In my mind it does not seem that it should be difficult to take input file A, transcode it to output file B, and then stream output file B back to the client, on the fly.

    ProcessBuilder pb = new ProcessBuilder("ffmpeg.exe", "-i", url, "file.mp3");
       Process p = pb.start();

       final InputStream inStream = p.getErrorStream();

       new Thread(new Runnable() {

       public void run() {
               InputStreamReader reader = new InputStreamReader(inStream);
               Scanner scan = new Scanner(reader);
               while (scan.hasNextLine()) {
                   System.out.println(scan.nextLine());
               }
           }
       }).start();

       ServletOutputStream stream = null;
       BufferedInputStream buf = null;
       try {

           stream = response.getOutputStream();
           File mp3 = new File(file.mp3");

           //set response headers
           response.setContentType("audio/mpeg");

           response.addHeader("Content-Disposition", "attachment; filename=file.mp3");

           response.setContentLength(-1);

           //response.setContentLength((int) mp3.length());

           FileInputStream input = new FileInputStream(mp3);
           buf = new BufferedInputStream(input);
           int readBytes = 0;
           //read from the file; write to the ServletOutputStream
           while ((readBytes = buf.read()) != -1) {
               stream.write(readBytes);
           }
       } catch (IOException ioe) {
           throw new ServletException(ioe.getMessage());
       } finally {
           if (stream != null) {
               stream.close();
           }
           if (buf != null) {
               buf.close();
           }
       }