
Recherche avancée
Médias (91)
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Paul Westerberg - Looking Up in Heaven
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Le Tigre - Fake French
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Thievery Corporation - DC 3000
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Dan the Automator - Relaxation Spa Treatment
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Gilberto Gil - Oslodum
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (81)
-
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. -
Keeping control of your media in your hands
13 avril 2011, parThe vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...) -
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...)
Sur d’autres sites (10635)
-
h264 lossless coding
29 septembre 2014, par cloudravenIs it possible to do completely lossless encoding in h264 ? By lossless, I mean that if I feed it a series of frames and encode them, and then if I extract all the frames from the encoded video, I will get the exact same frames as in the input, pixel by pixel, frame by frame. Is that actually possible ?
Take this example :I generate a bunch of frames, then I encode the image sequence to an uncompressed AVI (with something like virtualdub), I then apply lossless h264 (the help files claim that setting —qp 0 makes lossless compression, but I am not sure if that means that there is no loss at any point of the process or that just the quantization is lossless). I can then extract the frames from the resulting h264 video with something like mplayer.
I tried with Handbrake first, but it turns out it doesn’t support lossless encoding. I tried x264 but it crashes. It may be because my source AVI file is in RGB colorspace instead of YV12. I don’t know how to feed a series of YV12 bitmaps and in what format to x264 anyway, so I cannot even try.
In summary what I want to know if that is there a way to go from
Series of lossless bitmaps (in any colorspace) -> some transformation -> h264 encode -> h264 decode -> some transformation -> the original series of lossless bitmaps
If there a way to achieve this ?
EDIT : There is a VERY valid point about lossless H264 not making too much sense. I am well aware that there is no way I could tell (with just my eyes) the difference between and uncompressed clip and another compressed at a high rate in H264, but I don’t think it is not without uses. For example, it may be useful for storing video for editing without taking huge amounts of space and not losing quality and spending too much encoding time every time the file is saved.
UPDATE 2 : Now x264 doesn’t crash. I can use as sources either avisynth or lossless yv12 lagarith (to avoid the colorspace compression warning). Howerver, even with —qp 0 and a rgb or yv12 source I still get some differences, minimal but present. This is troubling, because all the information I have found on lossless predictive coding (—qp 0) claims that the whole encoding should be lossless, but I am unable to verifiy this.
-
matplotlib 3D linecollection animation gets slower over time
15 juin 2021, par Vignesh DesmondI'm trying to animate a 3d line plot for attractors, using Line3DCollection. The animation is initally fast but it gets progressively slower over time. A minimal example of my code :


def generate_video(nframes):

 fig = plt.figure(figsize=(16, 9), dpi=120)
 canvas_width, canvas_height = fig.canvas.get_width_height()
 ax = fig.add_axes([0, 0, 1, 1], projection='3d')

 X = np.random.random(nframes)
 Y = np.random.random(nframes)
 Z = np.random.random(nframes)

 cmap = plt.cm.get_cmap("hsv")
 line = Line3DCollection([], cmap=cmap)
 ax.add_collection3d(line)
 line.set_segments([])

 def update(frame):
 i = frame % len(vect.X)
 points = np.array([vect.X[:i], vect.Y[:i], vect.Z[:i]]).transpose().reshape(-1,1,3)
 segs = np.concatenate([points[:-1],points[1:]],axis=1)
 line.set_segments(segs)
 line.set_array(np.array(vect.Y)) # Color gradient
 ax.elev += 0.0001
 ax.azim += 0.1

 outf = 'test.mp4'
 cmdstring = ('ffmpeg', 
 '-y', '-r', '60', # overwrite, 1fps
 '-s', '%dx%d' % (canvas_width, canvas_height),
 '-pix_fmt', 'argb',
 '-f', 'rawvideo', '-i', '-',
 '-b:v', '5000k','-vcodec', 'mpeg4', outf)
 p = subprocess.Popen(cmdstring, stdin=subprocess.PIPE)

 for frame in range(nframes):
 update(frame)
 fig.canvas.draw()
 string = fig.canvas.tostring_argb()
 p.stdin.write(string)

 p.communicate()

generate_video(nframes=10000)



I used the code from this answer to save the animation to mp4 using ffmpeg instead of anim.FuncAnimation as its much faster for me. But both methods get slower over time and I'm not sure how to make the animation not become slower. Any advice is welcome.


Versions :
Matplotlib : 3.4.2
FFMpeg : 4.2.4-1ubuntu0.1


-
FFmpeg c api create encoder for AV_CODEC_ID_H264 crash on Windows
30 avril 2023, par Guanyuming HeI'm using ffmpeg (version 5.1.2) to clip a mp4 video per frame so I need to decode and encode it. However, when I'm creating the encoder for its video stream, the program always crashes at the call to
avio_open2()
, after H264 gives this error message :

[h264_mf @ 0000025C1EBC1900] could not set output type (80004005)





The configuration (time_base, pix_fmt, width, height) of the codec context of the encoder is copied from the decoder, and I checked if the pixel format is supported by finding if it's in
codec->pix_fmts
.

I find that the problem does not involve all my other pieces of code, because this minimal program can duplicate the same problem :


extern "C"
{
#include <libavcodec></libavcodec>avcodec.h>
}

int main()
{
 auto codec = avcodec_find_encoder(AV_CODEC_ID_H264);
 auto codec_ctx = avcodec_alloc_context3(codec);

 codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P;
 codec_ctx->width = 2560;
 codec_ctx->height = 1440;
 codec_ctx->time_base.num = 1; codec_ctx->time_base.den = 180000;

 avcodec_open2(codec_ctx, codec, NULL);

 return 0;
}



Then I suspect if it's a bug of ffmpeg. My environment is Windows 11 64-bit, Visual Studio 2022. The ffmpeg library is obtained from vcpkg, as shown in the following image :