Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (52)

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (8192)

  • How to stich images into a video with resolution larger then 4K using FFMPEG ?

    14 janvier 2023, par Aviram Fireberger

    I have a folder with images that I've extracted from one video.
The resolution for each image is 5760 X 2880.
All images are in the following format :
out-1.jpg, out-2.jpg , out-3.jpg ..... out-1000.jpg

    


    I tried couple of different ways to stich them :

    


    Using CPU - libx264

    


    ffmpeg -r 30 -f image2 -s 5760X2880 -start_number 1 -i "AllFrames/out-%d.jpg" -vframes 119 -vcodec libx264 -crf 25  -pix_fmt yuv420p "/AllVideoChunks/Chunk_1.mp4"


    


    Worked well but the speed is about X0.05 only.

    


    Using GPU - h264_nvenc

    


    ffmpeg -r 30 -f image2 -s 4000X2000 -start_number 1 -i "AllFrames/out-%d.jpg" -vframes 119 -vcodec h264_nvenc -gpu  0 -preset slow -b:v 75M  -pix_fmt yuv420p"/AllVideoChunks/Chunk_1.mp4"


    


    Working very fast and high quality, but the problem is that I can't use it for images and output bigger then width 4096

    


    Using GPU - hevc_nvenc

    


    ffmpeg -r 30 -f image2 -s 5760X2880 -start_number 1 -i "AllFrames/out-%d.jpg" -vframes 119 -vcodec hevc_nvenc -gpu  0 -preset slow -b:v 75M  -pix_fmt yuv420p"/AllVideoChunks/Chunk_1.mp4"


    


    Working X10 more then the CPU at the speed of X0.5, good quality, but the problem is that I can't use it in normal players (can't play it in Unity)

    


    Is there another video codec that can work on GPU that support more then 4K resolution ?
Can I transform the 'hevc_nvenc ' output to 'h264' on GPU in higher resolution ? should I do this transformation on CPU ?

    


  • avcodec/bink : Fix off by 1 error in ref end

    11 janvier 2023, par Michael Niedermayer
    avcodec/bink : Fix off by 1 error in ref end
    

    Fixes : out of array access
    Fixes : 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-6657932926517248

    Alterantivly to this it is possibly to allocate a bigger array

    Note : oss-fuzz assigned this issue to a unrelated theora bug so the bug number matches that

    Found-by : continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavcodec/bink.c
  • Is there a pure golang implementation of aac transcode opus ? [closed]

    15 février 2023, par fanzhang

    Please note : pure golang implementation, no ffmpeg-wrapper / c-go

    &#xA;

    Is there a pure golang implementation of aac transcode opus ?

    &#xA;

    I've written a streaming-WebRTC gateway app that can convert av streams from streaming devices to WebRTC via pion, but now there's a tricky problem, the audio encoding provided by these media devices is usually aac(WebRTC do not support aac), I can't find a library that implements aac -> opus (or pcm -> opus) in pure go, only some library based on c-go (like this one). The c-go based library has some limitations, e.g. it can't be self-contained, so there a pure golang implementation of aac transcode opus ?

    &#xA;

    The code (snippet) below is my current implementation using Glimesh's fdk-aac and hraban's opus

    &#xA;

    ...&#xA;&#xA;    // 音频相关配置&#xA;    // https://github.com/Glimesh/go-fdkaac&#xA;    aacDecoder := fdkaac.NewAacDecoder()&#xA;    defer func() {&#xA;        _ = aacDecoder.Close()&#xA;    }()&#xA;    aacDecoderInitDone := false&#xA;&#xA;    var opusEncoder *hrabanopus.Encoder&#xA;    minAudioSampleRate := 16000&#xA;    var opusAudioBuffer []byte&#xA;    opusBlockSize := 960&#xA;    opusBufferSize := 1000&#xA;    opusFramesSize := 120&#xA;&#xA;...&#xA;&#xA;            // 用 AAC 的元数据初始化 AAC 编码器&#xA;            // https://github.com/winlinvip/go-fdkaac&#xA;            if tag.AACPacketType == flvio.AAC_SEQHDR {&#xA;                if !aacDecoderInitDone {&#xA;                    if err := aacDecoder.InitRaw(tagData); err != nil {&#xA;                        return errors.Wrapf(err, "从 %s.%s 的(音频元数据 %s)标签初始化 AAC 解码器失败", flowControlGroup, streamKey, hex.EncodeToString(tagData))&#xA;                    }&#xA;                    aacDecoderInitDone = true&#xA;&#xA;                    logrus.Infof("从 %s.%s 的(音频元数据 %s)标签初始化了 AAC 解码器 %p", flowControlGroup, streamKey, hex.EncodeToString(tagData), aacDecoder)&#xA;                }&#xA;            } else {&#xA;                tagDataString := hex.EncodeToString(tagData)&#xA;                logrus.Tracef("使用已初始化了的 AAC 解码器 %p 解码 %s.%s 的音频数据 %s", aacDecoder, flowControlGroup, streamKey, tagDataString)&#xA;&#xA;                // 解码 AAC 为 PCM&#xA;                decodeResult, err := aacDecoder.Decode(tagData)&#xA;                if err != nil {&#xA;                    return errors.Wrapf(err, "从 %s.%s 的标签解码 PCM 数据失败", flowControlGroup, streamKey)&#xA;                }&#xA;&#xA;                rate := aacDecoder.SampleRate()&#xA;                channels := aacDecoder.NumChannels()&#xA;&#xA;                if rate &lt; minAudioSampleRate {&#xA;                    logrus.Tracef("从 %s.%s 的标签解码 PCM 数据得到音频采样频 %d小于要求的最小值(%d),将忽略编码opus的操作", flowControlGroup, streamKey, rate, minAudioSampleRate)&#xA;                } else {&#xA;                    if opusEncoder == nil {&#xA;                        oEncoder, err := hrabanopus.NewEncoder(rate, channels, hrabanopus.AppAudio)&#xA;                        if err != nil {&#xA;                            return err&#xA;                        }&#xA;                        opusEncoder = oEncoder&#xA;                    }&#xA;&#xA;                    // https://github.com/Glimesh/waveguide/blob/a7e7745be31d0a112aa6adb6437df03960c4a5c5/internal/inputs/rtmp/rtmp.go#L289&#xA;                    // https://github.com/xiangxud/rtmp-to-webrtc/blob/07d7da9197cedc3756a1c87389806c3670b9c909/rtmp.go#L168&#xA;                    for opusAudioBuffer = append(opusAudioBuffer, decodeResult...); len(opusAudioBuffer) >= opusBlockSize*4; opusAudioBuffer = opusAudioBuffer[opusBlockSize*4:] {&#xA;                        pcm16 := make([]int16, opusBlockSize*2)&#xA;                        pcm16len := len(pcm16)&#xA;                        for i := 0; i &lt; pcm16len; i&#x2B;&#x2B; {&#xA;                            pcm16[i] = int16(binary.LittleEndian.Uint16(opusAudioBuffer[i*2:]))&#xA;                        }&#xA;                        opusData := make([]byte, opusBufferSize)&#xA;                        n, err := opusEncoder.Encode(pcm16, opusData)&#xA;                        if err != nil {&#xA;                            return err&#xA;                        }&#xA;                        opusOutput := opusData[:n]&#xA;&#xA;                        // https://datatracker.ietf.org/doc/html/rfc6716#section-2.1.4&#xA;                        // Opus can encode frames of 2.5, 5, 10, 20, 40, or 60 ms.  It can also&#xA;                        // combine multiple frames into packets of up to 120 ms.  For real-time&#xA;                        // applications, sending fewer packets per second reduces the bitrate,&#xA;                        // since it reduces the overhead from IP, UDP, and RTP headers.&#xA;                        // However, it increases latency and sensitivity to packet losses, as&#xA;                        // losing one packet constitutes a loss of a bigger chunk of audio.&#xA;                        // Increasing the frame duration also slightly improves coding&#xA;                        // efficiency, but the gain becomes small for frame sizes above 20 ms.&#xA;                        // For this reason, 20 ms frames are a good choice for most&#xA;                        // applications.&#xA;                        sampleDuration := time.Duration(opusFramesSize) * time.Millisecond&#xA;                        sample := media.Sample{&#xA;                            Data:     opusOutput,&#xA;                            Duration: sampleDuration,&#xA;                        }&#xA;                        if err := audioTrack.WriteSample(sample); err != nil {&#xA;                            return err&#xA;                        }&#xA;                    }&#xA;                }&#xA;            }&#xA;&#xA;...&#xA;

    &#xA;

    Also, is there a pure-go ffmpeg alternative ? not wrappers

    &#xA;