Recherche avancée

Médias (0)

Mot : - Tags -/performance

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

Autres articles (51)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (8002)

  • How to sum audio from two streams in ffmpeg

    9 février 2021, par user3188445

    I have a video file with two audio streams, representing two people talking at different times. The two people never talk at the same time, so there is no danger of clipping by summing the audio. I would like to sum the audio into one stream without reducing the volume. The ffmpeg amix filter has an option that would seem to do what I want, but the option does not seem to work. Here are two minimal non-working examples (the audio tracks are [0:2] and [0:3]) :

    


    ffmpeg -i input.mkv -map 0:0 -c:v copy \
       -filter_complex '[0:2][0:3]amix' \
       output.m4v

ffmpeg -i input.mkv -map 0:0 -c:v copy \
       -filter_complex '[0:2][0:3]amix=sum=sum' \
       output.m4v


    


    The first example diminishes the audio volume. The second example is a syntax error. I tried other variants like amix=sum and amix=sum=1, but despite the documentation I don't think the sum option exists any more. ffmpeg -h filter=amix does not mention the sum option (ffmpeg version n4.3.1).

    


    My questions :

    


      

    1. Can I sum two audio tracks with ffmpeg, without losing resolution. (I'd rather not cut the volume in half and scale it up, but if there's no other way I guess I'd accept and answer that sacrifices a bit.)

      


    2. 


    3. Is there an easy way to adjust the relative delay of one of the tracks by a few milliseconds ?

      


    4. 


    


  • Create a mkv file with colored background and containing a given audio and subtitle stream

    25 mai 2023, par rdrg109

    Table of contents

    


      

    • The context
    • 


    • Minimal working example
    • 


    • What I've tried

        

      • Create a mkv file with colored background and an audio stream
      • 


      • Create a mkv file with colored background, an audio stream and a subtitles stream
      • 


      


    • 


    • The question
    • 


    


    


    The context

    


    I have a *.flac file and a *.srt file. I want to merge those files in a MKV file, but at the same time, I want to add a video stream. I want the video stream to show a green background the entire time.

    


    


    Minimal working example

    


    For our experimentation, let's create two sample files : one *.flac file and one *.srt file.

    


    The following command creates a *.flac file that lasts 60 seconds and contains a sine wave.

    


    $ ffmpeg -y -f lavfi -i "sine=f=1000:d=60" input.flac


    


    The following command creates a *.srt file. Note that our last subtitle lasts until the sixth second, this is intended.

    


    $ cat << EOF > input.srt
1
00:00:00,000 --> 00:00:03,000
This is the first subtitle in a
SRT file.

2
00:00:03,000 --> 00:00:06,000
This is the second subtitle in a
SRT file.
EOF


    


    


    What I've tried

    


    


    Create a mkv file with colored background and an audio stream

    


    I know how to create a MKV file containing a given audio stream and a colored background as the video stream.

    


    The following command creates a MKV file containing input.flac as the audio stream and green background as the video stream. The MKV file have the same duration as input.flac.

    


    $ ffmpeg \
  -y \
  -f lavfi \
  -i color=c=green:s=2x2 \
  -i input.flac \
  -c:v libx264 \
  -c:a copy \
  -shortest \
  output.mkv


    


    The following command shows the duration of the streams in the resulting file.

    


    $ ffprobe -v error -print_format json -show_entries stream=codec_type:stream_tags=duration output.mkv | jq -r ''


    


    {
  "programs": [],
  "streams": [
    {
      "codec_type": "video",
      "tags": {
        "DURATION": "00:00:58.200000000"
      }
    },
    {
      "codec_type": "audio",
      "tags": {
        "DURATION": "00:01:00.000000000"
      }
    }
  ]
}


    


    


    Create a mkv file with colored background, an audio stream and a subtitles stream

    


    To add a subtitles stream, I just need to specify the *.srt file. However, when I do this, the duration of the video is set to the time of the last subtitle in the *.srt file. This is expected because I have used -shortest. I would get the result I'm looking for if it were possible to specify the stream that -shortest gives top priority to. I haven't found this information on the Internet.

    


    $ ffmpeg \
  -y \
  -f lavfi \
  -i color=c=green:s=2x2 \
  -i input.flac \
  -i input.srt \
  -c:v libx264 \
  -c:a copy \
  -shortest \
  output.mkv


    


    The following command shows the duration of the streams in the resulting file. Note that the maximum duration of the resulting file is 6 seconds, while in the resulting file from the previous section it was 1 minute.

    


    $ ffprobe -v error -print_format json -show_entries stream=codec_type:stream_tags=duration output.mkv | jq -r ''


    


    {
  "programs": [],
  "streams": [
    {
      "codec_type": "video",
      "tags": {
        "DURATION": "00:00:01.160000000"
      }
    },
    {
      "codec_type": "audio",
      "tags": {
        "DURATION": "00:00:03.134000000"
      }
    },
    {
      "codec_type": "subtitle",
      "tags": {
        "DURATION": "00:00:06.000000000"
      }
    }
  ]
}


    


    


    The question

    


    Given a *.flac file and a *.srt file. How to merge them in a *.mkv file so that it has the *.flac file as the audio stream, the *.srt file as the subtitles stream and a green background as the video stream ?

    


  • checkasm/hevc_pel : Fix stack buffer overreads

    28 septembre 2021, par Andreas Rheinhardt
    checkasm/hevc_pel : Fix stack buffer overreads
    

    This patch increases several stack buffers in order to fix
    stack-buffer-overflows (e.g. in put_hevc_qpel_uni_hv_9 in
    line 814 of hevcdsp_template.c) detected with ASAN in the hevc_pel
    checkasm test.
    The buffers are increased by the minimal amount necessary
    in order not to mask potential future bugs.

    Reviewed-by : Martin Storsjö <martin@martin.st>
    Reviewed-by : "zhilizhao(赵志立)" <quinkblack@foxmail.com>
    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] tests/checkasm/hevc_pel.c