Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (54)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10602)

  • ffmpeg cut flv but resulting video cannot be processed on youtube

    20 avril 2017, par user1017674

    I am using a simple ffmpeg command to cut some videos.

    The command i ran is

    ffmpeg -i test.flv -ss 0 -to 60 -c copy output.flv

    The output.flv turns out is not processable on youtube, but I am able to play this file locally using a random flv player that I downloaded.

    This is the log when cutting the video.

    The original file test.flv can be found here.
    https://drive.google.com/open?id=0B5eHJIAbpaIYaW95ZlFTMTUzNGc

    The output file output.flv can be found here.
    https://drive.google.com/open?id=0B5eHJIAbpaIYejk5dGJTOEo1UU0

    ./ffmpeg -i test.flv -ss 0 -to 60 -c copy diablo.flv
    ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
     configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --enable-libvidstab --enable-libx265 --disable-doc --arch=x86_64 --enable-runtime-cpudetect
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, flv, from 'test.flv':
     Metadata:
       creator         : Coded
       metadatacreator : Yet Another Metadata Injector for FLV - Version 1.9
       hasKeyframes    : true
       hasVideo        : true
       hasAudio        : true
       hasMetadata     : true
       canSeekToEnd    : true
       datasize        : 69602014
       videosize       : 63600961
       audiosize       : 5917165
       lasttimestamp   : 292
       lastkeyframetimestamp: 292
       lastkeyframelocation: 69603218
     Duration: 00:04:51.68, start: 0.080000, bitrate: 1909 kb/s
       Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 1742 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
       Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 158 kb/s
    Output #0, flv, to 'diablo.flv':
     Metadata:
       creator         : Coded
       metadatacreator : Yet Another Metadata Injector for FLV - Version 1.9
       hasKeyframes    : true
       hasVideo        : true
       hasAudio        : true
       hasMetadata     : true
       canSeekToEnd    : true
       datasize        : 69602014
       videosize       : 63600961
       audiosize       : 5917165
       lasttimestamp   : 292
       lastkeyframetimestamp: 292
       lastkeyframelocation: 69603218
       encoder         : Lavf57.71.100
       Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(progressive), 1280x720, q=2-31, 1742 kb/s, 25 fps, 25 tbr, 1k tbn, 1k tbc
       Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 48000 Hz, stereo, fltp, 158 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    frame= 1252 fps=0.0 q=-1.0 Lsize=   12074kB time=00:00:59.98 bitrate=1648.8kbits/s speed=1.21e+03x    
    video:10849kB audio:1153kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.598021%
  • Trim with transition/fade using FFMPEG given a list of timestamps

    19 janvier 2024, par realsarm

    I have a video and a list of timestamps that I want to filter.

    


    [
  {
    "timestamp": [10, 20],
    "state": true
  },
  {
    "timestamp": [30, 40],
    "state": false
  },
  {
    "timestamp": [50, 60],
    "state": true
  },
  {
    "timestamp": [70, 80],
    "state": true
  }
]


    


    I have a script like this to trim based on state.

    


        video_path = Path(video_in.name)
    video_file_name = video_path.stem

    timestamps_to_cut = [
        (timestamps_var[i]['timestamp'][0], timestamps_var[i]['timestamp'][1])
        for i in range(len(timestamps_var)) if timestamps_var[i]['state']]

    between_str = '+'.join(
        map(lambda t: f'between(t,{t[0]},{t[1]})', timestamps_to_cut))

    if timestamps_to_cut:
        video_file = ffmpeg.input(video_path)
        video = video_file.video.filter(
            "select", f'({between_str})').filter("setpts", "N/FRAME_RATE/TB")
        audio = video_file.audio.filter(
            "aselect", f'({between_str})').filter("asetpts", "N/SR/TB")

        output_video = f'./videos_out/{video_file_name}.mp4'
        ffmpeg.concat(video, audio, v=1, a=1).output(
            output_video).overwrite_output().global_args('-loglevel', 'quiet').run()


    


    How can I smooth out this trimming like adding a fade or smoothing transition each time state is false ?

    


  • Reading RTMP streams using FFMPEG returns AVERROR_EOF randomly

    9 octobre 2013, par user2628781

    I am using FFMpeg to receive RTMP streams. This logic is placed in a custom video player I am building.

    I managed to successfully connect to the RTMP stream and display the video correctly. However, after a period in time, the stream terminates prematurely with an AVERROR_EOF when I perform av_read_frame().

    This indicates to me that the file has ended so my demux, video and audio threads terminates thinking that the video has ended.
    However, the video playback hasn't yet reached its end (in the case of a file streamed through rtmp) or from a live stream (which runs forever). The EOFs are received very randomly so it may run for say 7 min before this occurs or after 3 mins.

    Is this a characteristic behaviour of RTMP or am I doing something incorrectly ?
    I am also having a similar problem with Http Live Streams using FFMpeg.

    A small snippet of the code is provided below :

    AVPacket packet;
    //start timeout timer and timeout
    __interrupt_timer.start();

    int ret = av_read_frame(format_context, &packet); //0: ok, <0: error/end


    //invalidate the timer
    __interrupt_timer.invalidate();

    if (ret != 0) {
       if (ret == AVERROR_EOF) { //end of file. FIXME: why no eof if replaying by seek(0)?            
           if (!eof) {
               eof = true;
               started_ = false;
               pkt->data = QByteArray(); //flush
               pkt->markEnd();
               qDebug("End of file. %s %d", __FUNCTION__, __LINE__);
               emit finished();
               return true;
           }
           pkt->data = QByteArray(); //flush
           //return true;
           return false; //frames after eof are eof frames
       } else if (ret == AVERROR_INVALIDDATA) {
           qWarning("AVERROR_INVALIDDATA");
       } else if (ret == AVERROR(EAGAIN)) {
           return true;
       }
       qWarning("[AVDemuxer] error: %s", av_err2str(ret));
       return false;
    }