Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (80)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

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

  • gcc : Undefined Reference Error

    16 mars 2014, par jamie_y

    I would like to use a function 'ff_load_image' defined in ffmpeg/libavfilter/lavfutils.h.

    program.c

    #include "../ffmpeg/libavfilter/lavfutils.h"

    int main ()
    {
     uint8_t* data;

     int linesize, width, height, log_ctx;

     int i = ff_load_image(&data, &linesize, &width, &height, AV_PIX_FMT_RGB24, "blue.jpg", &log_ctx);
    }

    Running

    gcc -I$HOME/ffmpeg/include program.c -L$HOME/ffmpeg/lib -lavfilter -lavcodec -lavutil

    gives undefined reference errors.

    program.c: In function \u2018main\u2019:
    program.c:9: warning: passing argument 1 of \u2018ff_load_image\u2019 from incompatible pointer type
    ../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018uint8_t **\u2019 but argument is of type \u2018uint8_t *\u2019
    program.c:9: warning: passing argument 2 of \u2018ff_load_image\u2019 makes pointer from integer without a cast
    ../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018int *\u2019 but argument is of type \u2018int\u2019
    program.c:9: warning: passing argument 3 of \u2018ff_load_image\u2019 makes pointer from integer without a cast
    ../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018int *\u2019 but argument is of type \u2018int\u2019
    program.c:9: warning: passing argument 4 of \u2018ff_load_image\u2019 makes pointer from integer without a cast
    ../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018int *\u2019 but argument is of type \u2018int\u2019
    program.c:9: warning: passing argument 5 of \u2018ff_load_image\u2019 makes pointer from integer without a cast
    ../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018enum AVPixelFormat *\u2019 but argument is of type \u2018int\u2019
    program.c:9: warning: passing argument 7 of \u2018ff_load_image\u2019 makes pointer from integer without a cast
    ../ffmpeg/libavfilter/lavfutils.h:39: note: expected \u2018void *\u2019 but argument is of type \u2018int\u2019
    /home/jamiey/ffmpeg/lib/libavfilter.a(lavfutils.o): In function `ff_load_image':
    /home/jamiey/ffmpeg/libavfilter/lavfutils.c:38: undefined reference to `av_register_all'
    /home/jamiey/ffmpeg/libavfilter/lavfutils.c:40: undefined reference to `av_find_input_format'
    /home/jamiey/ffmpeg/libavfilter/lavfutils.c:41: undefined reference to `avformat_open_input'
    /home/jamiey/ffmpeg/libavfilter/lavfutils.c:66: undefined reference to `av_read_frame'
    /home/jamiey/ffmpeg/libavfilter/lavfutils.c:92: undefined reference to `avformat_close_input'
    /home/jamiey/ffmpeg/libavfilter/lavfutils.c:92: undefined reference to `avformat_close_input'
    /home/jamiey/ffmpeg/libavfilter/lavfutils.c:92: undefined reference to `avformat_close_input'
    /home/jamiey/ffmpeg/lib/libavcodec.a(frame_thread_encoder.o): In function `ff_frame_thread_encoder_free':
    /home/jamiey/ffmpeg/libavcodec/frame_thread_encoder.c:225: undefined reference to `pthread_join'
    /home/jamiey/ffmpeg/lib/libavcodec.a(frame_thread_encoder.o): In function `ff_frame_thread_encoder_init':
    /home/jamiey/ffmpeg/libavcodec/frame_thread_encoder.c:200: undefined reference to `pthread_create'
    /home/jamiey/ffmpeg/lib/libavcodec.a(pthread_frame.o): In function `ff_frame_thread_free':
    /home/jamiey/ffmpeg/libavcodec/pthread_frame.c:575: undefined reference to `pthread_join'
    /home/jamiey/ffmpeg/lib/libavcodec.a(pthread_frame.o): In function `ff_frame_thread_init':
    /home/jamiey/ffmpeg/libavcodec/pthread_frame.c:705: undefined reference to `pthread_create'
    /home/jamiey/ffmpeg/lib/libavcodec.a(pthread_slice.o): In function `ff_slice_thread_init':
    /home/jamiey/ffmpeg/libavcodec/pthread_slice.c:220: undefined reference to `pthread_create'
    /home/jamiey/ffmpeg/lib/libavcodec.a(pthread_slice.o): In function `ff_slice_thread_free':
    /home/jamiey/ffmpeg/libavcodec/pthread_slice.c:118: undefined reference to `pthread_join'
    /home/jamiey/ffmpeg/lib/libavutil.a(rational.o): In function `av_d2q':
    /home/jamiey/ffmpeg/libavutil/rational.c:115: undefined reference to `log'
    /home/jamiey/ffmpeg/libavutil/rational.c:118: undefined reference to `floor'
    /home/jamiey/ffmpeg/lib/libavutil.a(eval.o): In function `eval_expr':
    /home/jamiey/ffmpeg/libavutil/eval.c:183: undefined reference to `trunc'
    /home/jamiey/ffmpeg/libavutil/eval.c:182: undefined reference to `ceil'
    /home/jamiey/ffmpeg/libavutil/eval.c:181: undefined reference to `floor'
    /home/jamiey/ffmpeg/libavutil/eval.c:241: undefined reference to `pow'
    /home/jamiey/ffmpeg/libavutil/eval.c:177: undefined reference to `exp'
    /home/jamiey/ffmpeg/libavutil/eval.c:176: undefined reference to `exp'
    /home/jamiey/ffmpeg/libavutil/eval.c:287: undefined reference to `pow'
    /home/jamiey/ffmpeg/libavutil/eval.c:278: undefined reference to `floor'
    /home/jamiey/ffmpeg/lib/libavutil.a(eval.o): In function `av_strtod':
    /home/jamiey/ffmpeg/libavutil/eval.c:112: undefined reference to `pow'
    /home/jamiey/ffmpeg/libavutil/eval.c:103: undefined reference to `pow'
    /home/jamiey/ffmpeg/libavutil/eval.c:109: undefined reference to `pow'
    /home/jamiey/ffmpeg/lib/libavutil.a(eval.o): In function `parse_primary':
    /home/jamiey/ffmpeg/libavutil/eval.c:394: undefined reference to `sinh'
    /home/jamiey/ffmpeg/libavutil/eval.c:395: undefined reference to `cosh'
    /home/jamiey/ffmpeg/libavutil/eval.c:396: undefined reference to `tanh'
    /home/jamiey/ffmpeg/libavutil/eval.c:397: undefined reference to `sin'
    /home/jamiey/ffmpeg/libavutil/eval.c:398: undefined reference to `cos'
    /home/jamiey/ffmpeg/libavutil/eval.c:399: undefined reference to `tan'
    /home/jamiey/ffmpeg/libavutil/eval.c:400: undefined reference to `atan'
    /home/jamiey/ffmpeg/libavutil/eval.c:401: undefined reference to `asin'
    /home/jamiey/ffmpeg/libavutil/eval.c:402: undefined reference to `acos'
    /home/jamiey/ffmpeg/libavutil/eval.c:403: undefined reference to `exp'
    /home/jamiey/ffmpeg/libavutil/eval.c:404: undefined reference to `log'
    /home/jamiey/ffmpeg/libavutil/eval.c:405: undefined reference to `fabs'
    collect2: ld returned 1 exit status

    However, I was successful in running functions in other library, such as the ones in "ffmpeg/libavcodec/avcodec.h". Why is this happening to "ffmpeg/libavfilter/lavfutils.h" ?

  • FFmpeg crashing on drawtext filter (ffmpeg-python)

    31 août 2023, par DeadSec

    Hey guys so im trying to use ffmpeg-python to add text to a video but its crashing at

    


    [Parsed_drawtext_0 @ 0000012ea115ee80] Setting 'text' to value 'hi'

    


    and I'm not sure what I can do to fix this problem. I tried pure FFmpeg command-line style and still the same issue where it gets stuck at Setting text to value and it simply outputs a 0byte mp4 after crashing.

    


    My code :

    


    os.environ['FONTCONFIG_FILE'] = r'C:\Users\NOP\NOP\NOP\NOP\binaries\fonts\fonts.conf'
    os.environ['FONTCONFIG_PATH'] = r'C:\Users\NOP\NOP\NOP\NOP\binaries\fonts'
    os.environ['FC_CONFIG_DIR'] = r'C:\Users\NOP\NOP\NOP\NOP\binaries\fonts'
    in_ = ffmpeg.input(output_video_logo)
    in_ = in_.drawtext(text='hi')
    ffmpeg.output(in_, output_video).global_args('-loglevel', 'debug').run(cmd=FFMPEG_PATH)


    


    Font config file :

    


    &lt;?xml version="1.0"?>&#xA;&#xA;&#xA;<fontconfig>&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;    <dir>WINDOWSFONTDIR</dir>&#xA;    <dir>~/fonts</dir>&#xA;    <dir prefix="cwd">.</dir>&#xA;    <dir>~/.fonts</dir>&#xA;&#xA;&#xA;    <match target="pattern">&#xA;        <test qual="any">&#xA;            <string>mono</string>&#xA;        </test>&#xA;        <edit mode="assign">&#xA;            <string>monospace</string>&#xA;        </edit>&#xA;    </match>&#xA;&#xA;&#xA;    <match target="pattern">&#xA;        <test qual="any">&#xA;            <string>sans serif</string>&#xA;        </test>&#xA;        <edit mode="assign">&#xA;            <string>sans-serif</string>&#xA;        </edit>&#xA;    </match>&#xA;&#xA;&#xA;    <match target="pattern">&#xA;        <test qual="any">&#xA;            <string>sans</string>&#xA;        </test>&#xA;        <edit mode="assign">&#xA;            <string>sans-serif</string>&#xA;        </edit>&#xA;    </match>&#xA;&#xA;&#xA;    <include>conf.d</include>&#xA;&#xA;&#xA;&#xA;    <cachedir>WINDOWSTEMPDIR_FONTCONFIG_CACHE</cachedir>&#xA;    <cachedir>~/.fontconfig</cachedir>&#xA;&#xA;    <config>&#xA;&#xA;&#xA;        <rescan>&#xA;            <int>30</int>&#xA;        </rescan>&#xA;    </config>&#xA;&#xA;</fontconfig>&#xA;

    &#xA;

    Is this a issue with any of my fontconfig or script ? I'm really lost on fixing this.

    &#xA;

    As requested by Rotem tried adding new input to drawtext and this was the output before crashing with no error message :&#xA;Successfully opened the file.

    &#xA;

    [Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;box&#x27; to value &#x27;1&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;boxcolor&#x27; to value &#x27;yellow&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;fontcolor&#x27; to value &#x27;blue&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;fontsize&#x27; to value &#x27;72&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;text&#x27; to value &#x27;hi&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;x&#x27; to value &#x27;10&#x27;&#xA;[Parsed_drawtext_0 @ 00000171a2f0f900] Setting &#x27;y&#x27; to value &#x27;10&#x27;&#xA;

    &#xA;

    Full log :&#xA;https://pastebin.com/E6sHvwUz

    &#xA;

  • Is there another way to export a frame in ffmpeg to a texture2d ? My code working in Windows but not Linux

    5 décembre 2024, par Robert Russell

    Sound is working in Linux the same as it did in Windows. But the video is just a black screen and when I attempt to save the frames as BMP files all of them were corrupt/empty files. I am using Ffmpeg.Autogen to interface with the libraries. https://github.com/Ruslan-B/FFmpeg.AutoGen. The file is VP8 and OGG in a MKV container. Though the extension is AVI for some reason.

    &#xA;&#xA;

    I tried messing with the order of the code a bit. I checked to make sure the build of Ffmpeg on Linux had VP8. I was searching online but was having trouble finding another way to do what I am doing. This is to contribute to the OpenVIII project. My fork-> https://github.com/Sebanisu/OpenVIII

    &#xA;&#xA;

    This just preps the scaler to change the pixelformat or else people have blue faces.

    &#xA;&#xA;

            private void PrepareScaler()&#xA;        {&#xA;&#xA;            if (MediaType != AVMediaType.AVMEDIA_TYPE_VIDEO)&#xA;            {&#xA;                return;&#xA;            }&#xA;&#xA;            ScalerContext = ffmpeg.sws_getContext(&#xA;                Decoder.CodecContext->width, Decoder.CodecContext->height, Decoder.CodecContext->pix_fmt,&#xA;                Decoder.CodecContext->width, Decoder.CodecContext->height, AVPixelFormat.AV_PIX_FMT_RGBA,&#xA;                ffmpeg.SWS_ACCURATE_RND, null, null, null);&#xA;            Return = ffmpeg.sws_init_context(ScalerContext, null, null);&#xA;&#xA;            CheckReturn();&#xA;        }&#xA;

    &#xA;&#xA;

    Converts Frame to BMP&#xA;I am thinking this is where the problem is. Because I had added bitmap.save to this and got empty BMPs.

    &#xA;&#xA;

    public Bitmap FrameToBMP()&#xA;        {&#xA;            Bitmap bitmap = null;&#xA;            BitmapData bitmapData = null;&#xA;&#xA;            try&#xA;            {&#xA;                bitmap = new Bitmap(Decoder.CodecContext->width, Decoder.CodecContext->height, PixelFormat.Format32bppArgb);&#xA;                AVPixelFormat v = Decoder.CodecContext->pix_fmt;&#xA;&#xA;                // lock the bitmap&#xA;                bitmapData = bitmap.LockBits(new Rectangle(0, 0, Decoder.CodecContext->width, Decoder.CodecContext->height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);&#xA;&#xA;                byte* ptr = (byte*)(bitmapData.Scan0);&#xA;&#xA;                byte*[] srcData = { ptr, null, null, null };&#xA;                int[] srcLinesize = { bitmapData.Stride, 0, 0, 0 };&#xA;&#xA;                // convert video frame to the RGB bitmap&#xA;                ffmpeg.sws_scale(ScalerContext, Decoder.Frame->data, Decoder.Frame->linesize, 0, Decoder.CodecContext->height, srcData, srcLinesize); //sws_scale broken on linux?&#xA;            }&#xA;            finally&#xA;            {&#xA;                if (bitmap != null &amp;&amp; bitmapData != null)&#xA;                {&#xA;                    bitmap.UnlockBits(bitmapData);&#xA;                }&#xA;            }&#xA;            return bitmap;&#xA;&#xA;        }&#xA;

    &#xA;&#xA;

    After I get a bitmap we turn it into a Texture2D so we can draw it.

    &#xA;&#xA;

     public Texture2D FrameToTexture2D()&#xA;        {&#xA;            //Get Bitmap. there might be a way to skip this step.&#xA;            using (Bitmap frame = FrameToBMP())&#xA;            {&#xA;                //string filename = Path.Combine(Path.GetTempPath(), $"{Path.GetFileNameWithoutExtension(DecodedFileName)}_rawframe.{Decoder.CodecContext->frame_number}.bmp");&#xA;&#xA;                //frame.Save(filename);&#xA;                BitmapData bmpdata = null;&#xA;                Texture2D frameTex = null;&#xA;                try&#xA;                {&#xA;                    //Create Texture&#xA;                    frameTex = new Texture2D(Memory.spriteBatch.GraphicsDevice, frame.Width, frame.Height, false, SurfaceFormat.Color); //GC will collect frameTex&#xA;                                                                                                                                        //Fill it with the bitmap.&#xA;                    bmpdata = frame.LockBits(new Rectangle(0, 0, frame.Width, frame.Height), System.Drawing.Imaging.ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);// System.Drawing.Imaging.PixelFormat.Format32bppArgb);&#xA;                    byte[] texBuffer = new byte[bmpdata.Width * bmpdata.Height * 4]; //GC here&#xA;                    Marshal.Copy(bmpdata.Scan0, texBuffer, 0, texBuffer.Length);&#xA;&#xA;                    frameTex.SetData(texBuffer);&#xA;&#xA;&#xA;                }&#xA;                finally&#xA;                {&#xA;                    if (bmpdata != null)&#xA;                    {&#xA;                        frame.UnlockBits(bmpdata);&#xA;                    }&#xA;                }&#xA;                return frameTex;&#xA;&#xA;            }&#xA;        }&#xA;

    &#xA;&#xA;

    I can post more if you want it's pretty much all up on my fork

    &#xA;&#xA;

    Video will play back as it does in Windows. As smooth as 15 fps can be. :)

    &#xA;