Recherche avancée

Médias (91)

Autres articles (48)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (9333)

  • FFmpeg :Run one bat after one bat

    16 avril 2018, par AniEncoder

    well I tried to run a .bat file after a file gets downloaded by qBittorrent, the .bat will change font and rename it and move it another folder.

    There are 3 problems
    1. two .bat needed to run...font & rename
    2. the file gets copied in to folders

    I need to add some gap between EngSub, if i do that, it donot shows in the file output

    Change Font
    for %%A in (*.mkv) do ffmpeg -i "%%A" -map 0:s:0 "%%A.ass"

       ren *.ass *.txt

       setlocal

       @echo off
       call :FindReplace "Open Sans Semibold" "CronosPro-Bold" "*.txt"
       call :FindReplace "&H00020713" "&H0000003B" "*.txt"
       call :FindReplace ",1.7," ",2," "*.txt"
       @echo on

       ren *.txt *.ass

       for %%A in (*.mkv) do ffmpeg -i "%%A" -i "%%A".ass -c copy -map 0:0 -map 0:1 -map 1:0 -metadata:s:s:0 language=eng -disposition:s:0 default -attach CronosPro-Bold.ttf -metadata:s:3 mimetype=application/x-truetype-font "..\720p\%%A"

       del *.ass

       :FindReplace <findstr> <replstr> <file>
       set tmp="%temp%\tmp.txt"
       If not exist %temp%\_.vbs call :MakeReplace
       for /f "tokens=*" %%a in ('dir "%3" /s /b /a-d /on') do (
         for /f "usebackq" %%b in (`Findstr /mic:"%~1" "%%a"`) do (
           echo(&amp;Echo Replacing "%~1" with "%~2" in file %%~nxa
           &lt;%%a cscript //nologo %temp%\_.vbs "%~1" "%~2">%tmp%
           if exist %tmp% move /Y %tmp% "%%~dpnxa">nul
         )
       )

       del %temp%\_.vbs

       :MakeReplace
       >%temp%\_.vbs echo with Wscript
       >>%temp%\_.vbs echo set args=.arguments
       >>%temp%\_.vbs echo .StdOut.Write _
       >>%temp%\_.vbs echo Replace(.StdIn.ReadAll,args(0),args(1),1,-1,1)
       >>%temp%\_.vbs echo end with
    </file></replstr></findstr>

    Rename

    ren  "[HorribleSubs]*.mkv" "[hasu]*.mkv"
    ren  *[*  *[1090p][Eng Sub].*
    call "1080.bat"
    move [hasu]*.* ..\Trash
  • Moviepy Making a CompositeVideoClip of two concatenate_videoclips

    16 avril 2018, par Max Better

    Working with the Moviepy lib and I’ve been beating my head off a wall with this last step for a while.

    GifClips = concatenate_videoclips(TheGIFs, method='compose')
    TextClips = concatenate_videoclips(TheTexts, method='compose')

    I’ve written both of these to separate files and they look fine. But I’m having a problem getting them to combine properly.

    I’m trying :

    FinishedClips = CompositeVideoClip([GifClips, TextClips], size=(1920,1080))

    It has the audio from TextClips and shows the GifClips but the text isn’t visible. It did show when written alone without the composite.

    It does work if I combine GifClips with a single TextClip but this doesn’t work when I need text clips to run one after another.

    I could run a CompositeVideoClip with every single TextClip and a part of the GifClips and then concatenate them all together but that doesn’t seem like the neatest way of doing this. My guess is there’s a fairly obvious argument here somewhere but looking through the docs and examples I’m struggling so far.

    Any suggestions on how I could get the TextClips clip to show up properly in a composite would be much appreciated.

  • FFMPEG corrupted frame when streaming in UDP (MPEGTS)

    17 décembre 2020, par user37616

    I am working on a screen streaming program, till now, I can capture and encode my screen into a video perfectly. &#xA;However, whenever I try to stream it over LAN, and play using Mplayer, it is able to run in simple desktop (text document, etc...) but when I try to play video the frame stated to corrupted until I quit the video (this video cause the most corrupted frame https://www.youtube.com/watch?v=1La4QzGeaaQ&t=230s)

    &#xA;&#xA;

    I am not really sure why when streaming, I got corrupted frame with the youtube video but when save it to a file (change URL from udp ://192.168.1.xxx:YYYY to file name C :\Test.ts) there were no corrupted frame at all.&#xA; My Mplayer log :

    &#xA;&#xA;

    `V:   0.0 1563/1563 51% 43%  0.0% 0 0&#xA;[h264 @ 0000000001d04940]Invalid NAL unit 0, skipping.&#xA;[h264 @ 0000000001d04940]error while decoding MB 23 51, bytestream -64&#xA;[h264 @ 0000000001d04940]concealing 2066 DC, 2066 AC, 2066 MV errors in I frame&#xA;V:   0.0 1564/1564 51% 43%  0.0% 0 0&#xA;[h264 @ 0000000001d04940]concealing 7598 DC, 7598 AC, 7598 MV errors in P frame&#xA;V:   0.0 1652/1652 50% 43%  0.0% 0 0&#xA;[h264 @ 0000000001d04940]Invalid NAL unit 0, skipping.&#xA;[h264 @ 0000000001d04940]error while decoding MB 26 49, bytestream -55&#xA;[h264 @ 0000000001d04940]concealing 2303 DC, 2303 AC, 2303 MV errors in I frame&#xA;V:   0.0 1653/1653 50% 43%  0.0% 0 0&#xA;[h264 @ 0000000001d04940]concealing 7727 DC, 7727 AC, 7727 MV errors in P frame&#xA;V:   0.0 1741/1741 49% 43%  0.0% 0 0&#xA;[h264 @ 0000000001d04940]Invalid NAL unit 0, skipping.&#xA;[h264 @ 0000000001d04940]error while decoding MB 65 62, bytestream -57&#xA;[h264 @ 0000000001d04940]concealing 704 DC, 704 AC, 704 MV errors in I frame&#xA;V:   0.0 1742/1742 49% 43%  0.0% 0 0`&#xA;

    &#xA;&#xA;

    Stream initialize code

    &#xA;&#xA;

    static void Stream_ini(const char *Url, AVFormatContext *&amp;ofmt_ctx, AVCodec *codec, AVCodecContext *c, AVStream *&amp;out_stream)&#xA;{&#xA;    int ret;&#xA;&#xA;&#xA;    avformat_alloc_output_context2(&amp;ofmt_ctx, NULL, "mpegts", Url);&#xA;    out_stream = avformat_new_stream(ofmt_ctx, codec)&#xA;    out_stream->codec = c;&#xA;    av_dump_format(ofmt_ctx, 0, Url, 1);&#xA;&#xA;&#xA;    if (ofmt_ctx->oformat->flags &amp; AVFMT_GLOBALHEADER)&#xA;        out_stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;&#xA;    if (!(ofmt_ctx->flags &amp; AVFMT_NOFILE))&#xA;    {&#xA;        ret = avio_open(&amp;ofmt_ctx->pb, Url, AVIO_FLAG_WRITE);&#xA;        if (ret &lt; 0)&#xA;        {&#xA;            printf("Could not open output URL &#x27;%s&#x27;", Url);&#xA;            return;&#xA;        }&#xA;    }&#xA;&#xA;&#xA;    ret = avformat_write_header(ofmt_ctx, NULL);&#xA;&#xA;    if (ret &lt; 0)&#xA;    {&#xA;        printf("Error occurred when opening output URL\n");&#xA;        return;&#xA;    }&#xA;&#xA;&#xA;}&#xA;

    &#xA;&#xA;

    this code will get the captured screen and send it to encoder :

    &#xA;&#xA;

    ScreenCap.load_screen_data(inFrame,timmer)  // this will capture screen and return the time and AVFrame for encoding&#xA;sws_scale(ctx, inFrame->data, inFrame->linesize, 0,c->height, frame->data, frame->linesize);&#xA;&#xA;frame->pts = (timmer - first_frame_time) / fps;&#xA;EncodeToPkT(c, frame, pkt, ofmt_ctx,out_stream);&#xA;&#xA;av_frame_free(&amp;inFrame);&#xA;

    &#xA;&#xA;

    the AVFrame will then be send to encoder using avcodec_send_frame() to get Packet data and av_interleaved_write_frame() to stream it over LAN.

    &#xA;&#xA;

    All error check are removed for simplicity

    &#xA;&#xA;

    Also, this is my AVCodecContex setting for the encoder :

    &#xA;&#xA;

    c->bit_rate = 15000000;&#xA;c->width = 1920;&#xA;c->height = 1080;&#xA;c->time_base = AVRational{ 1, 90 };&#xA;c->framerate = AVRational{ 90, 1 };&#xA;c->gop_size = 90;&#xA;c->max_b_frames = 0;&#xA;c->pix_fmt = AV_PIX_FMT_RGB0;&#xA;

    &#xA;&#xA;

    I also notice it only happen when I increase encoder bitrate (15 MBIT) but when lower it down to (10 MBIT) it happen less. And when lower it down to 2 MBIT the corrupted frame not happen anymore however the quality is really bad.
    &#xA;I test the streaming in LAN using : PC -> cable ->laptop, PC->wireless->laptop, PC->Virtual PC, PC only (enter PC IP address in both program and Mplayer), all got the same result.

    &#xA;&#xA;

    I also test my DXGICap.load_screen_data function by make it output raw image and there were no corrupted image at all

    &#xA;&#xA;

    Does anybody have an idea why.

    &#xA;&#xA;

    Thank Nam.

    &#xA;