Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (70)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Les statuts des instances de mutualisation

    13 mars 2010, par

    Pour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
    Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)

Sur d’autres sites (11235)

  • FFmpeg muxing theora/vorbis unable to flush ?

    11 novembre 2013, par user2979732

    I'm pretty new to ffmpeg and it's confusing. I'm working on a basic muxer and have been spending over a week on this - I don't normally post as I solve 98% of my issues with google, but unable to get this one so far.

    The basis of my source is FFmpeg's own muxing.c example. When I try to force it using libvorbis for audio, and create "test.ogg" it demonstrates the same issues I'm having in my own derivation of muxing.c. The problem is with ogg/theora/vorbis. I'm forcing the use of audio codec like this :

    audio_st = add_stream(oc, &audio_codec, avcodec_find_encoder_by_name("libvorbis")->id);

    It seems the problem is in not setting audio pts in the muxing.c sample. There is a confusion in general about this, nobody apart from this guy didn't address what I am looking for http://webcache.googleusercontent.com/search?q=cache:6ml82RMN3YYJ:ffmpeg.org/pipermail/libav-user/2013-April/004304.html+&cd=4&hl=en&ct=clnk&gl=cz

    I couldn't find any answers to that naturally - like why don't they set the audio pts ? Laziness ? Not needed ? Do they believe all encoders will produce the pts for them(not true as seen below) ?

    Anyway, when you try muxing.c with mp4/libx264/forced libmp3lame all is fine, but the encoder says that "encoder did not produce valid pts, making some up.". However, it's silent with ogg/theora/vorbis, as if there were valid pts(?) but the result is no audio packets present in the stream(!), at least from what I saw using ffprobe. Which results in the video not being able to replay even, until you take out the empty audio stream. Then it plays the video, which shows that stream is fine.

    Coming to my original issue. I tried setting the pts on the audio frame you're sending to the encoder to fix that problem(this already sucks). I was unable to find a definite answer how to properly set the pts - that's the other big issue as I'm trying stuff which I'm not sure works. Anyway, in the end when setting "some" pts, this results in ogg with sound.

    if (frame->pts == AV_NOPTS_VALUE) frame->pts = audio_sync_opts;
    audio_sync_opts = frame->pts + frame->nb_samples;

    I'm aware I should probably use rescaling to adjust for the container time bases etc..if this was present/explained in ffmpeg's own sample I wouldn't have to guess now (as I'm stil not 100% sure about time base relationship between container and codec, I think container time base takes somehow over the codec one).

    My other problem is flushing - but that might have something to do with the screwed up pts. So I won't rather get into that in detail - the basic problem is, when I send finite number of audio frames, like 20, I get 2 packets only for example. From my understanding, I need to flush the rest of audio after all the encoding/muxing is done, which I managed to do with mp4/libx264/libmp3lame, but with ogg/theora/vorbis it doesn't flush. Why not, I have no idea.

    If someone could rework muxing.c into sending it finite number of audio / video frames - ie . not until duration > X, but until it sent 20 video & 100 audio frames(just an example). So that number of frames I have is important, not the video time I end up with. Then encode / mux all the frames - with proper video/audio pts, working with theora/ogg and flushing if needed, that would probably solve all of my issues. I'm sure for an expert ffmpeg'er modifying muxing.c addressing all those things would be a pretty quick exercise and could help more than 1 confused person.

    Thanks !

  • Opening file with unknown extension (Mjpeg ?) in OpenCV python

    14 novembre 2013, par bw4sz

    I am trying to open a third party video file into OpenCV with python.
    My camera (plotwatcher camera trap) shoots in a silly proprietary format. The extension is unique (.tlv) but i can play the file in VLC, and using ffmpeg i can see the following encoding :

    C:\Users\Ben>ffmpeg -i C:/Users/Ben/Documents/OpenCV_HummingbirdsMotion/PlotwatcherTest.tlv

    ffmpeg version N-58037-g355cea8 Copyright (c) 2000-2013 the FFmpeg developers
    built on Nov 11 2013 18:01:42 with gcc 4.8.2 (GCC)
    configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
    cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
    ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
    libavutil      52. 52.100 / 52. 52.100
    libavcodec     55. 41.100 / 55. 41.100
    libavformat    55. 21.100 / 55. 21.100
    libavdevice    55.  5.100 / 55.  5.100
    libavfilter     3. 90.102 /  3. 90.102
    libswscale      2.  5.101 /  2.  5.101
    libswresample   0. 17.104 /  0. 17.104
    libpostproc    52.  3.100 / 52.  3.100
    Input #0, avi, from 'C:/Users/Ben/Documents/OpenCV_HummingbirdsMotion/Plotwatche
    rTest.tlv':
    Duration: 00:00:05.00, start: 0.000000, bitrate: 14608 kb/s
    Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p(pc), 1280x720, 10 tb
    r, 10 tbn, 10 tbc

    From this i can see file is encoded into mjpeg format.

    How can i open this file in open cv ?

    import cv2
    #import cv2.cv as cv
    import numpy as np
    cap = cv2.VideoCapture("C:/Users/Ben/Documents/OpenCV_HummingbirdsMotion/PlotwatcherTest.mjpg")
    ret, frame = cap.read()
    #show first image
    cv2.imshow('my window',frame)
    cv2.waitKey(0)
    cv2.destroyWindow('my window')

    I can see nothing has been loaded. When i try to view the first frame i get the error :

    File "C:\Users\Ben\Documents\OpenCV_HummingbirdsMotion\Test.py", line 21, in <module>
    cv2.imshow(&#39;my window&#39;,frame)
    error: ..\..\..\..\opencv\modules\highgui\src\window.cpp:261: error: (-215)
    size.width>0        &amp;&amp; size.height>0
    </module>

    I've tried leaving the native .tlv, mjpeg and mjpg, and .MJPG endings following the conceptual idea found here : MJPEG stream fails to open in OpenCV 2.4

    i appreciate all help !

  • Changing portrait videos to landscape aspect with latest ffmpeg release is breaking

    19 décembre 2016, par zeal

    I am having an issue scaling videos recorded in portrait with the latest version of ffmpeg (2.1). This worked fine in a previous version, but I need the lastest version to fix a different issue.

    I am trying to take any video passed and make it 852 wide by 480 high. It works fine when converting videos that are wider then tall, but when the video is taller then wide it corrupts the video. It actually adds a letter box to the top and bottom, rather then left and right. Also, the meta data shows it as the correct height & width, but its wrong when played in windows.

    Here are the parameters I am using.

    ffmpeg -i INPUT -s 852x480 -r 30 -aspect 1.775 -b:v 2000000 -vcodec mpeg4 -vf "scale=iw*min(852/iw\,480 /ih):ih*min(852/iw\,480 /ih),pad=852:480 :(852-iw)/2:(480 -ih)/2" -ac 2 -b:a 128k -ar 44100 -y OUTPUT

    Console output from ffmpeg -i INPUT -r 30 -b:v 2000000 -vcodec mpeg4 -vf "scale=852:480" -ac 2 -b:a 128k -ar 44100 -y OUTPUT :

    C:\Lib>ffmpeg -i "d\ca96cd13-2995-4794-b753-22be3b918659.mov" -r 30 -b:v 2000000 -vcodec mpeg4 -vf "
    scale=852:480" -ac 2 -b:a 128k -ar 44100 -y "d\portx.mp4"
    ffmpeg version N-58015-g8cdf4e0 Copyright (c) 2000-2013 the FFmpeg developers
     built on Nov 10 2013 18:04:45 with gcc 4.8.2 (GCC)
     configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32thread
    s --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-icon
    v --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-
    libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
    b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr -
    -enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
    enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enab
    le-libxavs --enable-libxvid --enable-zlib
     libavutil      52. 52.100 / 52. 52.100
     libavcodec     55. 41.100 / 55. 41.100
     libavformat    55. 21.100 / 55. 21.100
     libavdevice    55.  5.100 / 55.  5.100
     libavfilter     3. 90.102 /  3. 90.102
     libswscale      2.  5.101 /  2.  5.101
     libswresample   0. 17.104 /  0. 17.104
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd\ca96cd13-2995-4794-b753-22be3b918659.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 0
       compatible_brands: qt
       creation_time   : 2013-11-12 15:02:21
       model           : iPhone 5
       model-eng       : iPhone 5
       encoder         : 7.0.2
       encoder-eng     : 7.0.2
       date            : 2013-11-12T10:02:21-0500
       date-eng        : 2013-11-12T10:02:21-0500
       make            : Apple
       make-eng        : Apple
     Duration: 00:00:15.48, start: 0.000000, bitrate: 780 kb/s
       Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 7
    05 kb/s, 29.98 fps, 30 tbr, 600 tbn, 1200 tbc (default)
       Metadata:
         rotate          : 90
         creation_time   : 2013-11-12 15:02:21
         handler_name    : Core Media Data Handler
       Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 kb/s (default)
       Metadata:
         creation_time   : 2013-11-12 15:02:21
         handler_name    : Core Media Data Handler
    Output #0, mp4, to 'd\portx.mp4':
     Metadata:
       major_brand     : qt
       minor_version   : 0
       compatible_brands: qt
       make-eng        : Apple
       model           : iPhone 5
       model-eng       : iPhone 5
       make            : Apple
       encoder-eng     : 7.0.2
       date            : 2013-11-12T10:02:21-0500
       date-eng        : 2013-11-12T10:02:21-0500
       encoder         : Lavf55.21.100
       Stream #0:0(und): Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 852x480, q=2-31, 2000 kb/s, 15360
    tbn, 30 tbc (default)
       Metadata:
         rotate          : 90
         creation_time   : 2013-11-12 15:02:21
         handler_name    : Core Media Data Handler
       Stream #0:1(und): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128
    kb/s (default)
       Metadata:
         creation_time   : 2013-11-12 15:02:21
         handler_name    : Core Media Data Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 -> mpeg4)
     Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
    Press [q] to stop, [?] for help
    frame=  465 fps=417 q=3.8 Lsize=    4118kB time=00:00:15.52 bitrate=2173.3kbits/s
    video:3860kB audio:243kB subtitle:0 global headers:0kB muxing overhead 0.348231%