Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (108)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

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

  • How to prevent screen tearing when updating stdin input to ffmpeg for youtube livestream

    8 septembre 2021, par Cameron Sima

    I am working on a livestream application that allows multiple web clients to stream video through webrtc to a 'controller' client which will add their audio track, then be able to switch between these video feeds and output the raw stream data to a server running ffmpeg, which will then send the feed to youtube live.

    


    The 'controller' client simply sets one peer video source as the 'active' stream on button press and all others as 'inactive'.

    


    The data is then sent to a node.js server like so :

    


          this.mediaSources.forEach((source, _) => {
    source.recorder.ondataavailable = (e: BlobEvent) => {
        if (source.active) {
          this.socket.emit('binarystream', e.data)
        }
      }


    


    The node server starts an ffmepg process like so :

    


    export class FfmpegService {
ffmpeg: ChildProcess
youtubeUrl = 'rtmp://a.rtmp.youtube.com/live2'

start(rtmpDestination: string) {
    this.ffmpeg = spawn('ffmpeg', this.getFfmpegOptions(rtmpDestination), 
        { shell: process.env.NODE_ENV !== 'production' }
    )
}

stop() {
    if (this.ffmpeg) {
        this.ffmpeg.stdin.end()
        this.ffmpeg.kill('SIGINT')
        this.ffmpeg = null
    }
}

feedStream(data: any) {
    this.ffmpeg.stdin.write(data)
}

private getFfmpegOptions(streamKey: string): string[] {
    const rtmpDestination = this.youtubeUrl + '/' + streamKey
    return [
        '-i','-',
        '-c:v', 'libx264', 
        '-preset', 'fast', '-tune', 'zerolatency',  // video codec config: low latency, adaptive bitrate
        '-c:a', 'aac', '-ar', '44100', '-b:a', '64k', // audio codec config: sampling frequency (11025, 22050, 44100), bitrate 64 kbits
        '-y', //force to overwrite
        '-use_wallclock_as_timestamps', '1', // used for audio sync
        '-async', '1', // used for audio sync
        //'-filter_complex', 'aresample=44100', // resample audio to 44100Hz, needed if input is not 44100
        //'-strict', 'experimental', 
        '-bufsize', '300k',
        '-pix_fmt', 'yuv420p',
        '-f', 'flv', rtmpDestination
    ];
}


    


    Everything works as expected in a youtube live session. The only problem is when switching between input streams, there is about 5 seconds of screen tearing before settling down. From all outward appearances, the switch happens immediately and seamlessly. I feel this can be attenuated/solved by tweaking the ffmpeg options but I'm pretty new to ffmpeg. I have tried increasing/decreasing -bufsize and -preset cli options, but nothing has worked so far.

    


  • 360 video - FFMPEG change "zoom" for Youtube

    20 avril 2020, par Jedeme Vlakem

    I can change angle of 360 video :

    



    ffmpeg -i 15.mp4 -vf  v360=e:e:yaw=60:pitch=0:roll=0 15_exp.mp4


    



    But problem is, that I need to change "zoom" - when I use VLC player, I can roll out angle and picture is more "clean". But when I upload video to Youtube I have no option to zoom.

    



    I there any option to change view ?

    


  • C++ - Failed to stream to youtube with ffmpeg

    27 mars 2022, par Samuel Ives

    Well, I have an open source project similar to OBS but aimed at churches, the repository you can find here, however I'm stuck in the encoding part, avcodec_send_frame after a while just returns Failed to send frame - code : -11 err : Resource temporarily unavailable and never gets to the stage of receiving packets.

    


    I've tried everything including changing the output format to MP4 but the application just crashes, this time I'm challenging myself to a bigger project, I thought I had solved it by changing the codec to H.264 but I was wrong

    


    Basically I'm trying to get OpenCV images from my webcam and send them to youtube

    


    void Broadcast::writeFrame(const cv::Mat &amp;image)&#xA;{&#xA;&#xA;    const int width = image.cols;&#xA;    const int height = image.rows;&#xA;&#xA;    if(swConv == nullptr) {&#xA;        swConv = sws_getContext(width, height, AV_PIX_FMT_RGB24, codecCtx->width, codecCtx->height, codecCtx->pix_fmt, SWS_BILINEAR, nullptr, nullptr, nullptr);&#xA;        if(!swConv) {&#xA;            qCritical() &lt;&lt; "Could not create SwContext";&#xA;            return;&#xA;        }&#xA;    }&#xA;&#xA;    const int stride[4] = { static_cast<int>(image.step[0]) };&#xA;    sws_scale(swConv, &amp;image.data, stride, 0, image.rows, frame->data, frame->linesize);&#xA;    frame->pts = frame_pts&#x2B;&#x2B;;&#xA;&#xA;    int ret = avcodec_send_frame(codecCtx, frame);&#xA;    if(ret &lt; 0) {&#xA;        qWarning() &lt;&lt; "Failed to send frame - code: " &lt;&lt; ret &lt;&lt; " err: " &lt;&lt; av_err2str(ret);;&#xA;        return;&#xA;    }&#xA;&#xA;    qDebug() &lt;&lt; "AA " &lt;&lt; ret;&#xA;&#xA;    // Encode frames into packet&#xA;    while(ret > 0) {&#xA;&#xA;        qDebug() &lt;&lt; "BB " &lt;&lt; ret;&#xA;&#xA;        ret = avcodec_receive_packet(codecCtx, pkt);&#xA;        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {&#xA;            return;&#xA;        } else if(ret &lt; 0) {&#xA;            qCritical() &lt;&lt; "Error reciving packets: " &lt;&lt; av_err2str(ret);&#xA;            break;&#xA;        }&#xA;&#xA;        qDebug() &lt;&lt; "CC";&#xA;&#xA;        av_write_trailer(ofctx);&#xA;        //av_packet_unref(pkt);&#xA;&#xA;    }&#xA;&#xA;    qDebug() &lt;&lt; "Frames " &lt;&lt; frame_pts;&#xA;&#xA;}&#xA;</int>

    &#xA;