Recherche avancée

Médias (1)

Mot : - Tags -/3GS

Autres articles (43)

  • MediaSPIP : Modification des droits de création d’objets et de publication définitive

    11 novembre 2010, par

    Par défaut, MediaSPIP permet de créer 5 types d’objets.
    Toujours par défaut les droits de création et de publication définitive de ces objets sont réservés aux administrateurs, mais ils sont bien entendu configurables par les webmestres.
    Ces droits sont ainsi bloqués pour plusieurs raisons : parce que le fait d’autoriser à publier doit être la volonté du webmestre pas de l’ensemble de la plateforme et donc ne pas être un choix par défaut ; parce qu’avoir un compte peut servir à autre choses également, (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

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

  • issue streaming to instagram with FFmpeg

    24 septembre 2021, par 1 K1

    Trying to stream from OBS using nginx server to Instagram using ffmpeg. There are no problem If I stream with a same settings to facebook. There is only a problem while streaming to Instagram. Also, if I do stream a video file instead of camera from OBS, there are no problem. So there is a problem While streaming from OBS through nginx server with ffmpeg.

    


    command is : ffmpeg -i rtmp://192.168.12.190:1935/live -filter_complex " [0] transpose=dir=1 [rotated] ; [rotated] scale=480:-2 " -max_muxing_queue_size 9999 -preset superfast -b:v 2000k -minrate 1500k -maxrate 3000k -bufsize 3200k -vcodec libx264 -r 30 -f flv rtmps://live-upload.instagram.com:443/rtmp/!streamKey!

    


    Getting following log from mmpeg :

    


    ffmpeg version N-90636-gc837918f50 Copyright (c) 2000-2018 the FFmpeg developers
 built with gcc 7.3.0 (GCC)
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
 libavutil      56. 13.100 / 56. 13.100
 libavcodec     58. 17.100 / 58. 17.100
 libavformat    58. 11.101 / 58. 11.101
 libavdevice    58.  2.100 / 58.  2.100
 libavfilter     7. 14.100 /  7. 14.100
 libswscale      5.  0.102 /  5.  0.102
 libswresample   3.  0.101 /  3.  0.101
 libpostproc    55.  0.100 / 55.  0.100
Input #0, flv, from 'rtmp://192.168.12.190:1935/live':
 Metadata:
   Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
   displayWidth    : 1280
   displayHeight   : 720
   fps             : 30
   profile         :
   level           :
 Duration: 00:00:00.00, start: 836.994000, bitrate: N/A
   Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 163 kb/s
   Stream #0:1: Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 5120 kb/s, 30 fps, 30 tbr, 1k tbn, 60 tbc
Stream mapping:
 Stream #0:1 (h264) -> transpose (graph 0)
 scale (graph 0) -> Stream #0:0 (libx264)
 Stream #0:0 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[libx264 @ 000001a25ad8e6c0] using SAR=1281/1280
[libx264 @ 000001a25ad8e6c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001a25ad8e6c0] profile High, level 3.1
[libx264 @ 000001a25ad8e6c0] 264 - core 155 r2901 7d0ff22 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x3 me=dia subme=1 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=18 lookahead_threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=0 rc=abr mbtree=0 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=3000 vbv_bufsize=3200 nal_hrd=none filler=0 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
Output #0, flv, to 'rtmps://live-upload.instagram.com:443/rtmp/___my_key_here':
 Metadata:
   Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
   displayWidth    : 1280
   displayHeight   : 720
   fps             : 30
   profile         :
   level           :
   encoder         : Lavf58.11.101
   Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 480x854 [SAR 1281:1280 DAR 9:16], q=-1--1, 2000 kb/s, 30 fps, 1k tbn, 30 tbc
   Metadata:
     encoder         : Lavc58.17.100 libx264
   Side data:
     cpb: bitrate max/min/avg: 3000000/0/2000000 buffer size: 3200000 vbv_delay: -1
   Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 48000 Hz, stereo, fltp
   Metadata:
     encoder         : Lavc58.17.100 libmp3lame
[tls @ 000001a25b642e40] Error in the push function.
av_interleaved_write_frame(): I/O error
   Last message repeated 1 times
[flv @ 000001a25bc4db80] Failed to update header with correct duration.
[flv @ 000001a25bc4db80] Failed to update header with correct filesize.
Error writing trailer of rtmps://live-upload.instagram.com:443/rtmp/___my_key_here__: I/O error
frame=   62 fps=0.0 q=11.0 Lsize=     265kB time=00:00:07.05 bitrate= 307.2kbits/s speed=17.1x
video:175kB audio:111kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[tls @ 000001a25b642e40] The specified session has been invalidated for some reason.
   Last message repeated 1 times
[libx264 @ 000001a25ad8e6c0] frame I:1     Avg QP:14.37  size: 12215
[libx264 @ 000001a25ad8e6c0] frame P:16    Avg QP:14.39  size: 13130
[libx264 @ 000001a25ad8e6c0] frame B:45    Avg QP:15.80  size:  4828
[libx264 @ 000001a25ad8e6c0] consecutive B-frames:  3.2%  0.0%  0.0% 96.8%
[libx264 @ 000001a25ad8e6c0] mb I  I16..4: 52.2% 22.7% 25.1%
[libx264 @ 000001a25ad8e6c0] mb P  I16..4:  0.2%  0.6%  0.7%  P16..4: 48.7%  0.0%  0.0%  0.0%  0.0%    skip:49.8%
[libx264 @ 000001a25ad8e6c0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 16.1%  0.0%  0.0%  direct:21.1%  skip:62.7%  L0:38.2% L1:50.0% BI:11.8%
[libx264 @ 000001a25ad8e6c0] final ratefactor: 16.75
[libx264 @ 000001a25ad8e6c0] 8x8 transform intra:26.5% inter:48.4%
[libx264 @ 000001a25ad8e6c0] coded y,uvDC,uvAC intra: 58.0% 51.2% 38.8% inter: 22.3% 27.8% 13.6%
[libx264 @ 000001a25ad8e6c0] i16 v,h,dc,p: 95%  2%  2%  1%
[libx264 @ 000001a25ad8e6c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 60%  4%  9%  2%  4%  9%  2%  6%  4%
[libx264 @ 000001a25ad8e6c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 51%  8% 11%  5%  4%  9%  2%  7%  3%
[libx264 @ 000001a25ad8e6c0] i8c dc,h,v,p: 65%  8% 21%  6%
[libx264 @ 000001a25ad8e6c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000001a25ad8e6c0] kb/s:1701.52
Conversion failed!


    


  • How to save a vvideo from a RTSP server using Ffmpeg in C++ ?

    20 septembre 2021, par Tolga

    I am using Ffmpeg remuxing example code to save a mp4 file into another file. However my actual goal is saving the video from a RTSP server. The example works fine with the normal .mp4 files but when I try to save the video from RTSP Server I get following error on command prompt.

    


    [mp4 @ 02F9A8C0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 18000 >= 3000


    


    The RTSP server is created on my computer for testing using python gstream. I used the script here.

    


    Ffmpeg code in C++ is below where error occurs.

    


            iCamera->stream = iCamera->fmt->streams[iCamera->pkt->stream_index];
        iCamera->pkt->stream_index = map->stream_map[iCamera->pkt->stream_index];
        oCamera->stream = oCamera->fmt->streams[iCamera->pkt->stream_index];

        iCamera->pkt->pts = av_rescale_q_rnd(iCamera->pkt->pts, iCamera->stream->time_base, oCamera->stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
        iCamera->pkt->dts = av_rescale_q_rnd(iCamera->pkt->dts, iCamera->stream->time_base, oCamera->stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));
        iCamera->pkt->duration = av_rescale_q(iCamera->pkt->duration, iCamera->stream->time_base, oCamera->stream->time_base);
        iCamera->pkt->pos = -1;
        
        if (av_interleaved_write_frame(oCamera->fmt, iCamera->pkt)) {
            printf("Error occured while muxing packet.\n"); exit(1);
        }


    


  • How to use ffmpeg to convert video into the audio format with nodejs and angular in web app

    31 août 2021, par Amir Shahzad

    I want to convert the video into the audio format using ffmpeg in nodejs but I not know how I can implement it in the angular app with nodejs.

    


    This is my nodejs code

    


      const express = require('express');
  const ffmpeg  = require('fluent-ffmpeg');
  const fileUpload = require('express-fileupload');
  const cors   = require('cors')
  const app = express();

  app.use(fileUpload({
     useTempFiles: true,
     tempFileDir: 'temp/'
  }));
  app.use(express.json());
  app.use(express.urlencoded({ extended: true }));
  app.use(cors({ origin: 'http://localhost:4200' }));

  ffmpeg.setFfmpegPath('/usr/bin/ffmpeg');

  // Converting mp4 to audio
  app.post('/mp4tomp3', (req, res) => {
     res.contentType('video/avi');
     res.attachment('output.mp3');
     req.files.mp4.mv("temp/" + req.files.mp4.name , function(err) {
      if(err){
        res.sendStatus(500).send(err)
    }else{
        console.log("Fiel Uploaded Successfully.!");
    }
   });
     ffmpeg('temp/' + req.files.mp4.name)
       .toFormat('mp3')
       .on('end', function() {
            console.log('Done');
    })
   .on('error', function(err){
         console.log('An Error Occured' + err.message)
    })
    .pipe(res, {end: true})
  })

  app.listen(3000, () => {
    console.log('Server Start On Port 3000')
  })


    


    This code is working good when I use index.html file in the nodejs app but its give an error while I remove index.html file and use angular app for frontend then it give error in nodejs mp4 not defined and name mv is not defined Please tell me how I can implement it using angular framework

    


    This is my app.component.html file

    


       <div class="container">&#xA;     <h1>Video Proccessing App</h1>&#xA;     <form>&#xA;        <input type="file" formcontrolname="mp4" />&#xA;         <input type="submit" value="Convert" />&#xA;     </form>&#xA;  </div>&#xA;  &#xA;

    &#xA;

    This is my app.component.ts file

    &#xA;

         import { Component, OnInit } from &#x27;@angular/core&#x27;;&#xA;     import { FormBuilder, FormGroup, Validators } from &#x27;@angular/forms&#x27;;&#xA;     import { VideoConversionService } from &#x27;src/services/video-conversion.service&#x27;;&#xA;&#xA;     @Component({&#xA;        selector: &#x27;app-root&#x27;,&#xA;        templateUrl: &#x27;./app.component.html&#x27;,&#xA;        styleUrls: [&#x27;./app.component.css&#x27;]&#xA;     })&#xA;     export class AppComponent implements OnInit {&#xA;&#xA;         submitted =false;&#xA;         form! : FormGroup&#xA;         data:any&#xA;&#xA;&#xA;        constructor(private formBuilder: FormBuilder,&#xA;        private videoService: VideoConversionService){}&#xA;&#xA;&#xA;       creatForm(){&#xA;          this.form = this.formBuilder.group({&#xA;          mp4: [&#x27;&#x27;, Validators.required],&#xA;       });&#xA;      }&#xA;      ngOnInit(): void {&#xA;         this.creatForm();&#xA;&#xA;      }&#xA;&#xA;&#xA;      convertVideo(){&#xA;          this.submitted = true&#xA;          this.videoService.conversion(this.form.value).subscribe(res => {&#xA;          this.data = res;&#xA;         // console.log(this.data)&#xA;         //console.log(this.form.value)&#xA;     })&#xA;     }&#xA;&#xA;     }&#xA;

    &#xA;

    This is my service file for handling the backend api in my angular app

    &#xA;

    import { Injectable } from &#x27;@angular/core&#x27;;&#xA;import { HttpClient  } from &#x27;@angular/common/http&#x27;;&#xA;@Injectable({&#xA;  providedIn: &#x27;root&#x27;&#xA;})&#xA;export class VideoConversionService {&#xA;&#xA;constructor(private httpClient: HttpClient) { }&#xA;&#xA;conversion(data: any){&#xA;   return this.httpClient.post(&#x27;http://localhost:3000/mp4tomp3&#x27;, data)&#xA;}&#xA;}&#xA;

    &#xA;

    This is Screenshot of chrome error

    &#xA;

    while i click on convert button then chrome give that error

    &#xA;

    This is the screenshot of the nodejs app error while I click on the convert button

    &#xA;

    enter image description here

    &#xA;