Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (40)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 is the first MediaSPIP stable release.
    Its official release date is June 21, 2013 and is announced here.
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • 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.

Sur d’autres sites (6974)

  • How the ffmpeg is fixing Handle page termination with same page number ...? [closed]

    11 avril 2024, par adarsh

    Im working on the teletext subtitle feature and faced with subs not clearing issue.
the subtitle lines remain displayed until being replaced by a new version of the specific line. So the subtitles never disappear and often an old line is still displayed, after another, more recent line is displayed/updated.
take a look at the issue in this sample video file : https://code.videolan.org/videolan/vlc/uploads/58c2e1660e94e2df5e8cdb75edf531d9/GODFATHER__03_.ts
Issue reported : https://sourceforge.net/p/zapping/bugs/203/

    


    The player is using ffmpeg and libzvbi library.

    


    At first I suspected that the Erase Page Flag (C4) in the Page Header was not set, but the flag was indeed set (at least once between two LOPs with subtitles). After further debugging it turned out that the Teletext service in the two issues consists of just a single Teletext page - which is the reason here :

    


    The Teletext spec defines the Magazine Serial Flag (C11) in Table 2 (ETSI EN 300 706 v1.2.1) as (bold font by me) :

    


    When set to '1' the service is designated to be in Serial mode and the transmission of a page is terminated by the next page header with a different page number.
When set to '0' the service is designated to be in Parallel mode and the transmission of a page is terminated by the next page header with a different page number but the same magazine number.
The same setting shall be used for all page headers in the service.
(BTW it doesn't really matter, but in these two cases this flag is always 0)

    


    In vbi_decode_teletext in /src/packet.c, storing the page is aborted, if the condition "page terminated" in the C11 definition is not met. But as the service here consists of only one page, this condition is never met !

    


    Luckily, this issue was fixed in ffmpeg- https://github.com/FFmpeg/FFmpeg/commit/b1e0e216462a989a39e7b413aef6d32f8cedc154

    


    and also in zvbi :
https://github.com/zapping-vbi/zvbi/commit/40a6ab0200c46b67b059b5b1fb15793ce780892a

    


    I understand the root cause and fix in zvbi library, and how it is ignoring c4 flag in case the same page no.

    


    But i want to understand how the ffmpeg fix is working ?
ffmpeg fix : https://github.com/FFmpeg/FFmpeg/commit/b1e0e216462a989a39e7b413aef6d32f8cedc154

    


    what is the rule for repeated page headers ?

    


  • How to grab ffmpeg's output as binary and write it to a file on the fly such that video players can play it in real time ?

    29 décembre 2022, par Mister Mystère

    I want to stream a RTSP-streaming device to a video player such as VLC but the catch is that, in between, the binary data needs to go through a custom high-speed serial link. I control what goes in this link from a C++ program.

    


    I was happily surprised to see that the following line allowed me to watch the RTSP stream by just opening "out.bin" from VLC which was a good lead for fast and efficient binary transmission of the stream :

    


    ffmpeg -i "rtsp://admin:password@X.X.X.X:554/h264Preview_01_main" -c:v copy -c:a copy -f mpegts out.bin


    


    I already wondered how ffmpeg manages to allow VLC to read that file, while itself writing to it at the same time. Turns out I was right to wonder, see below.

    


    I told myself I could make this command pipe its output to the standard output, and then in turn pipe the standard output to a file that I can read, (later, slice it, transmit the chunks and reconstruct it) and then write to an output file. However, this does not work :

    


    #include 
#include 
#include 

#define BUFSIZE 188 //MPEG-TS packet size

int main()
{
    char *cmd = (char*)"ffmpeg -i \"rtsp://admin:password@X.X.X.X:554/h264Preview_01_main\" -c:v copy -c:a copy -f mpegts pipe:1 -loglevel quiet";
    char buf[BUFSIZE];
    FILE *ptr, *file;

    file = fopen("./out.bin", "w");

    if (!file)
    {
        printf("Failed to open output file for writing, aborting");
       abort();
    }

    if ((ptr = popen(cmd, "r")) != NULL) {
       printf("Writing RTSP stream to file...");

       while (!kbhit())
       {
            if(fread(&buf, sizeof(char), BUFSIZE, ptr) != 0)
            {
               fwrite(buf, sizeof(char), BUFSIZE, file);
            }
            else
            {
                printf("No data\n");
            }
       }
       pclose(ptr);
    }
    else
    {
        printf("Failed to open pipe from ffmpeg command, aborting");
    }

    printf("End of program");

    fclose(file);
    return 0;
}


    


    Since VLC says "your input can't be opened" - whereas this works just fine :

    


    ffmpeg -i "rtsp://admin:password@X.X.X.X:554/h264Preview_01_main" -c:v copy -c:a copy -f mpegts pipe:1 -loglevel quiet > out.bin


    


    This is what ends up in the file after I close the program, versus the result of the command immediately above :
enter image description here

    


    The file is always 2kB regardless of how long I run the program : "No data" is shown repeatedly in the console output.

    


    Why doesn't it work ? If it is not just a bug, how can I grab the stream as binary at some point, and write it at the end to a file that VLC can read ?

    


    Update

    


    New code after applying Craig Estey's fix to my stupid mistake. The end result is that the MPEG-TS frames don't seem to shift anymore but the file writing stops partway into one of the first few frames (the console only shows a few ">" symbols and then stays silent, c.f. code).

    


    #include 
#include 
#include 

#define BUFSIZE 188                     // MPEG-TS packet size

int
main()
{
    char *cmd = (char *) "ffmpeg -i \"rtsp://127.0.0.1:8554/test.sdp\" -c:v copy -c:a copy -f mpegts pipe:1 -loglevel quiet";
    char buf[BUFSIZE];
    FILE *ptr,
    *file;

    file = fopen("./out.ts", "w");

    if (!file) {
        printf("Failed to open output file for writing, aborting");
        abort();
    }

    if ((ptr = popen(cmd, "r")) != NULL) {
        printf("Writing RTSP stream to file...");

        while(!kbhit()) {
            ssize_t rlen = fread(&buf, sizeof(char), BUFSIZE, ptr);
            if(rlen != 0)
            {
                printf(">");
                fwrite(buf, sizeof(char), rlen, file);
                fflush(file);
            }
        }
        pclose(ptr);
    }
    else {
        printf("Failed to open pipe from ffmpeg command, aborting");
    }

    printf("End of program");

    fclose(file);
    return 0;
}


    


    This can be tested on any computer with VLC and a webcam : open VLC, open capture device, capture mode directshow, (switch "play" for "stream"), next, display locally, select RTSP, Add, path=/test.sdp, next, transcoding=H264+MP3 (TS), replace rtsp ://:8554/ with rtsp ://127.0.0.1:8554/ in the generated command line, stream.

    


    To test that streaming is ok, you can just open a command terminal and enter "ffmpeg -i "rtsp ://127.0.0.1:8554/test.sdp" -c:v copy -c:a copy -f mpegts pipe:1 -loglevel quiet", the terminal should fill up with binary data.

    


    To test the program, just compile, run, and open out.ts after the program has run.

    


  • Integrate necessary ffmpeg libraries in own project for MCU (microcontrolers) [closed]

    16 septembre 2023, par Borel Kamnang

    I use two ffmpeg commands here :

    


    ffmpeg -i BigBuckBunny_320x180.mp4 -vf scale=192:96,setsar=1:1 outputBBB.mp4
ffmpeg -i outputBBB.mp4 -vf "fps=12,scale=-1:96:flags=lanczos,crop=192:in_h:(in_w-192)/2:0" -c:v rawvideo -pix_fmt rgb565be BigBuckBunny_192x96_12fps.rgb


    


    The first is to downscale an original video and the second is to convert the scaled video to a .rgb format.

    


    As anew user of ffmpeg, I would like to know what are libraries used for that two command to just integrate them in my Arduino IDE C++ project an just call the necessary functions to do the downscale and the conversion.

    


    And another of my concerns is knowing how I can run any ffmpeg in an Raspberry Pi Pico W (RP2040) or ESP32 microcontroller ?

    


    I tried to include the ffmpeg libraries folder in a created Arduino IDE project for Raspberry pico w and the link for files doesn't work. In addition to having the config.h and config components.h files missing in the folder downloaded from the ffmpeg site, there are too many dependencies between .h and .c files.

    


    extern "C" {
  #include "src/ffmpeg/libavcodec/avcodec.h"       
  #include "src/ffmpeg/libavutil/mathematics.h"
}
void setup() {
   Serial.begin(115200);
   delay(10000);
 }
 loop(){
 }


    


    It's been three days today that I've been trying to compile from Arduino IDE, and correct the links in the files.
The problem is also that I don't even have the certainty of what it will work in the Raspberry Pi PicoW or ESP32 afterwards.