Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

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

Autres articles (52)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette 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, par

    The 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 (...)

Sur d’autres sites (4157)

  • How can I export a video with a widget overlay in a Flutter app ?

    30 juin 2024, par Mohammed Bekele

    I'm developing a Flutter app for a embedding caption on a videos that need to be export as video file after processing it. I'm utilizing the flutter_ffmpeg_kit package. However, I'm having trouble getting the export to work properly.

    


    Here's the code I'm using :

    


    initially this is my stack :

    


                      Expanded(
                    child: Stack(
                      children: [
                        Center(
                          child: _videoPlayerController.value.isInitialized
                              ? AspectRatio(
                                  aspectRatio:
                                      _videoPlayerController.value.aspectRatio,
                                  child: VideoPlayer(_videoPlayerController),
                                )
                              : CircularProgressIndicator(),
                        ),
                        if (_currentCaption.isNotEmpty)
                          Positioned.fill(
                            child: Center(child: _buildCaptionText()),
                          ),
                      ],
                    ),
                  ),


    


    and in export button i executed this function

    


     Future<void> _exportVideo() async {&#xA;    setState(() {&#xA;      _isProcessing = true;&#xA;    });&#xA;&#xA;    try {&#xA;      final directory = await getExternalStorageDirectory();&#xA;      final rootPath = directory?.parent.parent.parent.parent.path;&#xA;      final mobixPath = path.join(rootPath!, &#x27;Mobix App&#x27;);&#xA;      final appPath = path.join(mobixPath, &#x27;Caption&#x27;);&#xA;      final outputPath = path.join(appPath, &#x27;Output&#x27;);&#xA;&#xA;      // Create the directories if they don&#x27;t exist&#xA;      await Directory(outputPath).create(recursive: true);&#xA;&#xA;      final timestamp = DateTime.now().millisecondsSinceEpoch;&#xA;      final outputFilePath = path.join(outputPath, &#x27;output-$timestamp.mp4&#x27;);&#xA;&#xA;&#xA;      // Generate the FFmpeg command&#xA;      final ffmpegCommand = _generateFFmpegCommand(&#xA;        widget.videoPath,&#xA;        outputFilePath,&#xA;        widget.words,&#xA;        _fontSize,&#xA;        _isBold,&#xA;        _isItalic,&#xA;        _fontColor,&#xA;        _backgroundColor,&#xA;      );&#xA;&#xA;      // Execute the FFmpeg command&#xA;      await FFmpegKit.execute(&#xA;        ffmpegCommand,&#xA;      ).then(&#xA;        (session) async {&#xA;          // Update progress if needed&#xA;          final returnCode = await session.getReturnCode();&#xA;          if (ReturnCode.isSuccess(returnCode)) {&#xA;            setState(() {&#xA;              _outputFilePath = outputFilePath;&#xA;            });&#xA;            ScaffoldMessenger.of(context).showSnackBar(&#xA;              SnackBar(content: Text(&#x27;Export successful: $_outputFilePath&#x27;)),&#xA;            );&#xA;          } else {&#xA;            print(&#x27;Export failed with rc: $returnCode&#x27;);&#xA;&#xA;            ScaffoldMessenger.of(context).showSnackBar(&#xA;              SnackBar(content: Text(&#x27;Export failed with rc: $returnCode&#x27;)),&#xA;            );&#xA;          }&#xA;          setState(() {&#xA;            _isProcessing = false;&#xA;          });&#xA;        },&#xA;      );&#xA;    } catch (e) {&#xA;      print(&#x27;Export failed: $e&#x27;);&#xA;      ScaffoldMessenger.of(context).showSnackBar(&#xA;        SnackBar(content: Text(&#x27;Export failed: $e&#x27;)),&#xA;      );&#xA;      setState(() {&#xA;        _isProcessing = false;&#xA;      });&#xA;    }&#xA;  }&#xA;&#xA;  String _generateFFmpegCommand(&#xA;    String inputPath,&#xA;    String outputPath,&#xA;    List<dynamic> words,&#xA;    double fontSize,&#xA;    bool isBold,&#xA;    bool isItalic,&#xA;    Color fontColor,&#xA;    Color backgroundColor,&#xA;  ) {&#xA;    final ffmpegCommand = StringBuffer();&#xA;&#xA;    // Add input file&#xA;    ffmpegCommand.write(&#x27;-i $inputPath &#x27;);&#xA;&#xA;    // Add subtitles filter&#xA;    final subtitleFilter = StringBuffer();&#xA;    for (var word in words) {&#xA;      final startTime = word[&#x27;startTime&#x27;].toDouble();&#xA;      final endTime = word[&#x27;endTime&#x27;].toDouble();&#xA;      final caption = word[&#x27;word&#x27;];&#xA;&#xA;      final fontStyle = isBold &amp;&amp; isItalic&#xA;          ? &#x27;bold italic&#x27;&#xA;          : isBold&#xA;              ? &#x27;bold&#x27;&#xA;              : isItalic&#xA;                  ? &#x27;italic&#x27;&#xA;                  : &#x27;normal&#x27;;&#xA;      final fontColorHex = fontColor.value.toRadixString(16).substring(2);&#xA;      final backgroundColorHex =&#xA;          backgroundColor.value.toRadixString(16).substring(2);&#xA;&#xA;      subtitleFilter.write(&#xA;          "drawtext=text=&#x27;$caption&#x27;:x=(w-tw)/2:y=h-(2*lh):fontcolor=$fontColorHex:fontsize=$fontSize:fontStyle=$fontStyle:box=1:boxcolor=$backgroundColorHex@0.5:boxborderw=5:enable=&#x27;between(t,$startTime,$endTime)&#x27;,");&#xA;    }&#xA;    ffmpegCommand.write(&#x27;-vf "${subtitleFilter.toString()}" &#x27;);&#xA;&#xA;    // Add output file&#xA;    ffmpegCommand.write(&#x27;$outputPath&#x27;);&#xA;&#xA;    return ffmpegCommand.toString();&#xA;  }&#xA;</dynamic></void>

    &#xA;

    When I run this it returns ReturnCode 1. What am i doing wrong ?

    &#xA;

  • avformat/matroskadec : Don't skip too much when unseekable

    17 mai 2019, par Andreas Rheinhardt
    avformat/matroskadec : Don't skip too much when unseekable
    

    The Matroska (and WebM) file format achieves forward-compability by
    insisting that demuxers ignore and skip elements they don't know about.
    Unfortunately, this complicates the detection of errors as errors
    resulting from loosing sync can't be reliably distinguished from
    unknown elements that are part of a future version of the standard.

    Up until now, the strategy to deal with this situation was to skip all
    unknown elements that are not obviously erroneous ; if an error happened,
    it was tried to seek to the last known good position to resync from (and
    resync to level 1 elements). This is working fine if the input is
    seekable, but if it is not, then the skipped data can usually not be
    rechecked lateron. This is particularly acute if unknown-length clusters
    are in use, as the check for whether a child element exceeds the
    containing master element is ineffective in this situation.

    To remedy this, a new heuristic has been introduced : If an unknown
    element is encountered in non-seekable mode, an error is presumed to
    have happened based upon a combination of the length of the row of the
    already encountered unknown elements and of how far away skipping this
    element would take us.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

    • [DH] libavformat/matroskadec.c
  • How to make HLS start from the begining

    15 septembre 2020, par Ariel Argañaraz

    I need some help with HLS streaming, I'm trying to create a playlist for streaming,

    &#xA;&#xA;

    I'm using ffmpeg to generate the files and the .m3u8 files. And for playing i'm using a web page with videojs player

    &#xA;&#xA;

    The idea is to simulate a live streaming using files already created.

    &#xA;&#xA;

    The problem is that in some version of iphone works and in another does not work.&#xA;The problem is that when I start play the video in the Safari browser of my phone it freezes for a while and then download and play the last segment.

    &#xA;&#xA;

    for example if the video is split in 4 differents .ts files.&#xA;It starts playing from the 4th .ts file and then stop.

    &#xA;&#xA;

    The problem is that I have 2 iphone mobile phone, one of them works perfectly but the other one not

    &#xA;&#xA;

    The not working cell phone is a iphone 6 (version 9.2.1)

    &#xA;&#xA;

    Here is my m3u8 file. Note that I'm using the #EXT-X-PLAYLIST-TYPE:EVENT and I remove the #EXT-X-ENDLIST from the botton. So it should be played as an live streaming.

    &#xA;&#xA;

    It works for another phones, it begins from the 0 second when I set the #EXT-X-START:TIME-OFFSET=0

    &#xA;&#xA;

    but in this version (9.2.1) the video freezes and then jumps to the last segment (webinar-3.ts) plays that segment and finally stop.

    &#xA;&#xA;

    #EXTM3U&#xA;#EXT-X-VERSION:4&#xA;#EXT-X-MEDIA-SEQUENCE:0&#xA;#EXT-X-ALLOW-CACHE:NO&#xA;#EXT-X-PLAYLIST-TYPE:EVENT&#xA;#EXT-X-START:TIME-OFFSET=0&#xA;#EXT-X-TARGETDURATION:6&#xA;#EXTINF:5.046444,&#xA;webinar-0.ts&#xA;#EXTINF:5,&#xA;webinar-1.ts&#xA;#EXTINF:5,&#xA;webinar-2.ts&#xA;#EXTINF:5,&#xA;webinar-3.ts&#xA;

    &#xA;&#xA;

    Have anybody got an idea of what i'm doing wrong or how to get a m3u8 config that works for this iphone version ?

    &#xA;