Recherche avancée

Médias (1)

Mot : - Tags -/sintel

Autres articles (45)

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

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • 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

Sur d’autres sites (9474)

  • FFmpeg for marking time video based on a reference date

    3 août 2016, par Denio Mariz

    I am trying to mark a timestamp in a video using Drawtext filter.
    FFmpeg easily marks timestamps based on localtime, gmtime or even PTS. However, I want to assign a reference time (start time) for the timestamp in order to represent the time the video was recorded (not encoded).

    Reading the documentation, I found that option "basetime" can be used for this purpose. However it seems that is not working or I am missing something.

    The command line I am using is :

    ffmpeg -y -i input.mp4 -filter_complex drawtext="fontfile=/tmp/UbuntuMono-B.ttf: fontsize=36: fontcolor=yellow: box=1: boxcolor=black@0.4: text='Wall Clock Time\: %{gmtime\:%Y-%m-%d %T}': basetime=1456007118" output.mp4

    By using basetime=1456007118", it was expected the start time was set to ’02/20/2016 20:25:18’ since 1456007118 is the UTC time for that time and date :

    date -d '02/20/2016 20:25:18' +"%s" # format MM/DD/AAAA hh:mm:ss
    1456007118

    However, no error is issued by FFMpeg and the video is marked with current GMT, ignoring "basetime" option.

    Any hint ?
    Thanks.

    Complete information about FFmpeg version and output is :

       ffmpeg -y -i /home/denio/Videos/Interstellar_2014_Trailer_4_5.1-1080p-HDTN.mp4 -filter_complex drawtext="fontfile=/tmp/UbuntuMono-B.ttf: fontsize=36: fontcolor=yellow: box=1: boxcolor=black@0.4: text='Wall Clock Time\: %{gmtime\:%Y-%m-%d %T}': basetime=1470226363" /tmp/x.mp4
       ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
         built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2.1) 20160413
         configuration: --enable-libxavs --enable-bzlib --enable-libfaac --enable-libfreetype --enable-libfontconfig --enable-libmp3lame --enable-libschroedinger --enable-libspeex --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-zlib --enable-x11grab --enable-static --enable-pthreads --enable-gpl --enable-nonfree --enable-version3 --disable-ffserver --enable-libgsm --enable-librtmp --enable-libvpx --enable-libschroedinger --enable-libopencore-amrnb --enable-libopenjpeg
         libavutil      55. 28.100 / 55. 28.100
         libavcodec     57. 48.101 / 57. 48.101
         libavformat    57. 41.100 / 57. 41.100
         libavdevice    57.  0.101 / 57.  0.101
         libavfilter     6. 47.100 /  6. 47.100
         libswscale      4.  1.100 /  4.  1.100
         libswresample   2.  1.100 /  2.  1.100
         libpostproc    54.  0.100 / 54.  0.100
       ...
       ...
  • Manipulate video with ffmpeg without losing quality

    17 août 2016, par TheChymera

    I am rotating a video with ffmpeg with the following code :

    ffmpeg -i nd750_a0040.MOV -vf "transpose=dir=clock, transpose=dir=clock" out.mkv

    The resulting file is almost 10x smaller than the input.
    I have found this question which addresses a related question and suggsts passing to ffmpeg the codec and bitrate obtained from the following :

    bitratev="$(ffmpeg -i "$1" -f null - |& grep video: | awk -F'[:|kB]' '{print $2}')"
    codecv="$(ffprobe -loglevel error -select_streams v:0 -show_entries stream=codec_name -of default=nk=1:nw=1 "$1")"

    however, both of these commands give me the same output for both files : 2643 and h264 respectively.
    Am I correct in assuming that ffmpeg keeps these values the same for the output - by default ?

    However, if I inspect the files with ffmpeg -i I get different bitrate values :

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'nd750_a0040.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 537331968
       compatible_brands: qt  niko
       creation_time   : 2016-06-18 04:28:03
     Duration: 00:15:40.74, start: 0.000000, bitrate: 11569 kb/s
       Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m), 1920x1080, 10029 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
       Metadata:
         creation_time   : 2016-06-18 04:28:03
       Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
       Metadata:
         creation_time   : 2016-06-18 04:28:03

    and

    Input #0, matroska,webm, from 'out.mkv':
     Metadata:
       COMPATIBLE_BRANDS: qt  niko
       MAJOR_BRAND     : qt  
       MINOR_VERSION   : 537331968
       ENCODER         : Lavf56.40.101
     Duration: 00:15:40.74, start: 0.000000, bitrate: 1445 kb/s
       Stream #0:0(eng): Video: h264 (High), yuvj420p(pc), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
       Metadata:
         CREATION_TIME   : 2016-06-18 04:28:03
         LANGUAGE        : eng
         ENCODER         : Lavc56.60.100 libx264
         DURATION        : 00:15:40.742000000
       Stream #0:1(eng): Audio: vorbis, 48000 Hz, stereo, fltp (default)
       Metadata:
         CREATION_TIME   : 2016-06-18 04:28:03
         LANGUAGE        : eng
         ENCODER         : Lavc56.60.100 libvorbis
         DURATION        : 00:15:40.743000000

    So I have a few questions :

    • Which bitrate is the correct one for each video ?
    • Is all of the information loss between these two files covered by the bitrate (or does ffmpeg by default change other things that lead to a lower file size as well - if so, what ?) ?
    • How do I make sure nothing else changes but the container format and the rotation ?
  • How improves Video Player processing using Qt and FFmpeg ?

    13 septembre 2016, par Eric Menezes

    A time ago, I started to develop a video player/analyser. For beeing an analyser as well, the application should have inside its buffer the next frames and the previous as well. That’s where the complication begins.

    For that, we started to use an VideoProducer that decodes the frames and audio from video (using ffmpeg), added it into a buffer from where the video and audio consumers retrieve that objects (VideoFrame and AudioChunk). For this job, we have some QThreads which is one producer, 2 consumers and (the biggest trouble maker) 2 workers that is used to retrieve objects from producer’s buffer and insert them into a circular buffer (that because of previous frames). These workers are important because of the backwards buffering job (this player should play backwards too).

    So, now the player is running well, but not so good. It’s notable that is losing performance. Like removing producer buffer and using just the circular. But still, some questions remains :

    • Should I continue using QThread with reimplemented run() ? I read that works better with Signals & Slots ;

    • If Signals & Slots worth it, the producer still needs to reimplement QThread::run(), right ?

    • Cosidering that buffer must have some previous frames and bad quality videos will be reproduced, is that (VideoProducer insert objects into a Buffer, AudioConsumer and FrameConsumer retrieve these objects from Buffer and display/reproducer them) the better way ?

    • What is the best way to sync audio and video ? The sync using audio pts is doing well, but some troubles appear sometimes ; and

    • For buffering backwards, ffmpeg does not provide frames this way, so I need to seek back, decode older frames, reorder them and prepend to the buffer. This job has been done by that Workers, another QThread the keep consuming from Producer buffer and, if buffering backwards, asks for seek and do the reorder job. I can just guess that it is bad. And I assume that do this reorder job should be done at Producer level. Is that any way to do this better ?

    I know it’s a lot of questions, and I’m sorry for that, but I don’t know where to find these answers.

    Thanks for helping.

    For better understanding, heres how its been done :

    • VideoProducer -> Decoder QThread. Runs in a loop decoding and enqueuing frames into a Buffer.

    • FrameConsumer -> Video consumer. Retrieves frames from frame CircularBuffer in a loop using another QThread. Display the frame and sleep few mseconds based on video fps and AudioConsumer clock time.

    • AudioConsumer -> Audio consumer and video’s clock. Works with signals using QAudioOutput::notify() to retrieve chunks of audio from audio CircularBuffer and insert them into QAudioOutput buffer. When decodes the first frame, its pts is used to start the clock. (if a seek has been called, the next audio frame will mark the clock start time)

    • Worker -> Each stream (audio and video) has one. It’s a QThread running in a loop (run() reimplemented) retrieving objects from Buffer and inserting (backwards or forward) to CircularBuffer.

    And another ones that manage UI, filters, some operations with frames/chunks...