Recherche avancée

Médias (0)

Mot : - Tags -/diogene

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

Autres articles (48)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike 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 (6223)

  • Adjust Opus Ogg page size using Go

    15 mars 2024, par matthew

    Using the code from Go's Pion WebRTC library play-from-disk example I'm able to create a WebRTC connection and send audio from a local Ogg file to peers.

    


    The play-from-disk example README.md details how to first convert the page size of the Ogg file to 20,000 using ffmpeg, like so :

    


    ffmpeg -i $INPUT_FILE -c:a libopus -page_duration 20000 -vn output.ogg


    


    I'd like to make this same adjustment to Ogg data natively in Go, without using ffmpeg. How can this be done ?

    


    I've tried using Pion's oggreader and oggwriter, but using these requires deep Opus file format and RTP protocol knowledge that neither I nor ChatGPT seem to have.

    


    For additional context, I'm using a Text-to-Speech (TTS) API to generate my Ogg data as follows :

    


    req, err := http.NewRequest("POST", "https://api.openai.com/v1/audio/speech", bytes.NewBuffer([]byte(fmt.Sprintf(`{
    "model": "tts-1",
    "voice": "alloy",
    "input": %q,
    "response_format": "opus",
}`, text))))

req.Header.Add("Authorization", "Bearer "+token)
req.Header.Add("Content-Type", "application/json; charset=UTF-8")

client := &http.Client{}
resp, err := client.Do(req)



    


    As I'm trying to create a real-time audio app, ideally, I'd like to pipe the response to WebRTC performing the conversion on chunks as these are received so that peers can start to listen to the audio before it has been fully received on the server.

    


  • Revision b72373de79 : make : flatten object file directories Rather than building an object file direc

    31 octobre 2012, par John Koleszar

    Changed Paths : Modify /build/make/Makefile Modify /examples.mk Modify /libs.mk Modify /test/test.mk Modify /vp8/vp8cx.mk Modify /vp9/vp9_common.mk make : flatten object file directories Rather than building an object file directory heirarchy matching the source tree's layout, rename (...)

  • FFProbe as .NET Process gives error while command line does not

    13 février 2024, par Ron O

    I've got a sample mp4 (a copy can be found here [sample_tagged.mp4, 562KB]) I've tagged with metadata using FFMpeg. Using a command line, if I issue a general command to view the metadata, I get everything.

    


    > ffprobe.exe -hide_banner -loglevel error -show_entries 'format_tags' sample_tagged.mp4
[FORMAT]
TAG:minor_version=512
TAG:major_brand=isom
TAG:compatible_brands=isomiso2avc1mp41
TAG:IMDB=tt0012345
TAG:Title=Sample MP4
TAG:synopsis=Watch MP4 sample
TAG:Rating=3.30
TAG:TMDB=tv/12345
TAG:Subtitle=Samples for all!
TAG:year=2000
TAG:date=2000:01:01T00:00:00
TAG:ReleaseDate=2000:01:01
TAG:genre=Beach;Windy;Sample
TAG:encoder=Lavf60.3.100
[/FORMAT]


    


    Also using the command line, if I limit it to a specific tag, I only get the specific tag as expected.

    


    > ffprobe.exe -hide_banner -loglevel error -show_entries 'format_tags=TMDB' sample_tagged.mp4
[FORMAT]
TAG:TMDB=tv/12345
[/FORMAT]


    


    I've set up a C# Process (in LINQPad) to mimic this behavior and return the results as a collection of key/value pairs.

    


    async Task Main()
{
  var sample = await FFProbe.GetProperties("sample_tagged.mp4");
  sample.Dump("Sample");

  var targeted = await FFProbe.GetProperties("sample_tagged.mp4", "TMDB");
  targeted.Dump("Sample Targeted");
}

class FFProbe
{
  const string _exeName = @"ffprobe.exe";
  const string _arguments = @"-hide_banner -loglevel error -show_entries 'format_tags{0}' ""{1}""";

  static Encoding _Utf8NoBOM = new UTF8Encoding(false);

  public static async Task>> GetProperties(string filename, params string[] targetProperties)
  {
    using (var probe = new Process())
    {
      var propsRead = new List>();

      probe.EnableRaisingEvents = true;
      probe.OutputDataReceived += (object sender, DataReceivedEventArgs e) =>
      {
        e.Dump("Output");
        if (e?.Data is null)
          return;
        
        if (e.Data.StartsWith("TAG"))
        {
          var eq = e.Data.IndexOf('=');

          if (eq > 1)
          {
            var key = e.Data.Substring(4, eq - 4);
            var value = e.Data.Substring(eq + 1).Trim();

            if (!targetProperties.Any() || targetProperties.Any(tp => key.Equals(tp, StringComparison.InvariantCultureIgnoreCase)))
            {
              if (value.Contains("\\r\\n"))
                value = value.Replace("\\r\\n", Environment.NewLine);

              propsRead.Add(new KeyValuePair(key, value));
            }
          }
        }
      };
      probe.ErrorDataReceived += (object sender, DataReceivedEventArgs e) =>
      {
        e.Dump("Error");
        if (e?.Data is null)
          return;
      };

      probe.StartInfo.FileName = _exeName;
      
      var tagLimiter = string.Empty;
      
      if (targetProperties.Any())
        tagLimiter = $"={string.Join(',', targetProperties)}";
      
      var arguments = string.Format(_arguments, tagLimiter, filename);
      arguments.Dump();

      probe.StartInfo.Arguments = arguments;
      probe.StartInfo.UseShellExecute = false;
      probe.StartInfo.CreateNoWindow = true;
      probe.StartInfo.RedirectStandardOutput = true;
      probe.StartInfo.RedirectStandardError = true;
      probe.StartInfo.StandardOutputEncoding = _Utf8NoBOM;
      probe.StartInfo.StandardErrorEncoding = _Utf8NoBOM;

      probe.Start();
      probe.BeginOutputReadLine();
      probe.BeginErrorReadLine();
      
      await probe.WaitForExitAsync();

      return propsRead;
    }
  }
}


    


    The output for the full sample dump matches the full metadata list. But when getting the targeted tag, I get two error responses.

    


    No match for section 'format_tags=TMDB'
Failed to set value ''format_tags=TMDB'' for option 'show_entries': Invalid argument


    


    From the output, the arguments sent into the process match those of the command line above :

    


    -hide_banner -loglevel error -show_entries 'format_tags=TMDB' "sample_tagged.mp4"


    


    I've copy/pasted the generated arguments to the command line call and it returns the value expected.

    


    What am I missing and/or need correction in setting up the call to get the same results via a Process as the command line ?