Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (106)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (7956)

  • I want to create the discord bot by use python,but ffmpeg always had problem

    12 décembre 2023, par Bot
    async def play(ctx, *, song_name):  

    if ctx.author.voice is None or ctx.author.voice.channel is None:
        await ctx.send("nobody")
        return

    voice_channel = ctx.author.voice.channel
    channel = None
    if ctx.voice_client is None:
        channel = await voice_channel.connect()
    else:
        await ctx.voice_client.move_to(voice_channel)

    ydl_opts = {'format': 'bestaudio'}
    videosSearch = VideosSearch(song_name, limit=1) 
    results = videosSearch.result()
    
    url = results['result'][0]['link']
    
    if voice_channel.guild.id in queues:
        queues[voice_channel.guild.id].append(url)
        
    else:
        queues[voice_channel.guild.id] = [url]
        
    if not ctx.voice_client.is_playing():
        await play_next(ctx.voice_client, voice_channel.guild.id)


    


    ffmpeg has this error detail :

    


    discord.player ffmpeg process 17656 successfully terminated with return code of 3199971767.

    


    I found the internet ,lots of people got the code of 1 or -1.

    


    But i get 3199971767 ,i don't know the meaning of this.

    


    BTW, my url is correct.

    


    Hoping someone can help me.

    


    TY

    


  • Image sequence to video - file naming problem ffmpeg

    10 janvier 2024, par user1405884

    im trying to make video from my gopro sequence
but i need to quick rename by shift > select > f2
so the name are a (1), a (2), a (3) instead of GOPR0001, GOPR0002, GOPR0003

    


    enter image description here

    


    How can i make this new set of renamed files in ffmpeg ?

    


    I believe -i GOPR%04d.jpg

    


    ffmpeg -r 10 -f image2  -start_number 0001 -i GOPR%04d.jpg -vframes 1000 -vcodec libx264 -crf 25  -pix_fmt yuv420p -vf "scale=1366:768:force_original_aspect_ratio=1, pad=1366:768:-1:-1, setsar=1" input.mp4


    


    i think this script need to be changed

    


    ffmpeg -r 10 -f image2  -start_number 2302 **-i GOPR%04d.jpg** -vframes 1000 -vcodec libx264 -crf 25  -pix_fmt yuv420p -vf "scale=1366:768:force_original_aspect_ratio=1, pad=1366:768:-1:-1, setsar=1" input.mp4


    


  • Is there any problem in my FFMPEG encoder client code ?

    29 janvier 2024, par kyhnz

    I am trying to write code have function of capture video stream, encode as hevc265 and send to server as UDP :

    


    // There can some unnecessary library imports, rule 1: If it is ok, don&#x27;t touch it!&#xA;&#xA;#include <iostream>&#xA;#include <sys></sys>types.h>&#xA;#include &#xA;#include <cstring>&#xA;#include <sys></sys>socket.h>&#xA;#include <arpa></arpa>inet.h>&#xA;#include <netinet></netinet>in.h> &#xA;#include <string>&#xA;#include <cstdlib>&#xA;#include <cstdio>&#xA;&#xA;extern "C"&#xA;{&#xA;#include <libavutil></libavutil>frame.h>&#xA;#include <libavdevice></libavdevice>avdevice.h>&#xA;#include <libavformat></libavformat>avformat.h>&#xA;#include <libavcodec></libavcodec>avcodec.h>&#xA;#include <libavutil></libavutil>imgutils.h>&#xA;#include <libavcodec></libavcodec>packet.h>&#xA;#include <libavcodec></libavcodec>codec_id.h>&#xA;#include <libavutil></libavutil>error.h>&#xA;#include <libavutil></libavutil>error.h>&#xA;#include <libavutil></libavutil>opt.h>&#xA;}&#xA;&#xA;#define PORT 9999&#xA;#define IP_ADDRESS "127.0.0.1"&#xA;&#xA;using namespace std;&#xA;&#xA;int main(){&#xA;    const int width = 1080;&#xA;    const int height = 720;&#xA;    const int fps = 18; &#xA;    const auto resulation = "1080x720";&#xA;    const auto device = "/dev/video0";&#xA;    const auto format = "v4l2";&#xA;    const AVCodecID codec_id = AV_CODEC_ID_H265;&#xA;&#xA;    avdevice_register_all();&#xA;    avformat_network_init();&#xA;    AVFormatContext *formatContext = nullptr;&#xA;&#xA;    AVDictionary *format_opts = nullptr;&#xA;    av_dict_set(&amp;format_opts, "framerate", "18", 0);;&#xA;    av_dict_set(&amp;format_opts, "video_size", resulation, 0);&#xA;    &#xA;    const AVInputFormat *inputFormat = av_find_input_format(format);&#xA;    if (!inputFormat)&#xA;    {&#xA;        cerr &lt;&lt; "Unknown input format: " &lt;&lt; format &lt;&lt; endl;&#xA;        return 1;&#xA;    }&#xA;    cout &lt;&lt; "Input format: "&lt;&lt; format &lt;&lt; endl;&#xA;&#xA;    const AVCodec *codec = avcodec_find_encoder(codec_id);&#xA;    if (!codec) {&#xA;        cerr &lt;&lt; "Codec can&#x27;t find "&lt;&lt; codec_id &lt;&lt; endl;&#xA;        return 1;&#xA;    }&#xA;    cout &lt;&lt; "Found codec: "&lt;&lt; codec_id &lt;&lt; endl;&#xA;&#xA;    AVCodecContext *avctx = avcodec_alloc_context3(codec);&#xA;    if (!avctx) {&#xA;        cerr &lt;&lt; "Error: Could not create encoder!" &lt;&lt; endl;&#xA;        return 1;&#xA;    }&#xA;    cout &lt;&lt; "Create encoder. " &lt;&lt; endl;&#xA;&#xA;&#xA;    avctx->bit_rate = 1000000;&#xA;    avctx->width = width; &#xA;    avctx->height = height; &#xA;    avctx->pix_fmt = AV_PIX_FMT_YUV420P; &#xA;    avctx->time_base = (AVRational){1, fps};&#xA;    avctx->framerate = (AVRational){fps, 1};&#xA;    avctx->gop_size = fps*2;&#xA;    avctx->refs = 3;&#xA;&#xA;    av_opt_set(avctx->priv_data, "preset", "medium", 0);&#xA;    av_opt_set(avctx->priv_data, "crf", "18", 0);&#xA;    av_opt_set(avctx->priv_data, "tune", "zerolatency", 0);&#xA;&#xA;    if (avcodec_open2(avctx, codec, nullptr) &lt; 0) {&#xA;        cerr &lt;&lt; "Error: Couldn&#x27;t open codec" &lt;&lt; endl;&#xA;        return 1;&#xA;    }&#xA;    cout &lt;&lt; "Open codec succesfully." &lt;&lt; endl;&#xA;&#xA;    int open_input = avformat_open_input(&amp;formatContext, device,&#xA;                                            const_cast<avinputformat>(inputFormat), &amp;format_opts);&#xA;    if (open_input != 0)&#xA;    {&#xA;        cerr &lt;&lt; "Device cant open " &lt;&lt; device &lt;&lt; endl;&#xA;        return 1;&#xA;    }&#xA;    cout &lt;&lt; "Device active: " &lt;&lt; device &lt;width = avctx->width;&#xA;    frame->height = avctx->height;&#xA;    frame->format = avctx->pix_fmt;&#xA;&#xA;    if(av_frame_get_buffer(frame, 0) != 0){&#xA;        cerr &lt;&lt; "Error: video frame " &lt;&lt; endl;&#xA;        return 1;&#xA;    }cout &lt;&lt; "Video frame has been created." &lt;&lt; endl;&#xA;&#xA;    if(av_frame_make_writable(frame) != 0){&#xA;        cerr &lt;&lt; "Error: frame is not writable" &lt;&lt; endl;&#xA;        return 1;&#xA;    }&#xA;&#xA;    AVPacket *packet= av_packet_alloc();&#xA;    if (!packet) {&#xA;        cerr &lt;&lt; "error: has not been created packet" &lt;&lt; endl;&#xA;    }&#xA;&#xA;    av_dump_format(formatContext, 0, device, 0);&#xA;    av_dict_free(&amp;format_opts);&#xA;    &#xA;    int socket_client = socket(AF_INET, SOCK_DGRAM, 0);&#xA;    if (socket_client == -1) {&#xA;        cerr &lt;&lt; "Error: socket!" &lt;&lt; endl;&#xA;        exit(EXIT_FAILURE);&#xA;    }&#xA;    cout &lt;&lt; "Socket has been created" &lt;&lt; endl;&#xA;&#xA;    struct sockaddr_in serverAddr = {0};&#xA;    serverAddr.sin_family = AF_INET;&#xA;    serverAddr.sin_port = htons(PORT);&#xA;    serverAddr.sin_addr.s_addr = inet_addr(IP_ADDRESS);&#xA;&#xA;    while (true) {&#xA;        if (av_read_frame(formatContext, packet) != 0) {&#xA;            cerr &lt;&lt; "Error" &lt;&lt; endl;&#xA;            av_packet_unref(packet);&#xA;            continue;&#xA;        }&#xA;&#xA;        frame->data[7] = packet->data; &#xA;        frame->linesize[7] = packet->size;&#xA;&#xA;        if (avcodec_send_frame(avctx, frame) != 0){&#xA;            cerr &lt;&lt; "Error: Frame sending is missing ---> "&lt;&lt; &amp;av_strerror &lt;&lt; endl;&#xA;            av_packet_unref(packet);&#xA;            continue;&#xA;        }&#xA;&#xA;        if (avcodec_receive_packet(avctx, packet) != 0){&#xA;            cerr &lt;&lt; "Error: Packet giving is missing! ---> " &lt;&lt; &amp;av_strerror &lt;&lt; endl;&#xA;            av_packet_unref(packet);&#xA;            continue;&#xA;        }&#xA;&#xA;        ssize_t snd = sendto(socket_client, packet->data, packet->size,&#xA;                            MSG_CONFIRM, (struct sockaddr *)&amp;serverAddr,&#xA;                            sizeof(serverAddr));&#xA;&#xA;        if(snd == -1){&#xA;            cerr &lt;&lt; "Error: Data sending failed !" &lt;&lt; endl;&#xA;            av_packet_unref(packet);&#xA;            continue;&#xA;        }else {&#xA;            cout &lt;&lt; "Data sending succesfully" &lt;&lt; endl;&#xA;        }&#xA;&#xA;        av_packet_unref(packet);&#xA;        av_frame_unref(frame);&#xA;    }&#xA;&#xA;    av_frame_free(&amp;frame);&#xA;    av_packet_free(&amp;packet);&#xA;    close(socket_client);&#xA;    avformat_free_context(formatContext);&#xA;    avformat_close_input(&amp;formatContext);&#xA;    avformat_network_deinit();&#xA;&#xA;    return 0;&#xA;}&#xA;</avinputformat></cstdio></cstdlib></string></cstring></iostream>

    &#xA;

    There is such an output, I do not understand the reason yet :

    &#xA;

    [video4linux2,v4l2 @ 0x643732e80b40] The V4L2 driver changed the video from 1080x720 to 1280x720&#xA;[video4linux2,v4l2 @ 0x643732e80b40] The V4L2 driver changed the video from 1280x720 to 640x480&#xA;[video4linux2,v4l2 @ 0x643732e80b40] The driver changed the time per frame from 1/18 to 1/30&#xA;

    &#xA;

    Is there any problem in my encoder client code ?

    &#xA;

    In addition, i can't send datas to server.

    &#xA;