
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 (52)
-
Qualité du média après traitement
21 juin 2013, parLe bon réglage du logiciel qui traite les média est important pour un équilibre entre les partis ( bande passante de l’hébergeur, qualité du média pour le rédacteur et le visiteur, accessibilité pour le visiteur ). Comment régler la qualité de son média ?
Plus la qualité du média est importante, plus la bande passante sera utilisée. Le visiteur avec une connexion internet à petit débit devra attendre plus longtemps. Inversement plus, la qualité du média est pauvre et donc le média devient dégradé voire (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
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.
Sur d’autres sites (13162)
-
Humble Video take snapshot of given time
23 mai 2021, par Boldbayar- 

-
Hello, I'm using https://github.com/artclarke/humble-video to take a thumbnail from a video.
So far I have successfully managed to take a snapshot from a video at start with following method.


private static Path generateThumbnail(final Path videoFile)
 throws InterruptedException, IOException {

 final Demuxer demuxer = Demuxer.make();
 demuxer.open(videoFile.toString(), null, false, true, null, null);

 int streamIndex = -1;
 Decoder videoDecoder = null;
 String rotate = null;
 final int numStreams = demuxer.getNumStreams();
 for (int i = 0; i < numStreams; ++i) {
 final DemuxerStream stream = demuxer.getStream(i);
 final KeyValueBag metaData = stream.getMetaData();
 final Decoder decoder = stream.getDecoder();
 if (decoder != null
 && decoder.getCodecType() == MediaDescriptor.Type.MEDIA_VIDEO) {
 videoDecoder = decoder;
 streamIndex = i;
 rotate = metaData.getValue("rotate", KeyValueBag.Flags.KVB_NONE);
 break;
 }
 }

 if (videoDecoder == null) {
 throw new IOException("Not a valid video file");
 }
 videoDecoder.open(null, null);

 final MediaPicture picture = MediaPicture.make(videoDecoder.getWidth(),
 videoDecoder.getHeight(), videoDecoder.getPixelFormat());

 final MediaPictureConverter converter = MediaPictureConverterFactory
 .createConverter(MediaPictureConverterFactory.HUMBLE_BGR_24, picture);

 final MediaPacket packet = MediaPacket.make();
 BufferedImage image = null;
 MUX : while (demuxer.read(packet) >= 0) {
 if (packet.getStreamIndex() != streamIndex) {
 continue;
 }
 int offset = 0;
 int bytesRead = 0;
 videoDecoder.decodeVideo(picture, packet, offset);
 do {
 bytesRead += videoDecoder.decode(picture, packet, offset);
 if (picture.isComplete()) {
 image = converter.toImage(null, picture);
 break MUX;
 }
 offset += bytesRead;

 } while (offset < packet.getSize());
 }
 if (image == null) {
 throw new IOException("Unable to find a complete video frame");
 }
 if (rotate != null) {
 final AffineTransform transform = new AffineTransform();
 transform.translate(0.5 * image.getHeight(), 0.5 * image.getWidth());
 transform.rotate(Math.toRadians(Double.parseDouble(rotate)));
 transform.translate(-0.5 * image.getWidth(), -0.5 * image.getHeight());
 final AffineTransformOp op = new AffineTransformOp(transform,
 AffineTransformOp.TYPE_BILINEAR);
 image = op.filter(image, null);
 }

 final Path target = videoFile.getParent()
 .resolve(videoFile.getFileName() + ".thumb.jpg");

 final double mul;
 if (image.getWidth() > image.getHeight()) {
 mul = 216 / (double) image.getWidth();
 } else {
 mul = 216 / (double) image.getHeight();
 }

 final int newW = (int) (image.getWidth() * mul);
 final int newH = (int) (image.getHeight() * mul);
 final Image thumbnailImage = image.getScaledInstance(newW, newH,
 Image.SCALE_SMOOTH);
 image = new BufferedImage(newW, newH, BufferedImage.TYPE_INT_BGR);

 final Graphics2D g2d = image.createGraphics();
 g2d.drawImage(thumbnailImage, 0, 0, null);
 g2d.dispose();

 ImageIO.write(image, "jpeg", target.toFile());
 return target.toAbsolutePath(); }



-
Now, what I want to do is take a snapshot after 2 seconds after the video starts, is it possible ? I
have tried using the "Demuxer" -s seek method but no luck.








-
-
Black overlay appears when merging a transparent video to another video
13 juin 2012, par RakeshSThis is what I have done so far :
Command to create a transparent PNG image :
convert -size 640x480 -background transparent -fill blue \
-gravity South label:ROCK image1-0.pngCommand to create a transparent video :
ffmpeg -loop 1 -f image2 -i image1-0.png -r 20 -vframes 100 \
-vcodec png -pix_fmt bgra mov-1.mov(as per this post) - I expect this video to be a transparent video.
Command to overlay a video with another :
ffmpeg -i final-video.mov -sameq -ar 44100 \
-vf "movie=mov-1.mov [logo];[in][logo] overlay=0:0 [out]" \
-strict experimental final-video.movAbove commands works perfect and I have not faced any problem, but I don't get what I expect which is kinda watermarking effect, I want mov-1.mov to be transparent with final-video.mov.
Questions :
- Is there any way to verify if the generated video is transparent ? other than merging ?
- Not sure why the above mov-1.mov is not transparent when it is merged with final-video.mov, any info to solve this problem would be great.
Please help.
-
ffmpeg boxblur filter takes too long
12 juin 2020, par Prashant_SarinI am using below command to blur a video but it is very slow. Can anyone please help if i can improve the speed somehow.



"ffmpeg -i $inputPath -lavfi [0:v]split=2[original][copy];[copy]scale=ih*16/9:-1,crop=h=iw*9/16,boxblur=luma_radius=50:chroma_radius=25:luma_power=2[blurred];[blurred][original]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2[final] -map [final] -map a:0 -g 2 -preset ultrafast $outputPath -y"