Recherche avancée

Médias (1)

Mot : - Tags -/ogv

Autres articles (56)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

Sur d’autres sites (7573)

  • aarch64 : vp9 : Implement NEON loop filters

    13 novembre 2016, par Martin Storsjö
    aarch64 : vp9 : Implement NEON loop filters
    

    This work is sponsored by, and copyright, Google.

    These are ported from the ARM version ; thanks to the larger
    amount of registers available, we can do the loop filters with
    16 pixels at a time. The implementation is fully templated, with
    a single macro which can generate versions for both 8 and
    16 pixels wide, for both 4, 8 and 16 pixels loop filters
    (and the 4/8 mixed versions as well).

    For the 8 pixel wide versions, it is pretty close in speed (the
    v_4_8 and v_8_8 filters are the best examples of this ; the h_4_8
    and h_8_8 filters seem to get some gain in the load/transpose/store
    part). For the 16 pixels wide ones, we get a speedup of around
    1.2-1.4x compared to the 32 bit version.

    Examples of runtimes vs the 32 bit version, on a Cortex A53 :
    ARM AArch64
    vp9_loop_filter_h_4_8_neon : 144.0 127.2
    vp9_loop_filter_h_8_8_neon : 207.0 182.5
    vp9_loop_filter_h_16_8_neon : 415.0 328.7
    vp9_loop_filter_h_16_16_neon : 672.0 558.6
    vp9_loop_filter_mix2_h_44_16_neon : 302.0 203.5
    vp9_loop_filter_mix2_h_48_16_neon : 365.0 305.2
    vp9_loop_filter_mix2_h_84_16_neon : 365.0 305.2
    vp9_loop_filter_mix2_h_88_16_neon : 376.0 305.2
    vp9_loop_filter_mix2_v_44_16_neon : 193.2 128.2
    vp9_loop_filter_mix2_v_48_16_neon : 246.7 218.4
    vp9_loop_filter_mix2_v_84_16_neon : 248.0 218.5
    vp9_loop_filter_mix2_v_88_16_neon : 302.0 218.2
    vp9_loop_filter_v_4_8_neon : 89.0 88.7
    vp9_loop_filter_v_8_8_neon : 141.0 137.7
    vp9_loop_filter_v_16_8_neon : 295.0 272.7
    vp9_loop_filter_v_16_16_neon : 546.0 453.7

    The speedup vs C code in checkasm tests is around 2-7x, which is
    pretty much the same as for the 32 bit version. Even if these functions
    are faster than their 32 bit equivalent, the C version that we compare
    to also became around 1.3-1.7x faster than the C version in 32 bit.

    Based on START_TIMER/STOP_TIMER wrapping around a few individual
    functions, the speedup vs C code is around 4-5x.

    Examples of runtimes vs C on a Cortex A57 (for a slightly older version
    of the patch) :
    A57 gcc-5.3 neon
    loop_filter_h_4_8_neon : 256.6 93.4
    loop_filter_h_8_8_neon : 307.3 139.1
    loop_filter_h_16_8_neon : 340.1 254.1
    loop_filter_h_16_16_neon : 827.0 407.9
    loop_filter_mix2_h_44_16_neon : 524.5 155.4
    loop_filter_mix2_h_48_16_neon : 644.5 173.3
    loop_filter_mix2_h_84_16_neon : 630.5 222.0
    loop_filter_mix2_h_88_16_neon : 697.3 222.0
    loop_filter_mix2_v_44_16_neon : 598.5 100.6
    loop_filter_mix2_v_48_16_neon : 651.5 127.0
    loop_filter_mix2_v_84_16_neon : 591.5 167.1
    loop_filter_mix2_v_88_16_neon : 855.1 166.7
    loop_filter_v_4_8_neon : 271.7 65.3
    loop_filter_v_8_8_neon : 312.5 106.9
    loop_filter_v_16_8_neon : 473.3 206.5
    loop_filter_v_16_16_neon : 976.1 327.8

    The speed-up compared to the C functions is 2.5 to 6 and the cortex-a57
    is again 30-50% faster than the cortex-a53.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] libavcodec/aarch64/Makefile
    • [DBH] libavcodec/aarch64/vp9dsp_init_aarch64.c
    • [DBH] libavcodec/aarch64/vp9lpf_neon.S
  • FFmpeg remuxing parts of an audio file

    22 décembre 2022, par zorleone

    I'm trying to remux individual tracks from a FLAC file using the FFmpeg libraries.&#xA;I get the starting timestamps from a Cue sheet, I seek to the timestamps using avformat_seek_file. However after writing the packets to output files, they only have data from the beginning of the input file.

    &#xA;

    This is the code snippet which opens the input FLAC and also creates an output AVFormatContext for each track. I'm guessing the issue is avformat_seek_file, it doesn't seem to do anything, since even though I seek to the beginning of a track, the output file contains data from the beginning of the input.

    &#xA;

        for(int i = 0; i &lt;= sheet.ntracks; i&#x2B;&#x2B;) {&#xA;        sheet.avfmtctx = avformat_alloc_context();&#xA;        if(avformat_open_input(&amp;sheet.avfmtctx, sheet.file, NULL, NULL) &lt; 0) {&#xA;            fprintf(stderr,&#xA;                    "avformat_open_input(): failed to open %s\n",&#xA;                    sheet.file);&#xA;            return 1;&#xA;        }&#xA;        int audio_stream_idx = -1;&#xA;        for(int i = 0; i &lt; sheet.avfmtctx->nb_streams; i&#x2B;&#x2B;) {&#xA;            if(sheet.avfmtctx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {&#xA;                audio_stream_idx = i;&#xA;                break;&#xA;            }&#xA;        }&#xA;        avformat_find_stream_info(sheet.avfmtctx, NULL);&#xA;        AVFormatContext *output;&#xA;        char *filepath = title_to_filepath(&amp;sheet.tracks[i], sheet.file);&#xA;        avformat_alloc_output_context2(&amp;output, NULL, NULL, filepath);&#xA;        AVStream *out_audio_stream = avformat_new_stream(output, NULL);&#xA;        avcodec_parameters_copy(out_audio_stream->codecpar,&#xA;                                sheet.avfmtctx->streams[audio_stream_idx]->codecpar);&#xA;&#xA;        if(avio_open(&amp;output->pb, filepath, AVIO_FLAG_WRITE) &lt; 0) {&#xA;            fprintf(stderr, "Failed to open %s for writing\n", filepath);&#xA;            return 1;&#xA;        }&#xA;        if(avformat_write_header(output, NULL) &lt; 0) {&#xA;            fprintf(stderr, "avformat_write_header() failed\n");&#xA;            return 1;&#xA;        }&#xA;        int64_t current_frame = sheet.tracks[i].index;&#xA;        int64_t next_track_index = (i &lt; sheet.ntracks) ?&#xA;                                   sheet.tracks[i &#x2B; 1].index :&#xA;                                   INT64_MAX;&#xA;        if(avformat_seek_file(sheet.avfmtctx,&#xA;                           -1,&#xA;                           INT64_MIN,&#xA;                           current_frame,&#xA;                           current_frame,&#xA;                           0) &lt; 0) {&#xA;            fprintf(stderr, "Failed to seek to the index of track %d\n", i);&#xA;            avformat_free_context(sheet.avfmtctx);&#xA;            sheet.avfmtctx = NULL;&#xA;            av_write_trailer(output);&#xA;            avio_closep(&amp;output->pb);&#xA;            avformat_free_context(output);&#xA;            free(filepath);&#xA;            continue;&#xA;        }&#xA;        AVPacket *pkt = av_packet_alloc();&#xA;        int64_t pts_diff = AV_NOPTS_VALUE, dts_diff = AV_NOPTS_VALUE;&#xA;        while(current_frame &lt; next_track_index &amp;&amp; !avio_feof(output->pb)) {&#xA;            int ret;&#xA;            if((ret = av_read_frame(sheet.avfmtctx, pkt)) &lt; 0) {&#xA;                if(ret != AVERROR_EOF)&#xA;                    fprintf(stderr, "av_read_frame() failed: %s\n", av_err2str(ret));&#xA;                break;&#xA;            }&#xA;            if(pkt->stream_index != audio_stream_idx)&#xA;                continue;&#xA;            // runs only once&#xA;            if(pts_diff == AV_NOPTS_VALUE &amp;&amp; dts_diff == AV_NOPTS_VALUE) {&#xA;                pts_diff = pkt->pts;&#xA;                dts_diff = pkt->dts;&#xA;            }&#xA;&#xA;            pkt->stream_index = 0; // first and only stream&#xA;            pkt->pts -= pts_diff;&#xA;            pkt->dts -= dts_diff;&#xA;            pkt->pos = -1;&#xA;            av_interleaved_write_frame(output, pkt);&#xA;&#xA;            current_frame&#x2B;&#x2B;;&#xA;        }&#xA;&#xA;        avformat_free_context(sheet.avfmtctx);&#xA;        sheet.avfmtctx = NULL;&#xA;&#xA;        av_write_trailer(output);&#xA;        av_packet_free(&amp;pkt);&#xA;        avio_closep(&amp;output->pb);&#xA;        avformat_free_context(output);&#xA;&#xA;        free(filepath);&#xA;    }&#xA;&#xA;

    &#xA;

    current_frame and next_track_index are calculated from the INDEX lines in the Cue sheet : MM * 60 * 75 &#x2B; SS * 75 &#x2B; FF.&#xA;Can someone tell me what I'm doing wrong, and how to get the data I need from the input ?

    &#xA;

  • I cannot find any way to convert multiple jpg or png to gif in vb.net using ffmpeg

    4 juillet 2017, par Silvia Fonseca

    Is there anyway i can get multiples png or jpg images to gif using ffmpeg in vb.net
    I have start a new application to capture certain frames from a video but now i want to get all the frames extracted in gif image using ffmpeg.
    This is my code so far :
    I have in fact all ready try like this but not succeed
    I have made some changes and i get the gif file but in empty state
    This is my code so far

    Imports System.Diagnostics
    Imports System.ComponentModel
    Imports System
    Imports System.IO
    Public Class Form1
    Dim video = ""
    Dim startInfo As New ProcessStartInfo("ffmpeg.exe")
    Dim frame As Long 'individual frames
    Dim tempdir As String = "C:\avitogifconverter\" ' images temp directory
    Dim DestPath As String = "C:\avitogifconverter\"
    Public Declare Auto Function FindWindowNullClassName Lib "user32.dll" Alias "FindWindow" (ByVal lpClassname As Integer, ByVal lpWindownName As String) As Integer
    Dim Counter As Integer = 0

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
       My.Computer.FileSystem.CreateDirectory(tempdir)
       TextBox1.Text = "exp:-->video.avi or webm or flv"
       TextBox1.Clear()



    End Sub


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
       Dim p As Process = Process.Start("cmd", "/k ffmpeg.exe -i " + TextBox1.Text + " -filter:v fps=1/15 C:\avitogifconverter\out%02d.jpg")
       p.WaitForExit()

       If p.HasExited Then
           MsgBox("The Extraction Are Finish...")
       End If

    End Sub

    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
       Label3.Text = "cmd" + "/k ffmpeg.exe -i " + TextBox1.Text + " -filter:v fps=1/15 C:\avi to gif converter\out%02d.jpg"
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


       If (OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK) Then
           'TextBox1.Text = OpenFileDialog1.FileName
           TextBox1.Text = System.IO.Path.GetFileName(OpenFileDialog1.FileName)
       End If
       If TextBox1.Text = Nothing Then
           Return
       End If
       If TextBox1.Text &lt;> Nothing Then
           'My.Computer.FileSystem.CopyFile(TextBox1.Text, DestPath)
       End If

    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
       Dim args As String 'declare args
       args = " -framerate 1/5 -i C:\avitogifconverter\out%02d.jpg -c:v libx264 -r 30 -pix_fmt yuv420p C:\avitogifconverter\out.gif "
       Dim proc As New Process
       Dim proci As New ProcessStartInfo
       proci.FileName = My.Application.Info.DirectoryPath &amp; "\ffmpeg.exe"
       proci.Arguments = args
       proci.WindowStyle = ProcessWindowStyle.Hidden
       proci.CreateNoWindow = True
       proci.UseShellExecute = False
       proc.StartInfo = proci
       proc.Start()
       Do Until proc.HasExited = True
           Me.Text = "Saving"
       Loop
       Me.Text = "your video done"

       MsgBox("Done")

       'IO.Directory.Delete(tempdir, True)
    End Sub
    End Class