Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (106)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Activation de l’inscription des visiteurs

    12 avril 2011, par

    Il est également possible d’activer l’inscription des visiteurs ce qui permettra à tout un chacun d’ouvrir soit même un compte sur le canal en question dans le cadre de projets ouverts par exemple.
    Pour ce faire, il suffit d’aller dans l’espace de configuration du site en choisissant le sous menus "Gestion des utilisateurs". Le premier formulaire visible correspond à cette fonctionnalité.
    Par défaut, MediaSPIP a créé lors de son initialisation un élément de menu dans le menu du haut de la page menant (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (12119)

  • Read and Save rtsp stream using FFMPEG using python with less memory size

    25 août 2022, par Vishak Raj

    I am trying to read a rtsp stream and save in a file, for that I am using the ffmpeg in python

    


    import ffmpeg

stream = ffmpeg.input(rtsp_link, t=10)
print(stream)

file = stream.output("test.mp4")
testfile = file.run()#capture_stdout=True, capture_stderr=True


    


    but this save the video file in high space, for 10 second video, the file occupies around 3 Mb, how to reduce the file size

    


    thanks

    


  • How can I make ffmpeg output proper SDP data for a data stream

    8 juillet 2021, par Shalom Crown

    I have a program based on the FFMPEG libraries, to add KLV data to a video stream. When I try to sent the output to an RTSP server (rtsp-simple-server), I get a 400 response.

    


    The apparent reason is that the SDP data for the KLV stream is missing the rtpmap.

    


    I would like to add the missing data either by setting the proper parameters in the contexts, or by specifying the data explicitly.

    


    This is the ANNOUNCE captured with Wireshark

    


    ANNOUNCE rtsp://0.0.0.0:8554/test RTSP/1.0
Content-Type: application/sdp
CSeq: 2
User-Agent: Lavf58.29.100
Content-Length: 270

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 58.29.100
m=video 0 RTP/AVP 96
b=AS:10000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1
a=control:streamid=0
m=application 0 RTP/AVP 97
b=AS:90
a=control:streamid=1


    


    Code fragment for initializing the data stream :

    


    AVStream* data_track = avformat_new_stream(muxer, nullptr);

if (data_track == nullptr) {
    LOG_ERROR << "failed to open data output stream";
    return nullptr;
}

muxer->oformat->video_codec = AV_CODEC_ID_H264;

AVCodec *klvEncoder = avcodec_find_encoder(AV_CODEC_ID_SMPTE_KLV);

if (klvEncoder == nullptr) {
    klvEncoder = avcodec_find_encoder(AV_CODEC_ID_BIN_DATA);
}

if (klvEncoder == nullptr) {
    klvEncoder = avcodec_find_encoder(AV_CODEC_ID_TEXT);
}

if (klvEncoder != nullptr) {
    klvEncoderContext = avcodec_alloc_context3(encoder);

    avcodec_parameters_from_context(data_track->codecpar, encoderContext);
} else {
    avcodec_parameters_copy(data_track->codecpar, pVideoStream->codecpar);
}

data_track->codecpar->codec_tag =  KLV_ID_TAG;
data_track->codecpar->codec_type = AVMEDIA_TYPE_DATA;
data_track->codecpar->codec_id = AV_CODEC_ID_SMPTE_KLV;
data_track->codecpar->bit_rate = 90000;
data_track->codecpar->format =  AV_SAMPLE_FMT_U8;
data_track->stream_identifier = KLV_ID_TAG;
data_track->id = 0x101;
data_track->time_base = video_track->time_base;
data_track->avg_frame_rate = video_track->time_base;


    


  • Can't save process's output stream to file

    10 octobre 2018, par Wahid Masud

    I’m using ffmpeg.exe as a process and output the converted video to memory, then from memory I’m saving the data to a video file (this is the requirement I can’t directly save the converted video to a file). But the conversion is not working for some reason, Here is what I’ve tried,

    var ffmpeg = HttpContext.Current.Server.MapPath("~/FFMpeg/ffmpeg.exe");
    var outputDir = HttpContext.Current.Server.MapPath("~/Uploads/converted.mp4");
    var inputDir = "https://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_10mb.mp4";
    var args = "-i " + inputDir + " -c:v libx264 -preset veryslow -crf 26 " +
               "-ar 44100 -ac 2 -c:a aac -strict -2 -b:a 128k -";

    var process = new Process();
    process.StartInfo.UseShellExecute = false;
    process.StartInfo.FileName = ffmpeg;
    process.StartInfo.WorkingDirectory = ffmpeg.Replace("\\ffmpeg.exe", "");
    process.StartInfo.Arguments = args;
    process.StartInfo.RedirectStandardOutput = true;
    process.Start();
    process.EnableRaisingEvents = true;
    //process.WaitForExit();
    Stream output = process.StandardOutput.BaseStream;
    process.Exited += (sender, e) =>
    {
       using (var fileStream = File.Create(outputDir))
       {
           output.Seek(0, SeekOrigin.Begin);
           output.CopyTo(fileStream);
       }
    };  

    The output file converted.mp4 is created but its 0 kb.