Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (65)

Sur d’autres sites (13422)

  • ffmpeg how to do the "earrape" sound effect

    20 avril 2020, par Shalin Shah

    I was wondering how to do the earrape effect using ffmpeg where the audio just sounds completely destroyed. Here's an example :
https://www.youtube.com/watch?v=KiCmvQiAC8Q

    



    I've tried a bunch of combinations of different commands on ffmpeg and the closest I've gotten is the following (where I use the superequalizer and then make the volume super high) :

    



    import ffmpeg
(
    ffmpeg
    .input('shark.wav')
    .filter("superequalizer", 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20)
    .filter("volume", 10)
    .output('output_earrape.wav')
    .run()
)


    



    I'm using a python wrapper but here's the command line equivalent :

    



    ffmpeg -i shark.wav -af "superequalizer=1b=20:2b=20:3b=20:4b=20:5b=20:6b=20:7b=20:8b=20:9b=20:10b=20:11b=20:12b=20:13b=20:14b=20:15b=20:16b=20:17b=20:18b=20,volume=10" output_earrape.wav


    



    The problem with the above is that it doesn't do anything for files that aren't already super loud (such as recorded audio) and most of the time the audio actually just ends up clipping and then being super soft.

    



    Does anyone have suggestions on how to do this effect ? Thanks !

    


  • cbs_mpeg2 : Fix parsing of picture and slice headers

    20 juin 2019, par Andreas Rheinhardt
    cbs_mpeg2 : Fix parsing of picture and slice headers
    

    1. The extra information in slice headers was parsed incorrectly :
    In the first reading pass to derive the length of the extra information,
    one should look at bits n, n + 9, n + 18, ... and check whether they
    equal one (further extra information) or zero (end of extra information),
    but instead bits n, n + 8, n + 16, ... were inspected. The second pass
    of reading (where the length is already known and the bytes between the
    length-determining bits are copied into a buffer) did not record what
    was in bits n, n + 9, n + 18, ..., presuming they equal one. And during
    writing, the bytes in the buffer are interleaved with set bits and
    written. This means that if the detected length of the extra information
    was greater than the real length, the output was corrupted. Fortunately
    no sample is known that made use of this mechanism : The extra information
    in slices is still marked as reserved in the specifications. cbs_mpeg2
    is now ready in case this changes.

    2. Furthermore, the buffer is now padded and slightly different, but
    very similar code for reading resp. writing has been replaced by code
    used for both. This was made possible by a new macro, the equivalent
    to cbs_h2645's fixed().

    3. These changes also made it possible to remove the extra_bit_slice
    element from the MPEG2RawSliceHeader structure. Said element was always
    zero except when the detected length of the extra information was less
    than the real length.

    4. The extra information in picture headers (which uses essentially the
    same syntax as the extra information in slice headers) has simply been
    forgotten. This meant that if this extra information was present, it was
    discarded during reading ; and unfortunately writing created invalid
    bitstreams in this case (an extra_bit_picture - the last set bit of the
    whole unit - indicated that there would be a further byte of data,
    although the output didn't contain said data).

    This has been fixed ; both types of extra information are now parsed via
    the same code and essentially passed through.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/cbs_mpeg2.c
    • [DH] libavcodec/cbs_mpeg2.h
    • [DH] libavcodec/cbs_mpeg2_syntax_template.c
  • cbs_h264, h264_metadata : Deleting SEI messages never fails

    8 juillet 2019, par Andreas Rheinhardt
    cbs_h264, h264_metadata : Deleting SEI messages never fails
    

    Given the recent changes to ff_cbs_delete_unit, it is no longer sensible
    to use a return value for ff_cbs_h264_delete_sei_message ; instead, use
    asserts to ensure that the required conditions are met and remove the
    callers' checks for the return value. Also, document said conditions.

    An assert that is essentially equivalent to the one used in
    ff_cbs_delete_unit has been removed, too.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavcodec/cbs_h264.h
    • [DH] libavcodec/cbs_h2645.c
    • [DH] libavcodec/h264_metadata_bsf.c