
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (75)
-
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette 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. -
Supporting all media types
13 avril 2011, parUnlike 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 (9805)
-
lavu/pixdesc : handle xv30be in av_[read|write]_image_line
4 décembre 2022, par Philip Langdalelavu/pixdesc : handle xv30be in av_read_image_line
xv30be is an obnoxious format that I shouldn't have included in the
first place. xv30 packs 3 10bit channels into 32bits and while our
byte-oriented logic can handle Little Endian correctly, it cannot
handle Big Endian. To avoid that, I marked xv30be as a bitstream
format, but while that didn't produce FATE errors, it turns out that
the existing read/write code silently produces incorrect results, which
can be revealed via ubsan.In all likelyhood, the correct fix here is to remove the format. As
this format is only used by Intel vaapi, it's only going to show up
in LE form, so we could just drop the BE version. But I don't want to
deal with creating a hole in the pixfmt list and all the weirdness that
comes from that. Instead, I decided to write the correct read/write
code for it.And that code isn't too bad, as long as it's specialised for this
format, as the channels are all bit-aligned inside a 32bit word. -
why is powershell stripping the first "-" in my arguments to ffmpeg [duplicate]
12 décembre 2022, par robynChillHere is a simplified version of the powershell script I'm trying to write to join some .mp4 files :


[string]$inputs = ""
$filenames = "input1.mp4", "input2.mp4", "input3.mp4"
foreach ($f in $filenames) {
 $inputs += "-i $f "
}
Write-Host $inputs
.\bin\ffmpeg.exe $inputs -filter_complex...



The
write-host
prints out the string like I expect, but then ffmpeg gives me an error that says :



Unrecognized option 'i input1.mp4 -i input2.mp4 -i input3.mp4 '.
Error splitting the argument list : Option not found




So it looks like when the arguments are being passed to cmd.exe to be passed to ffmpeg, something is getting lost (at least that's how I think it works). I've read other questions that talk about problems with passing double-quotes in arguments, but my problem is with
-
. Can someone explain what is going in my case ? I don't think it's an escaping issue since the second and third-
look like they're being passed. Also, if I just usestart-process
with the-argumentList
option (and prepare one big$arguments
string beforehand) then everything works.

-
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èreI 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 :



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.