Recherche avancée

Médias (0)

Mot : - Tags -/serveur

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (39)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (4844)

  • Error opening input files : Invalid data found when processing input

    27 mars 2024, par Master's Time

    I am creating disnake music bot. The error is :

    


    [in#0 @ 00000233f8d71500] Error opening input: Invalid data found when processing input
Error opening input file https://www.youtube.com/watch?v=duDUqBtxwXk.
Error opening input files: Invalid data found when processing input


    


    Here is part of my code :

    


    import disnake
import asyncio
from yt_dlp import YoutubeDL
import ffmpeg


YTDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'False', 'simulate':'True', 'key':"FFmpegExtractAudio"}
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}


async def play_music(inter):
        global YDTL_OPTIONS, FFMPEG_OPTIONS
    print(tm.now().strftime("%H:%M:%S"),"play_music begin")
    id = int(inter.guild.id)
    with YoutubeDL(YTDL_OPTIONS) as ydl:
        info = ydl.extract_info(url, download=False)

    song = {
            'link': 'https://www.youtube.com/watch?v=' + url,
            'thumbnail': 'https://i.ytimg.com/vi/' + url + '/hqdefault.jpg?sqp=-oaymwEcCOADEI4CSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD5uL4xKN-IUfez6KIW_j5y70mlig',
            'source': info['formats'][0]['url'],
            'title': info['title']
        }   self.vc[id].play(disnake.FFmpegPCMAudio(executable=r"C:\\ffmpeg\\ffmpeg\\bin\\ffmpeg.exe",source=song["source"], **FFMPEG_OPTIONS))
    print(tm.now().strftime("%H:%M:%S"),"play_music end")


    


    I tried to write source = song['source'] instead of source = song['link'], but it didn't seem helpful.

    


  • pylwdrone and ffmpeg-python : pipe:0 : Invalid data found when processing input [closed]

    8 mai 2024, par Saail Chavan

    I am using a lewei camera on my drone and i have managed to get the stream using https://github.com/meekworth/pylwdrone, i want to do basic image processing like face or object detection or qr code scan which i am unable to do

    


    when i use this command in terminal :

    


    $ pylwdrone stream start --out-file - | ffplay -i -fflags nobuffer -flags low_delay -probesize 32 -sync ext -


    


    i get a clear feed with no errors

    


    enter image description here

    


    When i am using the script in python i am getting errors and the feed is bit lagged and skips frames

    


    pipe:0: Invalid data found when processing input


    


    ERROR :

    


    enter image description here

    


    import cv2
import numpy as np
import pylwdrone
import ffmpeg
import sys

drone = pylwdrone.LWDrone()
drone.set_time()

window_name = 'Drone Video Stream'
cv2.namedWindow(window_name, cv2.WINDOW_NORMAL)

for packet in drone.start_video_stream():
    try:

        out, _ = (
            ffmpeg.input('pipe:0')
            .output('pipe:', format='rawvideo', pix_fmt='bgr24')
            .run(input=packet.frame_bytes, capture_stdout=True, capture_stderr=True)
        )
        frame = np.frombuffer(out, np.uint8)
        height, width = 1152, 2048
        frame = frame.reshape((height, width, 3))


        # Display video stream
        cv2.imshow(window_name, frame)

        # Check for 'q' key to exit
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

    except ffmpeg.Error as e:
        print('An error occurred:', e.stderr.decode(), file=sys.stderr)

cv2.destroyAllWindows()
drone.stop_video_stream()


    


  • FFmpeg can successfully retrieve the RTSP stream, but it cannot print the time_base

    18 septembre 2024, par 何西西

    I can successfully obtain the RTSP stream and use the av_dump_format function to print the stream information, but I cannot retrieve the time_base. Why is that ?
FFmpeg is version : n4.0.6

    


    this is my code :

    


    int main(int argc, char *argv[])
{
    struct timeval systemstart_time;
    struct timeval rtspfetch_time1;
    struct timeval rtspfetch_time2;

    AVFormatContext *pFormatCtx = NULL;
    AVPacket *av_packet = NULL;
    AVDictionary *options = NULL;

    gettimeofday(&systemstart_time, NULL);
    print_time_with_microseconds(systemstart_time);
    //av_register_all();
    avformat_network_init();
    const char *input_url = "rtsp://admin:Read1234@192.168.1.164:554/Streaming/channels/1";
    av_dict_set(&options, "buffer_size", "1024000", 0); 
    av_dict_set(&options, "rtsp_transport", "tcp", 0); 
    av_dict_set(&options, "stimeout", "5000000", 0); 
    av_dict_set(&options, "max_delay", "500000", 0); 

    pFormatCtx = avformat_alloc_context(); 
    printf("FFmpeg version1: %s\n", av_version_info());  
    //Open Rtsp Streaming
    if (avformat_open_input(&pFormatCtx, input_url, NULL, &options) != 0)
    {
        printf("Couldn't open input stream.\n");
        return 0;
    }
    gettimeofday(&rtspfetch_time1, NULL);
    print_time_with_microseconds(rtspfetch_time1);
    //Get Stream information
    if (avformat_find_stream_info(pFormatCtx, NULL)<0)
    {
        printf("Couldn't find stream information.\n");
        return 0;
    }
    gettimeofday(&rtspfetch_time2, NULL);
    print_time_with_microseconds(rtspfetch_time2);
    //Find if there is a video stream in the stream
    int videoindex = -1;
    for (int i = 0; inb_streams; i++) {
        printf("i: %d\n", i);
        if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
            AVRational time_base = pFormatCtx->streams[i]->time_base;
            mpp_log("time_base: %d/%d\n", time_base.num, time_base.den);
            videoindex = i;
            //break;
        } else {
            printf("Didn't find a video stream.\n");
            return -1;
        }
    }
    av_dump_format(pFormatCtx, 0, input_url, 0);  
}


    


    result :
the time_base in pFormatCtx->streams[i] is 0 ;

    


    time_base:0/0
Input #0, rtsp, from 'rtsp://admin:Read1234@192.168.1.164:554/Streaming/channels/1':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.240000, bitrate: N/A
    Stream #0:0: Video: h264, yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc