Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (35)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (7578)

  • I want to use Xabe.FFmpeg to convert the video size, but I found that I may be stuck in a deadlock problem

    13 mai 2021, par HalfLucky

    I now use WPF to develop the function of importing video. I want to add a code to convert the video size, but every time the program runs to this line of code, my program will deadlock here.

    


    public MyRelayCommand<string> ImportMovieCmd => new Lazy>(() =>new MyRelayCommand<string>(ImportMovie)).Value;&#xA;&#xA;private async void ImportMovie(string mediaType)&#xA;{&#xA;    string[] pathlist = ExecuteSelectFileDialog(mediaType);&#xA;&#xA;    if (pathlist == null || pathlist.Length == 0)&#xA;    {&#xA;        return;&#xA;    }&#xA;&#xA;    foreach (var path in pathlist)&#xA;    {&#xA;        ...&#xA;&#xA;        await GetMasterMovie(newMedia);&#xA;&#xA;        ...&#xA;    }&#xA;}&#xA;</string></string>

    &#xA;

    When I proceed to convert the video size, I will be stuck at this step !

    &#xA;

    private static async Task GetMasterMovie(MovieMediaInfoVM newMedia)&#xA;{&#xA;    try&#xA;    {&#xA;&#xA;        ...&#xA;&#xA;        var conversion = await Xabe.FFmpeg.FFmpeg.Conversions.FromSnippet.ChangeSize(moviepath, output, VideoSize.Nhd);&#xA;&#xA;        conversion.OnProgress &#x2B;= (sender, args) =>&#xA;        {&#xA;            var percent = (int)(Math.Round(args.Duration.TotalSeconds / args.TotalLength.TotalSeconds, 2) * 100);&#xA;            Log.Other.Info2($"[{args.Duration} / {args.TotalLength}] {percent}%");&#xA;        };&#xA;&#xA;        await conversion.Start();&#xA;&#xA;        ...&#xA;&#xA;    }&#xA;    catch (Exception ex)&#xA;    {&#xA;&#xA;        Log.Other.Info2(ex.ToString());&#xA;    }&#xA;}&#xA;

    &#xA;

    When I close the current window, the program starts to convert the video again. I have now changed all methods to asynchronous, but every time the program reaches the line of code below, it will freeze. I have no clue now. I can only ask for help !

    &#xA;

  • ffmpeg : Create a fake shadow below alpha channel webm/png sequence

    6 mai 2021, par Beneos Battlemaps

    Purpose : I'd like to render out animated 3D meshes as png sequence to use them as animated tokens for virtual tabletop games. To make the mesh looks more natural I'd like to create a fake show beneath the actual token.

    &#xA;

    Problem : I have a png sequence 1 (as well as a webm file created with ffmpet out of this png sequence if it makes it easier) with alpha channel. To create the webm I use :&#xA;ffmpeg -framerate 24 -f image2 -i Idle_Top.%04d.png -c:v libvpx-vp9 -crf 25 -pix_fmt yuva420p Idle_Top.webm (If its relevant). I'd like to render out the png sequence to a webm file that have the current images as well as the transparent shadow beneath the token combined.

    &#xA;

    Possible workflow : I think a good way to achieve the wanted shadow effect is to use the alpha channel image as a mask on a black picture with the same resolution as the source image 2. Then you have a complete black version of the image. Then you need to place this image beneath the colored image and make a offset of 10px left and 10px down to create the ilusion of perspective 3. At the end the black image below the colored image must have a transparency as well ( 30% visibility should be enough) 4.

    &#xA;

    Workflow overview

    &#xA;

    Assets : I've put the webm file and the png files on my gDrive https://drive.google.com/drive/folders/1wznGaPwhKc2UyPpSZBSISa1gs3oixsHR?usp=sharing

    &#xA;

    Though I work with ffmpeg on a regular basis I have no clue where to start. Can you please help me out with this interesting problem ?

    &#xA;

    Best regards&#xA;Ben

    &#xA;

  • Why can't I reorder the streams in my mpg container with ffmpeg ?

    15 octobre 2023, par kaltorak

    Background : Could having audio as stream 0 and video as stream 1 explain why my MPG will play on OSX QuickTime Player, but not Win10 Movies & TV ?
    &#xA;I've got an mpg file with audio as stream 0 and video as stream 1.
    &#xA;It plays fine under OSX QT Player, but not under Win10's default app.
    &#xA;For lack of a better idea, I'm assuming the unusual stream ordering is my problem, and I'm trying to fix it with ffmpeg.&#xA;What luck ! https://trac.ffmpeg.org/wiki/Map describes exactly my case !

    &#xA;

    &#xA;

    Re-order streams

    &#xA;

    The order of your -map options determines the order of the streams in the output. In this example the input file has audio as stream #0 and video as stream #1 (which is possible but unusual). Example to re-position video so it is listed first, followed by the audio :

    &#xA;

    ffmpeg -i input.mp4 -map 0:v -map 0:a -c copy output.mp4

    &#xA;

    This example stream copies (re-mux) with -c copy to avoid re-encoding.

    &#xA;

    &#xA;

    I use exactly that command, but the flipping doesn't seem to work, like so :

    &#xA;

    ffprobe -hide_banner myfile.trimmed.mpg&#xA;[h264 @ 000001b965b569c0] Increasing reorder buffer to 2&#xA;Input #0, mpeg, from &#x27;myfile.trimmed.mpg&#x27;:&#xA;  Duration: 00:02:41.09, start: 0.500000, bitrate: 6255 kb/s&#xA;    Stream #0:0[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s&#xA;    Stream #0:1[0x1e2]: Video: h264 (High), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc&#xA;

    &#xA;

    ffmpeg -hide_banner -i myfile.trimmed.mpg -map 0:v -map 0:a -c copy myfile.trimmed.flipped.mpg&#xA;[h264 @ 000001fa0ee94680] Increasing reorder buffer to 2&#xA;Input #0, mpeg, from &#x27;myfile.trimmed.mpg&#x27;:&#xA;  Duration: 00:02:41.09, start: 0.500000, bitrate: 6255 kb/s&#xA;    Stream #0:0[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s&#xA;    Stream #0:1[0x1e2]: Video: h264 (High), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc&#xA;[mpeg @ 000001fa0ee88dc0] VBV buffer size not set, using default size of 230KB&#xA;If you want the mpeg file to be compliant to some specification&#xA;Like DVD, VCD or others, make sure you set the correct buffer size&#xA;[mpeg @ 000001fa0ee88dc0] ac3 in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream.&#xA;Output #0, mpeg, to &#x27;myfile.trimmed.flipped.mpg&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.45.100&#xA;    Stream #0:0: Video: h264 (High), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc&#xA;    Stream #0:1: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s&#xA;Stream mapping:&#xA;  Stream #0:1 -> #0:0 (copy)&#xA;  Stream #0:0 -> #0:1 (copy)&#xA;Press [q] to stop, [?] for help&#xA;frame= 9570 fps=0.0 q=-1.0 Lsize=  123008kB time=00:02:40.95 bitrate=6260.6kbits/s speed= 518x&#xA;video:114772kB audio:7545kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.565047%&#xA;

    &#xA;

    ffprobe -hide_banner myfile.trimmed.flipped.mpg&#xA;[h264 @ 0000021edcf36ac0] Increasing reorder buffer to 2&#xA;Input #0, mpeg, from &#x27;myfile.trimmed.flipped.mpg&#x27;:&#xA;  Duration: 00:02:41.09, start: 0.500000, bitrate: 6255 kb/s&#xA;    Stream #0:0[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s&#xA;    Stream #0:1[0x1e2]: Video: h264 (High), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc&#xA;

    &#xA;

    What, what ?!&#xA;The command output looks like it did exactly what I asked, but the resulting file has the same stream ordering as the original file. What am I missing ?
    &#xA;One possible clue : It looks like the audio stream starts before the video stream. The smallest pkt_pts_time I see in the audio stream is 00:00:00.500000, while the smallest I see in the video stream is 0:00:01.912967. Could that matter ?

    &#xA;