Recherche avancée

Médias (1)

Mot : - Tags -/punk

Autres articles (105)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • 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 (15540)

  • Artifacts after HEVC 10-bit encoding using NVENC

    18 juillet 2017, par Cryman

    Recently I purchased a brand new GPU - AORUS GeForce GTX 1080 Ti. I found out that it supports HEVC 10-bit encoding, so I wanted to give that a try. Unfortunately, after encoding I noticed some artifacts, which occur in dark scenes and last one frame of the video. You can see them on these screenshots :

    Screenshot of a still from an animated scene. There is an artifact near the bottom and slightly to the left. It is square shaped with white squiggles.

    Screenshot of a still from another animated scene. The artifact looks the same as in the previous image but is in a different location, higher up and closer to the center.

    I was wondering if someone could help me figure out what might be the cause of these artifacts and how I can get rid of them.

    Here is the MI of the source video :

    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.1
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : V_MPEG4/ISO/AVC
    Duration                                 : 2 h 2 min
    Bit rate mode                            : Variable
    Bit rate                                 : 29.5 Mb/s
    Maximum bit rate                         : 37.0 Mb/s
    Width                                    : 1 920 pixels
    Height                                   : 1 080 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Constant
    Frame rate                               : 23.976 (24000/1001) FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.593
    Stream size                              : 25.2 GiB (66%)
    Language                                 : English
    Default                                  : Yes
    Forced                                   : No

    And here is the MI of the encoded video :

    ID                                       : 1
    Format                                   : HEVC
    Format/Info                              : High Efficiency Video Coding
    Format profile                           : Main 10@L4@Main
    Codec ID                                 : V_MPEGH/ISO/HEVC
    Duration                                 : 2 h 2 min
    Bit rate                                 : 3 689 kb/s
    Width                                    : 1 920 pixels
    Height                                   : 800 pixels
    Display aspect ratio                     : 2.40:1
    Frame rate mode                          : Constant
    Frame rate                               : 23.976 (24000/1001) FPS
    Standard                                 : Component
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 10 bits
    Bits/(Pixel*Frame)                       : 0.100
    Stream size                              : 3.15 GiB (95%)
    Default                                  : Yes
    Forced                                   : No
    Color range                              : Limited

    The command I’m using for encoding :

    ffmpeg -hide_banner -i "" -map 0:v:0 -map_chapters -1 -map_metadata -1 -vf "crop=1920:800:0:140" -vcodec hevc_nvenc -pix_fmt p010le -preset hq -profile:v main10 -rc constqp -global_quality 21 -rc-lookahead 32 -g 240 -f matroska Video_CQP21_LAF32_GOP240.mkv
  • Can't lock std::mutex again

    16 juillet 2017, par user3567631

    Sorry for poor English.
    I referenced this FFMPEG to make ffmpeg decoder.
    The open will block, I make it run in detach thread.
    I added std::unique_lock to lock mutex in beginning of open.

    bool FFmpegWrapper::open(std::string strFileName)
    {
    std::unique_lock lock(g_Mutex, std::try_to_lock);

    m_pFormatContext = avformat_alloc_context();
    m_pFormatContext->probesize = 4 * 1024 *100;
    m_pFormatContext->max_analyze_duration = 0 * AV_TIME_BASE;

    if (avformat_open_input(&m_pFormatContext, strFileName.c_str(), nullptr, nullptr) != 0)
       return false;

    if (avformat_find_stream_info(m_pFormatContext, NULL) < 0)
       return false;

    m_iVideoStream = m_iAudioStream = -1;
    for (unsigned int i = 0; i < m_pFormatContext->nb_streams; i++)
    {
       if ((m_iVideoStream < 0) && (m_pFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO))
       {
           m_iVideoStream = i;
       }
       else if ((m_iAudioStream < 0) && (m_pFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO))
       {
           m_iAudioStream = i;
       }
    }

    if (!(hasVideo() || hasAudio()))
       return false; // Didn't find video or audio stream

    if (hasVideo())
    {
       if (!openVideoStream())
           return false;
    }

    if (hasAudio())
    {
       if (!openAudioStream())
           return false;
    }

    retrieveFileInfo();

    m_bIsFileOpen = true;
    m_strFileName = strFileName;

    if (isImage())
    {
       m_dDurationInMs = 0;
       m_dFps = 0;
       m_lCurrentFrameNumber = 1;
       decodeImage();
    }

    m_bIsThreadRunning = false;
    if (m_bIsFileOpen)
       CCLOG("FFmpeg open stream succeed");
    else
       CCLOG("FFmpeg open stream failed");
    m_iState = eOpened;

    return m_bIsFileOpen;
    }

    and added unique_lock in close beginning like this.

    void FFmpegWrapper::close()
    {
    std::unique_lock lock(g_Mutex, std::try_to_lock);
    while (!lock.owns_lock())
    {
       lock.try_lock()
    }

    stop();

    if (m_pVideoBuffer != nullptr)
    {
       delete m_pVideoBuffer;
       m_pVideoBuffer = nullptr;
    }

    if (m_pVideoFrameRGB != nullptr)
    {
       av_free(m_pVideoFrameRGB);
       m_pVideoFrameRGB = nullptr;
    }

    if (m_pVideoFrame != nullptr)
    {
       av_free(m_pVideoFrame);
       m_pVideoFrame = nullptr;
    }

    if (m_pAudioFrame != nullptr)
    {
       av_free(m_pAudioFrame);
       m_pAudioFrame = nullptr;
    }


    if (m_pSwScalingContext != nullptr)
    {
       sws_freeContext(m_pSwScalingContext);
       m_pSwScalingContext = nullptr;
    }

    if (m_pVideoCodecContext != nullptr)
    {
       avcodec_close(m_pVideoCodecContext);
       m_pVideoCodecContext = nullptr;
    }
    if (m_pAudioCodecContext != nullptr)
    {
       avcodec_close(m_pAudioCodecContext);
       m_pAudioCodecContext = nullptr;
    }

    if (m_pFormatContext != nullptr)
    {
       avformat_free_context(m_pFormatContext);    
       m_pFormatContext = nullptr;
    }
    if(m_pSwr != nullptr)
       swr_free(&m_pSwr);

    CCLOG("CLOSE DONE");
    }

    When open is still running ,I want lock mutex again in close in main thread.
    it failed to get mutex ownership it is no problem. But even while loop waited the open() done, try_lock still can’t get the mutex ownership.I thought unique_lock out of scope will unlock mutex ,but it didn’t. I want to know how can I lock the mutex correctly.Thank you !

  • Android + ffmpeg + AudioTrack produces bad audio output

    12 septembre 2014, par Goddchen

    here is what I am trying to do : use an AudioRecord and "pipe" the output of AudioRecord.read(byte[],...) to an ffmpeg process’ stdin that will convert to a 3gp (AAC) file.

    The ffmpeg call is as follows :

           ProcessBuilder processBuilder = new ProcessBuilder(BINARY.getAbsolutePath(),
                   "-y",
                   "-ar", "44100", "-c:a", "pcm_s16le", "-ac", "1","-f","s16le",
                   "-i", "-",
                   "-strict", "-2", "-c:a", "aac",
                   outFile.getAbsolutePath());

    The AudioRecord is setup as follows :

    AudioRecord record = new AudioRecord(/*AudioSource.VOICE_RECOGNITION,*/ AudioSource.MIC,
               SAMPLING_RATE,
               AudioFormat.CHANNEL_IN_MONO,
               AudioFormat.ENCODING_PCM_16BIT,
               bufferSize);

    SAMPLING_RATE = 44100 and bufferSize is the one returned by AudioRecord.getMinBufferSize(...)

    I am writing the data to ffmpeg like this :

    try {
                           IOUtils.write(data, getFFmpegHelper().getCurrentProcessOutputStream());
                       } catch (Exception e) {
                           Log.e(Application.LOG_TAG, "Error writing data to ffmpeg process", e);
                           //TODO notify user, stop the recording, etc...
                       }

    So far so good, the ffmpeg runs and created a proper 3gp file. But the audio in the file is totally off. It seems "choppy" (not sure if this is the correct english word ;) ) and also the pace is wrong, is plays too fast.

    Check out this sample : http://goddchen.de/android/tmp/tmp.3gp

    This is the output of the ffmpeg process :

       [s16le @ 0x23634d0] Estimating duration from bitrate, this may be inaccurate
       Guessed Channel Layout for  Input Stream #0.0 : mono
       Input #0, s16le, from 'pipe:':
       Duration: N/A, start: 0.000000, bitrate: 705 kb/s
       Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
       [aformat @ 0x2363100] auto-inserting filter 'auto-inserted resampler 0' between the filter 'src' and the filter 'aformat'
       [aresample @ 0x235b0a0] chl:mono fmt:s16 r:44100Hz -> chl:mono fmt:flt r:44100Hz
       Output #0, 3gp, to '/data/data/com.test.audio/files/tmp.3gp':
       Metadata:
       encoder         : Lavf54.6.100
       Stream #0:0: Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, flt, 128 kb/s
       Stream mapping:
       Stream #0:0 -> #0:0 (pcm_s16le -> aac)
       size=       3kB time=00:00:00.18 bitrate= 132.5kbits/s    
    size=       8kB time=00:00:00.55 bitrate= 120.9kbits/s    
    size=      12kB time=00:00:00.83 bitrate= 121.8kbits/s    
    size=      16kB time=00:00:01.04 bitrate= 122.8kbits/s    
    size=      20kB time=00:00:01.32 bitrate= 122.5kbits/s    
    size=      23kB time=00:00:01.53 bitrate= 121.6kbits/s    
    size=      27kB time=00:00:01.81 bitrate= 121.0kbits/s    
    size=      31kB time=00:00:02.11 bitrate= 120.7kbits/s    
    size=      35kB time=00:00:02.32 bitrate= 123.4kbits/s
       video:0kB audio:34kB global headers:0kB muxing overhead 3.031610%