Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (25)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (7103)

  • ffmpeg - concatenate several videos with xfade transition

    8 mai 2021, par ilim

    I have N videos, and I'm using ffmpeg to concatenate them with xfade transitions between them. The video files are named as positive integers representing their order in the concatenated output, and none of them have any audio. In fact, each file just includes a different image with no animation that stays on screen all through that video's duration.

    


    I'm using a simple command I found in a response to an existing question to concatenate the first 2 videos :

    


    ffmpeg -i 1.mp4 -i 2.mp4 -y
       -filter_complex "xfade=transition=fade:offset=3.5:duration=0.5"
       1-2.mp4


    


    I planned to employ that same command for all the videos, each time appending a single video to the cumulative one produced so far, and producing an intermediary output to be used later.

    


    Specifically, I first concatenated files 1.mp4 and 2.mp4, and recorded the result into 1-2.mp4, which was produced correctly. Videos had the respective duration of 4 and 8 seconds, and the resulting 1-2.mp4 was 12 seconds long, with the transition occurring when it should.

    


    The problem started when I tried concatenating 1-2.mp4 and 3.mp4. I used the following command to generate a concatenation of videos [1-3].

    


    ffmpeg -i 1-2.mp4 -i 3.mp4 -y
       -filter_complex "xfade=transition=fade:offset=11.5:duration=0.5"
       1-3.mp4


    


    The video produced seems to be an exact copy of 1-2.mp4, and contents of 3.mp4 are not present at all in the resulting 1-3.mp4. Video file 3.mp4 was 3 seconds long, but the resulting 1-3.mp4 was 12 seconds long, just like 1-2.mp4 was.

    


    Apart from the input and output file names, both commands are the same. I was suspicious of having set the offset parameter of the transition incorrectly, but the first 2 files were merged successfully.

    


    I am at a loss as to what I'm doing incorrectly here. Is there a particular caveat of the xfade filter that gets problematic when used among 2 files with one of them already having that filter ?

    


    Any suggestions as to how I may debug or fix this behavior ? I'd welcome any alternative means of concatenating these (i.e., with some transition effects) in a simple fashion as well.

    


    I'm planning to use these commands in a Python script, so I'd appreciate any alternative solution not involving any gigantic commands or parameters.

    


    Just to be thorough, I should mention that I have ffmpeg version 4.3.1 installed via snap.

    


  • Copied .ass Subtitle Has Font Size Changed

    7 novembre 2022, par Rapta

    This is happening when doing an mkv to mkv conversion, with a simple -c:s copy, and whilst the font style, and position are the same, the size ends up being bigger. I'm also playing it with VLC ,if that matters.

    


    Here're the sub settings :
[Script Info]
 ; Script generated by Aegisub r8942
 ; http://www.aegisub.org/
Title : Default Aegisub file
ScriptType : v4.00+
PlayDepth : 0
YCbCr Matrix : TV.601
PlayResX : 708
PlayResY : 480
WrapStyle : 0
ScaledBorderAndShadow : yes

    


    [Aegisub Project Garbage]
Last Style Storage : Default
Video AR Mode : 4
Video AR Value : 1.333333
Video Zoom Percent : 1.000000
Video Position : 35410

    


    [V4+ Styles]
Format : Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style : Default,Funimitation,28,&H00FFFFFF,&H0300FFFF,&H00000000,&H02000000,-1,0,0,0,100,100,1,0,1,2,0,2,40,40,25,1
Style : Lyrics JPN,Faxfont Tone,40,&H00FFFFFF,&H000000FF,&H00000000,&H501D0032,0,0,0,0,100,100,0,0,1,0,0,8,0,0,10,0
Style : Lyrics ENG,Faxfont Tone,36,&H00FFFFFF,&H000000FF,&H00000000,&H501D0032,0,0,0,0,100,100,0,0,1,0,0,2,0,0,6,0
Style : Title,Faxfont Tone,55,&H00FFFFFF,&H000000FF,&H28616161,&H28E0E0E0,-1,0,0,0,100,100,0,0,1,0.5,0.1,2,10,10,20,1
Style : Credits ENG,Faxfont Tone,42,&H00FFFFFF,&H000000FF,&H00000000,&H501D0032,0,0,0,0,100,100,0,0,1,0,0,8,0,0,0,0

    


    And here's a sub example :
[Events]
Format : Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue : 0,0:00:17.95,0:00:20.79,Credits ENG,,0,0,0,,\blur0.6\c&HFFF3ED&\fscx60\fscy76\pos(102.882,73)Planning

    


    If I export the sub from the converted file, all of the settings are the same.

    


    Is there any way to stop the size from changing ?

    


    Thanks

    


    Tried : -c:s copy
Expected : Complete copy.
Resulted : Not a complete copy — the font size was bigger.

    


  • yet another screenshot encoding exercise with ffmpeg - stuck at getting AVFrame from ALT::CImage - VC++

    11 septembre 2013, par sith

    Total AV newbee here - trying to learn the ropes on using FFMpeg functions to encode movies. On searching for tutorials I found a few similar questions that I have linked here for reference :

    Encoding a screenshot into a video using FFMPEG

    [Libav-user] Encoding a screenshot into a video using FFMPEG

    Save bitmap to video (libavcodec ffmpeg)

    When converting from RGB to YUV using ffmpeg the video file the color is spread why ?

    How to convert RGB from YUV420p for ffmpeg encoder ?

    Encode bmp sequence with libavcodec...Help !

    Not able to encode image with ffmpeg

    For my setup FFMPEG is on VS12 - VC++ with MFC on win7.

    With the help of above samples, I am able to get "some" output from the encoder, but I am not sure in what format or state the output has been encoded. Neither VLC nor WMP can play this file. It does not even seem to recognize the metadata in the file to display the FPS or video length. What would normally cause that ? Also any pointers on what could be going wrong and how to approach fixing the problems would be great. [1]

    Here is the flow of my code :

    Step1 : capture desktop on to a CImg :

    int W=GetSystemMetrics(SM_CXSCREEN), H=GetSystemMetrics(SM_CYSCREEN), bpp=24;
    CImage cImg; cImg.Create(W,H,bpp)
    HDC hDC = cImg.GetDC();
    CWindowDC winDC(GetDesktopWindow());

    BitBlt(hDC, 0,0, rez.W(), rez.H(), winDC.m_hDC, 0, 0, SRCCOPY);

    At this point I am able to dump a screen shot into a bmp file -
    using cImg.Save( _T("test.bmp"), Gdiplus::ImageFormatBMP) ;

    Step2 : Extract the BMP bits from the CImg.

    HBITMAP hBitmap = (HBITMAP)cImg;
    HDC memDC = CreateCompatibleDC(NULL);
    SelectObject( memDC, hBitmap );

    BITMAPINFO bmi; // initialized bmi with {W,-H, plane=1, bitCount=24, comp=BI_RGB, size=W*H*3 }
    << removed bmi init code for conciseness. >>>

    BYTE *rgb24Data = new BYTE[W*H*3]; // 3 for 24bpp. 4 for 32...
    int ret = GetDIBits(memDC, hBitmap, 0, H, rgb24Data, &bmi, DIB_RGB_COLORS);

    At this point I faithfully believe rgb24Data points to pixel data :) - copied out of the cImg bitmap

    Step 3 : next I try to create an AV frame with the rgb24Data got from this CImg. Also this is where I have a massive knowledge gap. I am going to try and recover

    // setup the codecs and contexts here as per mohM's post

    AVCodec *currCodec = avcodec_find_encoder(CODEC_ID_MPEG4);

    AVCodecContext *codeCtxt = avcodec_alloc_context();  // init this with bate=400k, W, H,
    << removed codeCtxt init code for conciseness. >>>   //  time base 1/25, gop=10, max_b=1, fmt=YUV420

    avcodec_open(codeCtxt, currCodec);

    SwsContext *currSWSCtxt = sws_getContext( W, H, AV_PIX_FMT_RGB24, // FROM
                                             W, H, AV_PIX_FMT_YUV420P, // TO
                                             SWS_FAST_BILINEAR,
                                             NULL, NULL, NULL);

    // allocate and fill AVFrame
    int numBytes = avpicture_get_size(PIX_FMT_YUV420P, W, H);
    uint8_t *buffer=new uint8_t[numBytes];
    AVFrame *avFrame = avcodec_alloc_frame();
    avpicture_fill( (AVPicture*)avFrame, buffer, PIX_FMT_YUV420P, W, H );

    Step 4 : transform the data frame into YUV420P as we fill the frame.

    uint8_t * inData[1] = { rgb24Data };
    int inLinesize[1] = { 3*W }; // RGB stride
    sws_scale( currSWSCtxt, inData, inLinesize, 0, H,
              avFrame->data, avFrame->linesize);

    step 5 encode the frame and write out the output buffer into a file.

    int out_size = avcodec_encode_video( codeCtxt,
                                        outBuf,
                                        outBufSize,
                                        avFrame );

    fwrite(outBuf, 1, outBufSize, outFile );

    finally I close the file off with [0x00 0x00 0x01 0xb7]

    The first hint of things gone haywire is that for a 50 screens of 1920X1080 at 24bpp encoded at 25fps gives me a 507MB unplayable-mpeg file.

    As mentioned earlier, neither VLC nor WMP can play this file nor they even recognize the metadata in the file to display the FPS or video length. What would normally cause that ? Also any pointers on what could be going wrong and how to approach fixing the problems would be great. [2]

    Any guidance is much appreciated.