Recherche avancée

Médias (91)

Autres articles (89)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

  • Monitoring de fermes de MediaSPIP (et de SPIP tant qu’à faire)

    31 mai 2013, par

    Lorsque l’on gère plusieurs (voir plusieurs dizaines) de MediaSPIP sur la même installation, il peut être très pratique d’obtenir d’un coup d’oeil certaines informations.
    Cet article a pour but de documenter les scripts de monitoring Munin développés avec l’aide d’Infini.
    Ces scripts sont installés automatiquement par le script d’installation automatique si une installation de munin est détectée.
    Description des scripts
    Trois scripts Munin ont été développés :
    1. mediaspip_medias
    Un script de (...)

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

Sur d’autres sites (14573)

  • avcodec/[e]ac3enc : Fix indentation

    30 mars 2021, par Andreas Rheinhardt
    avcodec/[e]ac3enc : Fix indentation
    

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

    • [DH] libavcodec/ac3enc.c
    • [DH] libavcodec/eac3enc.c
  • Cannot extract audio tracks from video using ffmpeg

    29 juillet 2021, par Mentos

    I tried to extract and transcode audio tracks from video, but I got an error : Filter split:output1 has an unconnected output. How to fix this problem ?

    &#xA;

    ffmpeg command :

    &#xA;

    ffmpeg -i video.mp4 -filter_complex [0]split=2[s0][s1] -map [s0] -c:a aac -dn -map -0:v? -map 0:1 -map_chapters -1 -map_metadata -1 -sn video-0.aac -map [s1] -ac 2 -c:a aac -dn -map -0:v? -map 0:2 -map_chapters -1 -map_metadata -1 -sn video-1.aac -y&#xA;

    &#xA;

    fprobe full output (strip information about chapters) :

    &#xA;

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from &#x27;video.mp4&#x27;:&#xA;  Metadata:&#xA;    major_brand     : isom&#xA;    minor_version   : 512&#xA;    compatible_brands: isomiso2avc1mp41&#xA;    title           : SomeTitle&#xA;    encoder         : Lavf58.45.100&#xA;  Duration: 00:21:35.58, start: 0.000000, bitrate: 10591 kb/s&#xA;  Chapters:&#xA;    Chapter #0:0: start 0.000000, end 70.000000&#xA;      Metadata:&#xA;        title           : Chapter 1&#xA;...&#xA;...&#xA;    Chapter #0:20: start 1278.000000, end 1295.584000&#xA;      Metadata:&#xA;        title           : Last Chapter&#xA;  Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 9754 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 47.95 tbc (default)&#xA;    Metadata:&#xA;      handler_name    : VideoHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;  Stream #0:1(rus): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo, fltp, 192 kb/s (default)&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;    Side data:&#xA;      audio service type: main&#xA;  Stream #0:2(eng): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 640 kb/s&#xA;    Metadata:&#xA;      handler_name    : SoundHandler&#xA;      vendor_id       : [0][0][0][0]&#xA;    Side data:&#xA;      audio service type: main&#xA;  Stream #0:3(eng): Data: bin_data (text / 0x74786574), 0 kb/s&#xA;    Metadata:&#xA;      handler_name    : SubtitleHandler&#xA;

    &#xA;

  • Create Panorama from Non-Sequential Video Frames

    6 mai 2021, par M.Innat

    There is a similar question (not that detailed and no exact solution).

    &#xA;


    &#xA;

    I want to create a single panorama image from video frames. And for that, I need to get minimum non-sequential video frames at first. A demo video file is uploaded here.

    &#xA;

    What I Need

    &#xA;

    A mechanism that can produce not-only non-sequential video frames but also in such a way that can be used to create a panorama image. A sample is given below. As we can see to create a panorama image, all the input samples must contain minimum overlap regions to each other otherwise it can not be done.

    &#xA;

    enter image description here

    &#xA;

    So, if I have the following video frame's order

    &#xA;

    A, A, A, B, B, B, B, C, C, A, A, C, C, C, B, B, B ...&#xA;

    &#xA;

    To create a panorama image, I need to get something as follows - reduced sequential frames (or adjacent frames) but with minimum overlapping.

    &#xA;

         [overlap]  [overlap]  [overlap] [overlap]  [overlap]&#xA; A,    A,B,       B,C,       C,A,       A,C,      C,B,  ...&#xA;

    &#xA;

    What I've Tried and Stuck

    &#xA;

    A demo video clip is given above. To get non-sequential video frames, I primarily rely on ffmpeg software.

    &#xA;

    Trial 1 Ref.

    &#xA;

    ffmpeg -i check.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB -map 0:v out.mp4&#xA;

    &#xA;

    After that, on the out.mp4, I applied slice the video frames using opencv

    &#xA;

    import cv2, os &#xA;from pathlib import Path&#xA;&#xA;vframe_dir = Path("vid_frames/")&#xA;vframe_dir.mkdir(parents=True, exist_ok=True)&#xA;&#xA;vidcap = cv2.VideoCapture(&#x27;out.mp4&#x27;)&#xA;success,image = vidcap.read()&#xA;count = 0&#xA;&#xA;while success:&#xA;    cv2.imwrite(f"{vframe_dir}/frame%d.jpg" % count, image)     &#xA;    success,image = vidcap.read()&#xA;    count &#x2B;= 1&#xA;

    &#xA;

    Next, I rotated these saved images horizontally (as my video is a vertical view).

    &#xA;

    vframe_dir = Path("out/")&#xA;vframe_dir.mkdir(parents=True, exist_ok=True)&#xA;&#xA;vframe_dir_rot = Path("vframe_dir_rot/")&#xA;vframe_dir_rot.mkdir(parents=True, exist_ok=True)&#xA;&#xA;for i, each_img in tqdm(enumerate(os.listdir(vframe_dir))):&#xA;    image = cv2.imread(f"{vframe_dir}/{each_img}")[:, :, ::-1] # Read (with BGRtoRGB)&#xA;    &#xA;    image = cv2.rotate(image,cv2.cv2.ROTATE_180)&#xA;    image = cv2.rotate(image,cv2.ROTATE_90_CLOCKWISE)&#xA;&#xA;    cv2.imwrite(f"{vframe_dir_rot}/{each_img}", image[:, :, ::-1]) # Save (with RGBtoBGR)&#xA;

    &#xA;

    The output is ok for this method (with ffmpeg) but inappropriate for creating the panorama image. Because it didn't give some overlapping frames sequentially in the results. Thus panorama can't be generated.

    &#xA; &#xA;

    Trail 2 - Ref

    &#xA;

    ffmpeg -i check.mp4 -vf decimate=cycle=2,setpts=N/FRAME_RATE/TB -map 0:v out.mp4&#xA;

    &#xA;

    didn't work at all.

    &#xA;

    Trail 3

    &#xA;

    ffmpeg -i check.mp4 -ss 0 -qscale 0 -f image2 -r 1 out/images%5d.png&#xA;

    &#xA;

    No luck either. However, I've found this last ffmpeg command was close by far but wasn't enough. Comparatively to others, this gave me a small amount of non-duplicate frames (good) but the bad thing is still do not need frames, and I kinda manually pick some desired frames, and then the opecv stitching algorithm works. So, after picking some frames and rotating (as mentioned before) :

    &#xA;

    stitcher = cv2.Stitcher.create()&#xA;status, pano = stitcher.stitch(images) # images: manually picked video frames -_- &#xA;

    &#xA; &#xA;

    Update

    &#xA;

    After some trials, I am kinda adopting the non-programming solution. But would love to see an efficient programmatic approach.

    &#xA;

    On the given demo video, I used Adobe products (premiere pro and photoshop) to do this task, video instruction. But the issue was, I kind of took all video frames at first (without dropping to any frames and that will computationally cost further) via premier and use photoshop to stitching them (according to the youtube video instruction). It was too heavy for these editor tools and didn't look better way but the output was better than anything until now. Though I took few (400+ frames) video frames only out of 1200+.

    &#xA;

    enter image description here

    &#xA;


    &#xA;

    Here are some big challenges. The original video clips have some conditions though, and it's too serious. Unlike the given demo video clips :

    &#xA;

      &#xA;
    • It's not straight forward, i.e. camera shaking
    • &#xA;

    • Lighting condition, i.e. causes different visual look at the same spot
    • &#xA;

    • Cameral flickering or banding
    • &#xA;

    &#xA;

    This scenario is not included in the given demo video. And this brings additional and heavy challenges to create panorama images from such videos. Even with the non-programming way (using adobe tools) I couldn't make it any good.

    &#xA;


    &#xA;

    However, for now, all I'm interest to get a panorama image from the given demo video which is without the above condition. But I would love to know any comment or suggestion on that.

    &#xA;