Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (39)

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

  • (Dés)Activation de fonctionnalités (plugins)

    18 février 2011, par

    Pour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
    SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
    Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
    MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)

  • Le plugin : Podcasts.

    14 juillet 2010, par

    Le problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
    Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
    Types de fichiers supportés dans les flux
    Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)

Sur d’autres sites (6039)

  • ffmpeg - How to increase performance ?

    7 mai 2017, par Thanh Dao

    I’m trying to speed up and add background to mp4 videos. It taken a lots of time.

    ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.91*PTS[i]; [0:a]atempo=1.1000[p]" -map "[i]" -map "[p]" output-1.mp4 2>&1

    Above command take about 30 minutes to do. The size of input file about 30-40MB, is not too large.
    And next, I run below command to add background to video, take about 30 mins (Background’s resolution is 1280x720)

    ffmpeg -i output-1.mp4 -i background.png -filter_complex "overlay=0:0" output.mp4 2>&1

    It make my system very slow, and performance is very bad.
    What can I do to improve ?

  • Anomalie #3018 (Résolu) : Gestion des plugins inutilisable avec PostgreSQL

    28 juin 2013, par Clo Castello

    Installation toute propre SPIP 3.0.10 (20600) avec PostGreSQL 8.4.
    Page : ecrire/ ?exec=admin_plugin
    Erreur SQL rencontrée :

    Erreur SQL 1000
    errcode : 1000 : invalid input syntax for integer : "" at character 191
    SELECT pa.id_paquet, pl.prefixe, pa.version, pa.etatnum, pa.obsolete FROM spip_paquets AS pa, spip_plugins AS pl WHERE pa.id_plugin = pl.id_plugin AND id_depot=’0’ AND ((pl.id_plugin IN (’’))) GROUP BY pa.id_paquet,pl.prefixe,pa.version,pa.etatnum,pa.obsolete
    


    Effectivement spip_paquets (id_plugin) est un bigint

    Affichage de la page :

    Warning : array_keys() expects parameter 1 to be array, null given in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 871 Warning : join() : Invalid arguments passed in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 871 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : strpos() : Empty delimiter in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 1033 Warning : pg_query() : Query failed : ERROR : syntax error at or near "," at character 356 in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 168 Warning : pg_query() : Query failed : ERROR : invalid input syntax for integer : "" at character 191 in /home/sites/positel-map.com/website/ecrire/req/pg.php on line 168 
    
  • Cutting a live stream into separate mp4 files

    9 juin 2017, par Fearhunter

    I am doing a research for cutting a live stream in piece and save it as mp4 files. I am using this source for the proof of concept :

    https://docs.microsoft.com/en-us/azure/media-services/media-services-dotnet-creating-live-encoder-enabled-channel#download-sample

    And this is the example code I use :

    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Security.Cryptography;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.WindowsAzure.MediaServices.Client;
    using Newtonsoft.Json.Linq;

    namespace AMSLiveTest
    {
       class Program
       {
           private const string StreamingEndpointName = "streamingendpoint001";
           private const string ChannelName = "channel001";
           private const string AssetlName = "asset001";
           private const string ProgramlName = "program001";

           // Read values from the App.config file.
           private static readonly string _mediaServicesAccountName =
           ConfigurationManager.AppSettings["MediaServicesAccountName"];
           private static readonly string _mediaServicesAccountKey =
           ConfigurationManager.AppSettings["MediaServicesAccountKey"];

           // Field for service context.
           private static CloudMediaContext _context = null;
           private static MediaServicesCredentials _cachedCredentials = null;

           static void Main(string[] args)
           {
               // Create and cache the Media Services credentials in a static class variable.
               _cachedCredentials = new MediaServicesCredentials(
               _mediaServicesAccountName,
               _mediaServicesAccountKey);
               // Used the cached credentials to create CloudMediaContext.
               _context = new CloudMediaContext(_cachedCredentials);

               IChannel channel = CreateAndStartChannel();

               // Set the Live Encoder to point to the channel's input endpoint:
               string ingestUrl = channel.Input.Endpoints.FirstOrDefault().Url.ToString();

               // Use the previewEndpoint to preview and verify
               // that the input from the encoder is actually reaching the Channel.
               string previewEndpoint = channel.Preview.Endpoints.FirstOrDefault().Url.ToString();

               IProgram program = CreateAndStartProgram(channel);
               ILocator locator = CreateLocatorForAsset(program.Asset, program.ArchiveWindowLength);
               IStreamingEndpoint streamingEndpoint = CreateAndStartStreamingEndpoint();
               GetLocatorsInAllStreamingEndpoints(program.Asset);

               // Once you are done streaming, clean up your resources.
               Cleanup(streamingEndpoint, channel);
           }

           public static IChannel CreateAndStartChannel()
           {
               //If you want to change the Smooth fragments to HLS segment ratio, you would set the ChannelCreationOptions’s Output property.

               IChannel channel = _context.Channels.Create(
               new ChannelCreationOptions
               {
               Name = ChannelName,
               Input = CreateChannelInput(),
               Preview = CreateChannelPreview()
               });

               //Starting and stopping Channels can take some time to execute. To determine the state of operations after calling Start or Stop, query the IChannel.State .

               channel.Start();

               return channel;
           }

           private static ChannelInput CreateChannelInput()
           {
               return new ChannelInput
               {
                   StreamingProtocol = StreamingProtocol.RTMP,
                   AccessControl = new ChannelAccessControl
                   {
                       IPAllowList = new List<iprange>
                               {
                               new IPRange
                           {
                               Name = "TestChannelInput001",
                               // Setting 0.0.0.0 for Address and 0 for SubnetPrefixLength
                               // will allow access to IP addresses.
                               Address = IPAddress.Parse("0.0.0.0"),
                               SubnetPrefixLength = 0
                           }
                       }
                   }
               };
           }

           private static ChannelPreview CreateChannelPreview()
           {
               return new ChannelPreview
               {
                   AccessControl = new ChannelAccessControl
                   {
                       IPAllowList = new List<iprange>
                       {
                           new IPRange
                           {
                               Name = "TestChannelPreview001",
                               // Setting 0.0.0.0 for Address and 0 for SubnetPrefixLength
                               // will allow access to IP addresses.
                               Address = IPAddress.Parse("0.0.0.0"),
                               SubnetPrefixLength = 0
                           }
                       }
                   }
               };
           }

           public static void UpdateCrossSiteAccessPoliciesForChannel(IChannel channel)
           {
               var clientPolicy =
                   @"&lt;?xml version=""1.0"" encoding=""utf-8""?>
               
                   
                       <policy>
                           
                               <domain uri=""></domain>
                           
                           
                              <resource path=""></resource>"" include-subpaths=""true""/>
                           
                       </policy>
                   
               ";

               var xdomainPolicy =
                   @"&lt;?xml version=""1.0"" ?>
               
                   
               ";

               channel.CrossSiteAccessPolicies.ClientAccessPolicy = clientPolicy;
               channel.CrossSiteAccessPolicies.CrossDomainPolicy = xdomainPolicy;

               channel.Update();
           }

           public static IProgram CreateAndStartProgram(IChannel channel)
           {
               IAsset asset = _context.Assets.Create(AssetlName, AssetCreationOptions.None);

               // Create a Program on the Channel. You can have multiple Programs that overlap or are sequential;
               // however each Program must have a unique name within your Media Services account.
               IProgram program = channel.Programs.Create(ProgramlName, TimeSpan.FromHours(3), asset.Id);
               program.Start();

               return program;
           }

           public static ILocator CreateLocatorForAsset(IAsset asset, TimeSpan ArchiveWindowLength)
           {
               // You cannot create a streaming locator using an AccessPolicy that includes write or delete permissions.            

               var locator = _context.Locators.CreateLocator
                   (
                       LocatorType.OnDemandOrigin,
                       asset,
                       _context.AccessPolicies.Create
                       (
                           "Live Stream Policy",
                           ArchiveWindowLength,
                           AccessPermissions.Read
                       )
                   );

               return locator;
           }

           public static IStreamingEndpoint CreateAndStartStreamingEndpoint()
           {
               var options = new StreamingEndpointCreationOptions
               {
                   Name = StreamingEndpointName,
                   ScaleUnits = 1,
                   AccessControl = GetAccessControl(),
                   CacheControl = GetCacheControl()
               };

               IStreamingEndpoint streamingEndpoint = _context.StreamingEndpoints.Create(options);
               streamingEndpoint.Start();

               return streamingEndpoint;
           }

           private static StreamingEndpointAccessControl GetAccessControl()
           {
               return new StreamingEndpointAccessControl
               {
                   IPAllowList = new List<iprange>
                   {
                       new IPRange
                       {
                           Name = "Allow all",
                           Address = IPAddress.Parse("0.0.0.0"),
                           SubnetPrefixLength = 0
                       }
                   },

                   AkamaiSignatureHeaderAuthenticationKeyList = new List<akamaisignatureheaderauthenticationkey>
                   {
                       new AkamaiSignatureHeaderAuthenticationKey
                       {
                           Identifier = "My key",
                           Expiration = DateTime.UtcNow + TimeSpan.FromDays(365),
                           Base64Key = Convert.ToBase64String(GenerateRandomBytes(16))
                       }
                   }
               };
           }

           private static byte[] GenerateRandomBytes(int length)
           {
               var bytes = new byte[length];
               using (var rng = new RNGCryptoServiceProvider())
               {
                   rng.GetBytes(bytes);
               }

               return bytes;
           }

           private static StreamingEndpointCacheControl GetCacheControl()
           {
               return new StreamingEndpointCacheControl
               {
                   MaxAge = TimeSpan.FromSeconds(1000)
               };
           }

           public static void UpdateCrossSiteAccessPoliciesForStreamingEndpoint(IStreamingEndpoint streamingEndpoint)
           {
               var clientPolicy =
                   @"&lt;?xml version=""1.0"" encoding=""utf-8""?>
               
                   
                       <policy>
                           
                               <domain uri=""></domain>
                           
                           
                              <resource path=""></resource>"" include-subpaths=""true""/>
                           
                       </policy>
                   
               ";

               var xdomainPolicy =
                   @"&lt;?xml version=""1.0"" ?>
               
                   
               ";

               streamingEndpoint.CrossSiteAccessPolicies.ClientAccessPolicy = clientPolicy;
               streamingEndpoint.CrossSiteAccessPolicies.CrossDomainPolicy = xdomainPolicy;

               streamingEndpoint.Update();
           }

           public static void GetLocatorsInAllStreamingEndpoints(IAsset asset)
           {
               var locators = asset.Locators.Where(l => l.Type == LocatorType.OnDemandOrigin);
               var ismFile = asset.AssetFiles.AsEnumerable().FirstOrDefault(a => a.Name.EndsWith(".ism"));
               var template = new UriTemplate("{contentAccessComponent}/{ismFileName}/manifest");
               var urls = locators.SelectMany(l =>
                           _context
                               .StreamingEndpoints
                               .AsEnumerable()
                               .Where(se => se.State == StreamingEndpointState.Running)
                               .Select(
                                   se =>
                                       template.BindByPosition(new Uri("http://" + se.HostName),
                                       l.ContentAccessComponent,
                                           ismFile.Name)))
                           .ToArray();

           }

           public static void Cleanup(IStreamingEndpoint streamingEndpoint,
                                       IChannel channel)
           {
               if (streamingEndpoint != null)
               {
                   streamingEndpoint.Stop();
                   streamingEndpoint.Delete();
               }

               IAsset asset;
               if (channel != null)
               {

                   foreach (var program in channel.Programs)
                   {
                       asset = _context.Assets.Where(se => se.Id == program.AssetId)
                                               .FirstOrDefault();

                       program.Stop();
                       program.Delete();

                       if (asset != null)
                       {
                           foreach (var l in asset.Locators)
                               l.Delete();

                           asset.Delete();
                       }
                   }

                   channel.Stop();
                   channel.Delete();
               }
           }
       }
    }
    </akamaisignatureheaderauthenticationkey></iprange></iprange></iprange>

    Now I want to make a method to cut a live stream for example every 15 minutes and save it as mp4 but don’t know where to start.

    Can someone point me in the right direction ?

    Kind regards

    UPDATE :

    I want to save the mp4 files on my hard disk.