Recherche avancée

Médias (0)

Mot : - Tags -/auteurs

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (52)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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 (15075)

  • Is there a way to horizontal flip video captured from flutter front camera

    5 mai 2024, par JoyJoy

    Basically, I'm trying to flip video horizontally after capturing it from flutter front camera. So I start recording, stop recording, flip the video and pass it to another page. I'm fairly new and would appreciate any assistance as my code isn't working

    


    I've tried doing so using the new ffmpeg_kit flutter

    


    Future<void> flipVideo(String inputPath, String outputPath) async{&#xA;final ffmpegCommand = "-i $inputPath -vf hflip $outputPath";&#xA;final session = FFmpegKit.executeAsync(ffmpegCommand);&#xA;await session.then((session) async {&#xA;  final returnCode = await session.getReturnCode();&#xA;  if (ReturnCode.isSuccess(returnCode)) {&#xA;    print(&#x27;Video flipping successful&#x27;);&#xA;  } else {&#xA;    print(&#x27;Video flipping failed: ${session.getAllLogs()}&#x27;);&#xA;  }&#xA;});}&#xA;&#xA;void stopVideoRecording() async {&#xA;XFile videopath = await cameraController.stopVideoRecording();&#xA;&#xA;try {&#xA;  final Directory appDocDir = await &#xA;  getApplicationDocumentsDirectory();&#xA;  final String outputDirectory = appDocDir.path;&#xA;  final String timeStamp = DateTime.now().millisecondsSinceEpoch.toString();&#xA;  final String outputPath = &#x27;$outputDirectory/flipped_video_$timeStamp.mp4&#x27;;&#xA;&#xA;  await flipVideo(videopath.path, outputPath);&#xA;&#xA;  // Once completed,&#xA;   Navigator.push(&#xA;    context,&#xA;    MaterialPageRoute(&#xA;      builder: (builder) => VideoViewPage(&#xA;        path: File(outputPath),&#xA;        fromFrontCamera: iscamerafront,&#xA;        flash: flash,&#xA;      )));&#xA;  print(&#x27;Video flipping completed&#x27;);&#xA;} catch (e) {&#xA;  print(&#x27;Error flipping video: $e&#x27;);&#xA;}&#xA;</void>

    &#xA;

    }

    &#xA;

  • In Flutter, how to get image pixel

    12 janvier 2024, par Pianone

    my code here

    &#xA;

    var response = await Dio().get(&#xA;   url,&#xA;   options: Options(responseType: ResponseType.bytes)&#xA;);&#xA;Uint8List? srcImage = Uint8List.fromList(response.data);&#xA;Uint8List? watermark = await captureWaterMark();&#xA;Image i = Image.memory(srcImage!);&#xA;//how can I get the pixel (Image i) such like 1920*1080 or just width/hight pixel&#xA;...tell me how to do...&#xA;srcImage = await addWaterMarkByFfmpegCommand(srcImage, watermark);&#xA;   final result = await ImageGallerySaver.saveImage(&#xA;      srcImage!, name: name,&#xA;   );&#xA;

    &#xA;

    i need get the pic pixel so that i can use it in ffmpeg command, it a func that add a watermark into srcImage, but cause their pixel ratio too diff to adapted watermark

    &#xA;

    i try to get pixel from ffmpeg... but i failed

    &#xA;

    /// addWaterMark by using ffmpeg Command&#xA;Future addWaterMarkByFfmpegCommand(Uint8List srcImg, Uint8List watermark) async {&#xA;  try {&#xA;    final Directory tempDir = await Directory.systemTemp.createTemp();&#xA;    final File image1File = File(&#x27;${tempDir.path}/srcImg.jpg&#x27;);&#xA;    await image1File.writeAsBytes(srcImg);&#xA;    final File image2File = File(&#x27;${tempDir.path}/watermark.png&#x27;);&#xA;    await image2File.writeAsBytes(watermark);&#xA;&#xA;    final String outputFilePath = &#x27;${tempDir.path}/output.jpg&#x27;;&#xA;    //when i get srcImage pixel, the positions in bold(iw*1) in the following commands will be replaced to make watermark adapted&#xA;    final String command =&#xA;        &#x27;-i ${image1File.path} -i ${image2File.path} -filter_complex "[1:v]scale=**iw*1**:-1[v1];[0:v][v1]overlay=10:10" -frames:v 1 $outputFilePath&#x27;;&#xA;    await FFmpegKit.execute(command);&#xA;&#xA;    final File outputFile = File(outputFilePath);&#xA;    final Uint8List outputBytes = await outputFile.readAsBytes();&#xA;    return outputBytes;&#xA;  } catch (e) {&#xA;    print(&#x27;Error executing ffmpeg command: $e&#x27;);&#xA;  }&#xA;  return null;&#xA;}&#xA;

    &#xA;

    ps : i am new to flutter and ffmpeg, plz help me, I'd appreciate, thanks alot

    &#xA;

  • How to Convert 16:9 Video to 9:16 Ratio While Ensuring Speaker Presence in Frame ?

    28 avril 2024, par shreesha

    I am tried so many time to figure out the problem in detecting the face and also it's not so smooth enough to like other tools out there.

    &#xA;

    So basically I am using python and Yolo in this project but I want the person who is talking and who the ROI (region of interest) is.

    &#xA;

    Here is the code :

    &#xA;

    from ultralytics import YOLO&#xA;from ultralytics.engine.results import Results&#xA;from moviepy.editor import VideoFileClip, concatenate_videoclips&#xA;from moviepy.video.fx.crop import crop&#xA;&#xA;# Load the YOLOv8 model&#xA;model = YOLO("yolov8n.pt")&#xA;&#xA;# Load the input video&#xA;clip = VideoFileClip("short_test.mp4")&#xA;&#xA;tacked_clips = []&#xA;&#xA;for frame_no, frame in enumerate(clip.iter_frames()):&#xA;    # Process the frame&#xA;    results: list[Results] = model(frame)&#xA;&#xA;    # Get the bounding box of the main object&#xA;    if results[0].boxes:&#xA;        objects = results[0].boxes&#xA;        main_obj = max(&#xA;            objects, key=lambda x: x.conf&#xA;        )  # Assuming the first detected object is the main one&#xA;&#xA;        x1, y1, x2, y2 = [int(val) for val in main_obj.xyxy[0].tolist()]&#xA;&#xA;        # Calculate the crop region based on the object&#x27;s position and the target aspect ratio&#xA;        w, h = clip.size&#xA;        new_w = int(h * 9 / 16)&#xA;        new_h = h&#xA;&#xA;        x_center = x2 - x1&#xA;        y_center = y2 - y1&#xA;&#xA;        # Adjust x_center and y_center if they would cause the crop region to exceed the bounds&#xA;        if x_center &#x2B; (new_w / 2) > w:&#xA;            x_center -= x_center &#x2B; (new_w / 2) - w&#xA;        elif x_center - (new_w / 2) &lt; 0:&#xA;            x_center &#x2B;= abs(x_center - (new_w / 2))&#xA;&#xA;        if y_center &#x2B; (new_h / 2) > h:&#xA;            y_center -= y_center &#x2B; (new_h / 2) - h&#xA;        elif y_center - (new_h / 2) &lt; 0:&#xA;            y_center &#x2B;= abs(y_center - (new_h / 2))&#xA;&#xA;        # Create a subclip for the current frame&#xA;        start_time = frame_no / clip.fps&#xA;        end_time = (frame_no &#x2B; 1) / clip.fps&#xA;        subclip = clip.subclip(start_time, end_time)&#xA;&#xA;        # Apply cropping using MoviePy&#xA;        cropped_clip = crop(&#xA;            subclip, x_center=x_center, y_center=y_center, width=new_w, height=new_h&#xA;        )&#xA;&#xA;        tacked_clips.append(cropped_clip)&#xA;&#xA;reframed_clip = concatenate_videoclips(tacked_clips, method="compose")&#xA;reframed_clip.write_videofile("output_video.mp4")&#xA;

    &#xA;

    So basically I want to fix the face detection with ROI detection where it can detect the face and make that face and the body on to the frame and making sure that the speaker who is speaking is brought to the frame

    &#xA;