
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (95)
-
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (6311)
-
How to take thumbnail image from video bytes[] using java ?
14 mai 2021, par Sreeraj SMy requirement is, i want to show video thumbnail in fancybox. But unfortunatly its not showing thumbnail. its required seperate image for thumbnail.


Sample fancybox code


<a data-fancybox="data-fancybox" data-type="iframe" data-width="640" data-height="360" href="http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4">
 <img class='card-img-top img-fluid' src="local/cache-vignettes/L300xH169/bird1jpg-6986985-13aa4.jpg?1620994482" width='300' height='169' />
</a>



So i decided to maintain two url


one for video and other for video thumbnail.


- 

- http://localhost:8080/resources?resourceId=126 -> it will return video
- http://localhost:8080/resources?resourceId=126&thumbnail=true -> it will return thumbnail image






I haven't any idea about this but I had tried for video thumbnail with https://github.com/bytedeco/javacv. But i got 'OutofMemory' exception


pom.xml


<dependency>
 <groupid>org.bytedeco</groupid>
 <artifactid>javacv-platform</artifactid>
 <version>1.5.5</version>
 </dependency>



My java servlet code for thumbnail image is as follows


Java2DFrameConverter converter = new Java2DFrameConverter();
BufferedImage current;
BufferedImage next;
byte[] videoBytes = //video byte array fetched from db
ByteArrayOutputStream baos = new ByteArrayOutputStream();

FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber(new ByteArrayInputStream(videoBytes));
frameGrabber.start();
try {
 Frame frame = frameGrabber.grab();
 next = converter.convert(frame);

 current = new BufferedImage(next.getWidth(), next.getHeight(), next.getType());
 ImageIO.write(current, "png", baos);
 byte[] bytes = baos.toByteArray();
 frameGrabber.stop();


 response.setContentType("image/png");
 try (OutputStream o = response.getOutputStream()) {
 o.write(bytes);
 o.flush();
 }



Edit


Video section is working fine. i.e. can able to view video from this url http://localhost:8080/resources?resourceId=126


-
Hardware acceleration FFMPEG not speeding up rendering at the moment
13 août 2021, par AlphaDjangoI currently have ffmpeg running on a computer (ubuntu server 20.04) with a nvidia MSI GTX 1660 6GB GAMING X TWIN FORZ 7 GRAPHICS CARD and a Ryzen 5 3600 cpu. I have installed the nvidia drivers for linux for it.


Currently when enabling and disabling hardware acceleration the rendering takes the same amount of time which is around 1 minute to render per 1 minute of footage.


When using a similar setup in davinci resolve it takes 1/4 of the time to apply similar background effects and concating the clips which makes me question if I am using hardware acceleration of if my ffmpeg command is not optimised for it ?


This is the code which takes in around 50 mp4 clips and joins them together, scales them in size and applies a background blur on the sides of clips


ffmpeg -hwaccel cuda -f concat -safe 0 -i /home/anon/project/MEDIAFILES/work_ffmpeg_space/concat_file_user_root_projectId_1.txt -s 1920x1080 -filter_complex '[0:v]scale=ih*16/9:-1:flags=bicubic,boxblur=luma_radius=min(h\,w)/20:luma_power=2:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,crop=h=iw*9/16' -af aselect=concatdec_select,aresample=async=1 /home/anon/project/MEDIAFILES/created_videos/finalvideo_user_root_projectId_1.mp4



Any tips or ways to optimise the code to use hardware acceleration will be greatly appreciated !


This is my ffmpeg configuration


ffmpeg version N-103221-gc3ef9e0277 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
 configuration: --pkg-config-flags=--static --enable-nonfree --enable-gpl --enable-version3 --enable-libmp3lame --enable-libvpx --enable-libopus --enable-opencl --enable-libxcb --enable-opengl --enable-nvenc --enable-vaapi --enable-vdpau --enable-ffplay --enable-ffprobe --enable-libxvid --enable-libx264 --enable-libx265 --enable-openal --enable-openssl --enable-cuda-nvcc --enable-cuvid --extra-cflags=-I/usr/lcal/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --extra-libs=-lpthread
 libavutil 57. 3.100 / 57. 3.100
 libavcodec 59. 4.101 / 59. 4.101
 libavformat 59. 4.101 / 59. 4.101
 libavdevice 59. 0.100 / 59. 0.100
 libavfilter 8. 1.103 / 8. 1.103
 libswscale 6. 0.100 / 6. 0.100
 libswresample 4. 0.100 / 4. 0.100
 libpostproc 56. 0.100 / 56. 0.100



-
playing video in android using javacv ffmpeg
20 février 2017, par d91I’m trying to play a video stored in sd card using javacv. Following is my code
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
playthevideo();
}
protected void playthevideo() {
String imageInSD = "/storage/080A-0063/dama/" + "test3.mp4";
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(imageInSD);
AndroidFrameConverter converterToBitmap = new AndroidFrameConverter();
OpenCVFrameConverter.ToIplImage converterToipi = new OpenCVFrameConverter.ToIplImage();
try {
Log.d("Tag", "try");
grabber.start();
Log.d("Tag", "started");
int i = 0;
IplImage grabbedImage = null;
ImageView mimg = (ImageView) findViewById(R.id.a);
grabber.setFrameRate(grabber.getFrameRate());
ArrayList<bitmap> bitmapArray = new ArrayList<bitmap>();
while (((grabbedImage = converterToipi.convert(grabber.grabImage())) != null)) {
Log.d("Tag", String.valueOf(i));
int width = grabbedImage.width();
int height = grabbedImage.height();
if (grabbedImage == null) {
Log.d("Tag", "error");
}
IplImage container = IplImage.create(width, height, IPL_DEPTH_8U, 4);
cvCvtColor(grabbedImage, container, CV_BGR2RGBA);
Bitmap bitmapnew = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
bitmapnew.copyPixelsFromBuffer(container.getByteBuffer());
if (bitmapnew == null) {
Log.d("Tag", "bit error");
}
mimg.setImageBitmap(bitmapnew);
mimg.requestFocus();
i++;
}
Log.d("Tag", "go");
}
catch(Exception e) {
}
}
}
</bitmap></bitmap>just ignore the tags because those are only for my testing purposes..
When I run this code the main activity layout is still loading while android monitor shows the value of "i" (which is current frame number) and suddenly after frame number 3671 code exits the while loop and theimageview
shows a frame which is not the end frame of that video(it somewhere around staring of the video).
I was unable to find a way to show the grabbed frames from ffmpegframegrabber so i decided to show the image in imageview in this way. Can anybody tell me why I’m getting this error or another error non path to play and show the video in android activity ?
BTW javacv 1.3.1 is imported correctly into my android dev environment. Thanks.