
Recherche avancée
Médias (1)
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
Autres articles (86)
-
Taille des images et des logos définissables
9 février 2011, parDans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...) -
Pas question de marché, de cloud etc...
10 avril 2011Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
sur le web 2.0 et dans les entreprises qui en vivent.
Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...) -
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 (7372)
-
Save video from rtsp and play in exoplayer simultaneously [closed]
25 janvier 2024, par Julian Peña GallegoI am trying to receive a live stream via RTSP from an IP camera in Android Kotlin, I am recording the video to a local file with ffmpegkit but I must additionally view the live stream.


When I record the live stream with ffmpeg without playing the stream through exoplayer it works fine, but when both processes are running there is packet loss in the video recording or in the exoplayer.


Then I tried to get exoplayer to play the video that ffmpeg was recording, but it gave me an error since the file has not been closed yet.


Could you provide me with a solution ? I have found on the internet that it is possible with server sockets but they do not indicate how to do it.


-
Save image while face detection
13 octobre 2017, par hiduraHello I’ve this app that save an image for everytime my face move something similar to the IG stories my problem is that the cellphone get very slow and the app close suddenly because of allocation memory problems I want to know how i can do this without slowing down the cellphone and dont receive the error of closing.
The next code open the svg :
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static Bitmap getBitmap(VectorDrawable vectorDrawable) {
Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
vectorDrawable.draw(canvas);
Log.e("", "getBitmap: 1");
return bitmap;
}
private static Bitmap getBitmap(Context context, int drawableId) {
Log.e("", "getBitmap: 2");
Drawable drawable = ContextCompat.getDrawable(context, drawableId);
if (drawable instanceof BitmapDrawable) {
return BitmapFactory.decodeResource(context.getResources(), drawableId);
} else if (drawable instanceof VectorDrawable) {
return getBitmap((VectorDrawable) drawable);
} else {
throw new IllegalArgumentException("unsupported drawable type");
}
}The next one draw the svg below the position of the face.
/**
* Draws the face annotations for position on the supplied canvas.
*/
@Override
public void draw(Canvas canvas) {
Face face = mFace;
if (face == null) {
return;
}
// Draws a circle at the position of the detected face, with the face's track id below.
float x = translateX(face.getPosition().x + face.getWidth() / 2);
float y = translateY(face.getPosition().y + face.getHeight() / 2);
canvas.drawCircle(x, y, FACE_POSITION_RADIUS, mFacePositionPaint);
canvas.drawText("id: " + mFaceId, x + ID_X_OFFSET, y + ID_Y_OFFSET, mIdPaint);
canvas.drawText("happiness: " + String.format("%.2f", face.getIsSmilingProbability()), x - ID_X_OFFSET, y - ID_Y_OFFSET, mIdPaint);
canvas.drawText("right eye: " + String.format("%.2f", face.getIsRightEyeOpenProbability()), x + ID_X_OFFSET * 2, y + ID_Y_OFFSET * 2, mIdPaint);
canvas.drawText("left eye: " + String.format("%.2f", face.getIsLeftEyeOpenProbability()), x - ID_X_OFFSET*2, y - ID_Y_OFFSET*2, mIdPaint);
// Draws a bounding box around the face.
float xOffset = scaleX(face.getWidth() / 2.0f);
float yOffset = scaleY(face.getHeight() / 2.0f);
float left = x - xOffset;
float top = y - yOffset;
float right = x + xOffset;
float bottom = y + yOffset;
//bitmap = BitmapFactory.decodeResource(getOverlay().getContext().getResources(), R.drawable.ic_shirt);
bitmap = getBitmap(getOverlay().getContext(), R.drawable.ic_tshirt);
float eyeX = left-400;
// for(Landmark l : face.getLandmarks()){
// if(l.getType() == Landmark.LEFT_EYE){
// eyeX = l.getPosition().x + bitmap.getWidth() / 2;
// }
// }
tshirt = Bitmap.createScaledBitmap(bitmap, (int) scaleX(bitmap.getWidth() / 2),
(int) scaleY(bitmap.getHeight()/2), false);
float top_shirt=(face.getPosition().y + face.getHeight())+200;
canvas.drawBitmap(tshirt, eyeX, top_shirt, new Paint());
Canvas myCanvas = new Canvas(tshirt);
myCanvas.drawBitmap(tshirt, eyeX, top_shirt, new Paint());
HashMap args = new HashMap<>();
args.put("tshirt", tshirt);
new saveImg(args).execute();
//canvas.drawRect(left, top, right, bottom, mBoxPaint);
}This one save the image on the cellphone.
package com.google.android.gms.samples.vision.face.facetracker;
import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.os.Environment;
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Created by diegohidalgo on 10/12/17.
*/
public class saveImg extends AsyncTask {
Bitmap tshirt;
String name;
saveImg(HashMap args){
tshirt = (Bitmap)args.get("tshirt");
File file=new File(Environment.getExternalStorageDirectory() + "/facedetection/");
File[] list = file.listFiles();
int count = 0;
for (File f: list){
String name = f.getName();
if (name.endsWith(".png"))
count++;
}
name="img"+count+".png";
}
@Override
protected Void doInBackground(Void... args) {
File file = new File(Environment.getExternalStorageDirectory() + "/facedetection/"+ name);
try {
tshirt.compress(Bitmap.CompressFormat.PNG, 100, new FileOutputStream(file));
} catch (Exception e) {
e.printStackTrace();
}
System.gc();
tshirt.recycle();
tshirt= null;
return null;
}
protected void onPostExecute() {
}
}This is the mistake that give me before close the app.
10-13 10:38:17.526
8443-8443/com.google.android.gms.samples.vision.face.facetracker
W/art : Throwing OutOfMemoryError "Failed to allocate a 8916492 byte
allocation with 1111888 free bytes and 1085KB until OOM" 10-13
10:38:18.020
8443-8443/com.google.android.gms.samples.vision.face.facetracker
I/Process : Sending signal. PID : 8443 SIG : 9thanks in advance.
-
ffmpeg - Can't stably save rtsp stream to file
20 août 2022, par André LuísI'm trying to save the RTSP stream of this camera to file. However, at some point I'll get the following errors, which will stop the process.




video:331639kB audio:5199kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead : unknown




And a bunch of these, before the previous one :




Non-monotonous DTS in output stream 0:1 ; previous : 5439375, current :
5439283 ; changing to 5439376. This may result in incorrect timestamps
in the output file.




Here is the command I'm running :


ffmpeg "rtsp://192.168.0.100:554/cam/realmonitor?channel=1&subtype=0" -c copy -f segment -segment_time 00:01:00 -reset_timestamps 1 -segment_format mkv -strftime 1 /home/user/.camera/recordings/2022/8/19/%H_%M_%S.mkv



I've tried adding each of these parameters and they all together :


-fflags +autobsf+genpts -y -threads 1 -use_wallclock_as_timestamps 1 -dts_delta_threshold 0 -rtsp_transport tcp -i



ffprobe :


{
 "streams": [
 {
 "index": 0,
 "codec_name": "h264",
 "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
 "profile": "Main",
 "codec_type": "video",
 "codec_tag_string": "[0][0][0][0]",
 "codec_tag": "0x0000",
 "width": 1920,
 "height": 1080,
 "coded_width": 1920,
 "coded_height": 1080,
 "closed_captions": 0,
 "film_grain": 0,
 "has_b_frames": 0,
 "pix_fmt": "yuvj420p",
 "level": 40,
 "color_range": "pc",
 "chroma_location": "left",
 "field_order": "progressive",
 "refs": 1,
 "is_avc": "false",
 "nal_length_size": "0",
 "r_frame_rate": "100/1",
 "avg_frame_rate": "0/0",
 "time_base": "1/90000",
 "start_pts": 9000,
 "start_time": "0.100000",
 "bits_per_raw_sample": "8",
 "extradata_size": 27,
 "disposition": {
 "default": 0,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0,
 "captions": 0,
 "descriptions": 0,
 "metadata": 0,
 "dependent": 0,
 "still_image": 0
 }
 },
 {
 "index": 1,
 "codec_name": "aac",
 "codec_long_name": "AAC (Advanced Audio Coding)",
 "profile": "LC",
 "codec_type": "audio",
 "codec_tag_string": "[0][0][0][0]",
 "codec_tag": "0x0000",
 "sample_fmt": "fltp",
 "sample_rate": "16000",
 "channels": 1,
 "channel_layout": "mono",
 "bits_per_sample": 0,
 "r_frame_rate": "0/0",
 "avg_frame_rate": "0/0",
 "time_base": "1/16000",
 "start_pts": 0,
 "start_time": "0.000000",
 "extradata_size": 2,
 "disposition": {
 "default": 0,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0,
 "captions": 0,
 "descriptions": 0,
 "metadata": 0,
 "dependent": 0,
 "still_image": 0
 }
 }
 ]
}



I honestly don't know what else to do.