
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (112)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP 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" (...)
Sur d’autres sites (14984)
-
FFMPEG : Corupt decoded frame in stream 0
13 avril 2021, par MartinThanks to user @llogan this is my working 'almost' good command :


ffmpeg -rtsp_transport tcp -i "input1" -rtsp_transport tcp -i "input2" -rtsp_transport tcp -i "input3" -rtsp_transport tcp -i "input4" -filter_complex "[0:v] setpts=PTS-STARTPTS, scale=960x540 [a0];[1:v] setpts=PTS-STARTPTS, scale=960x540 [a1];[2:v] setpts=PTS-STARTPTS, scale=960x540 [a2];[3:v] setpts=PTS-STARTPTS, scale=960x540 [a3];[a0][a1][a2][a3]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0,format=yuv420p[out]" -map "[out]" -map 3:a -c:v libx264 -preset medium -tune zerolatency -b:v 5000k -maxrate 5000k -bufsize 10000k -r 15 -c:a aac -ac 2 -f flv rtmp://a.rtmp.youtube.com/live2/


It just stream four camera IP to youtube with split screen in grid 2x2.


The problem is that the one of my inputs got weird bugs :


rtsp://INPUT: corrupt decoded frame in stream 0 dup=0 drop=82745 speed= 1x 
[h264 @ 0x7fffbccda980] error while decoding MB 59 34, bytestream -95011.7kbits/s dup=0 drop=82926 speed= 1x
[h264 @ 0x7fffbccda980] concealing 870 DC, 870 AC, 870 MV errors in P frame
rtsp://INPUT: corrupt decoded frame in stream 0 dup=0 drop=83279 speed= 1x 
[h264 @ 0x7fffbca74b80] error while decoding MB 14 11, bytestream -55010.0kbits/s dup=0 drop=83493 speed= 1x 
[h264 @ 0x7fffbca74b80] concealing 2755 DC, 2755 AC, 2755 MV errors in P frame
frame=22524 fps= 15 q=15.0 size= 918596kB time=00:25:01.56 bitrate=5011.5kbits/s dup=0 drop=83836 speed= 1x



Also when i'm running the command at the begining i'm getting something like "decode slice heaeder error"


But when i'm trying to run this one camera alone everything works fine, but still there is a chance that this camera is just too old.


-
More Cinepak Madness
20 octobre 2011, par Multimedia Mike — Codec TechnologyFellow digital archaeologist Clone2727 found a possible fifth variant of the Cinepak video codec. He asked me if I cared to investigate the sample. I assured him I wouldn’t be able to die a happy multimedia nerd unless I have cataloged all possible Cinepak variants known to exist in the wild. I’m sure there are chemistry nerds out there who are ecstatic when another element is added to the periodic table. Well, that’s me, except with weird multimedia formats.
Background
Cinepak is a video codec that saw widespread use in the early days of digital multimedia. To date, we have cataloged 4 variants of Cinepak in the wild. This distinction is useful when trying to write and maintain an all-in-one decoder. The variants are :- The standard type : Most Cinepak data falls into this category. It decodes to a modified/simplified YUV 4:2:0 planar colorspace and is often seen in AVI and QuickTime/MOV files.
- 8-bit greyscale : Essentially the same as the standard type but with only a Y plane. This has only been identified in AVI files and is distinguished by the file header’s video bits/pixel field being set to 8 instead of 24.
- 8-bit paletted : Again, this is identified by the video header specifying 8 bits/pixel for a Cinepak stream. There is essentially only a Y plane in the data, however, each 8-bit value is a palette index. The palette is transported along with the video header. To date, only one known sample of this format has even been spotted in the wild, and it’s classified as NSFW. It is also a QuickTime/MOV file.
- Sega/FILM CPK data : Sega Saturn games often used CPK files which stored a variant of Cinepak that, while very close the standard Cinepak, couldn’t be decoded with standard decoder components.
So, a flexible Cinepak decoder has to identify if the file’s video header specified 8 bits/pixel. How does it distinguish between greyscale and paletted ? If a file is paletted, a custom palette should have been included with the video header. Thus, if video bits/pixel is 8 and a palette is present, use paletted ; else, use greyscale. Beyond that, the Cinepak decoder has a heuristic to determine how to handle the standard type of data, which might deviate slightly if it comes from a Sega CPK file.
The Fifth Variant ?
Now, regarding this fifth variant– the reason this issue came up is because of that aforementioned heuristic. Basically, a Cinepak chunk is supposed to store the length of the entire chunk in its header. The data from a Sega CPK file plays fast and loose with this chunk size and the discrepancy makes it easy to determine if the data requires special handling. However, a handful of files discovered on a Macintosh game called “The Journeyman Project : Pegasus Prime” have chunk lengths which are sometimes in disagreement with the lengths reported in the containing QuickTime file’s stsz atom. This trips the heuristic and tries to apply the CPK rules against Cinepak data which, aside from the weird chunk length, is perfectly compliant.Here are the first few chunk sizes, as reported by the file header (stsz atom) and the chunk :
size from stsz = 7880 (0x1EC8) ; from header = 3940 (0xF64) size from stsz = 3940 (0xF64) ; from header = 3940 (0xF64) size from stsz = 15792 (0x3DB0) ; from header = 3948 (0xF6C) size from stsz = 11844 (0x2E44) ; from header = 3948 (0xF6C)
Hey, there’s a pattern here. If they don’t match, then the stsz size is an even multiple of the chunk size (2x, 3x, or 4x in my observation). I suppose I could revise the heuristic to state that if the stsz size is 2x, 3x, 4x, or equal to the chunk header, qualify it as compliant Cinepak data.
Of course it feels impure, but software engineering is rarely about programmatic purity. A decade of special cases in the FFmpeg / Libav codebases are a testament to that.
What’s A Variant ?
Suddenly, I find myself contemplating what truly constitutes a variant. Maybe this was just a broken encoder program making these files ? And for that, I assign it the designation of distinct variation, like some sort of special, unique showflake ?Then again, I documented Magic Carpet FLIC as being a distinct variant of the broader FLIC format (which has an enormous number of variants as well).
-
Ffmpeg : Encoding images with audio [duplicate]
10 février 2015, par DriesThis question is an exact duplicate of :
I’m tryng to encode video and audio at the same time using Ffmpeg.
At the moment I’m using this command :ffmpeg -r 24 -pix_fmt rgba -s 1280x720 -f rawvideo -y -i -f s16le -ac 1 -ar 44100 -i - -acodec pcm_s16le -ac 1 -b:a 320k -ar 44100 -vf vflip -vcodec mpeg1video -qscale 4 -bufsize 500KB -maxrate 5000KB OUTPUT_FILE
At first I had this without the information and input from the audio. So, without the audio this works fine :
ffmpeg -r 24 -pix_fmt rgba -s 1280x720 -f rawvideo -y -i -vf vflip -vcodec mpeg1video -qscale 4 -bufsize 500KB -maxrate 5000KB OUTPUT_FILE
To write the frames to the encoder (still not using audio) I’m using the following code :
fwrite(frame, sizeof(unsigned char*) * frameWidth * frameHeight, 1, ffmpeg);
Now, I want to add audio to this encoder (see the first command). I added a new input and added the information about the audio to the command but I have no idea how I should write, and when, the audio to the encoder (together with the video).
I’ve tried this by adding the following code :
for (int t = 0; t < 44100/24; ++t)
fwrite(&audio, sizeof(short int), 1, ffmpeg);This should write 2000 samples of audio per video frame to the encoder. This code is called right after the fwrite() for the video frame.
This does give weird results however. The image is not rendered in the right spot, gives green flashes and there is no audio.
I can’t really figure out how (or when) to write the audio to the encoder.
Thanks in advance !