Recherche avancée

Médias (1)

Mot : - Tags -/bug

Autres articles (64)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (10839)

  • ffmpeg - problem in copying the stream with timed metadata during a split command

    15 novembre 2020, par Swarna Ananthan

    I am facing a problem while copying mp4 along with the data stream in a split command.

    


    ffmpeg -i 'testinput.mp4' -map 0 -copy_unknown -ss 12.800000 -t 14.549 -c copy testoutput.mp4


    


    I am getting the below error.

    


    Duration: 00:04:45.25, start: 0.000000, bitrate: 120 kb/s
    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 116 kb/s (default)
    Metadata:
      creation_time   : 2020-05-26T20:58:03.000000Z
      handler_name    : WowzaStreamingEngine
    Stream #0:1(eng): Data: none (amf0 / 0x30666D61), 1 kb/s (default)
    Metadata:
      creation_time   : 2020-05-26T20:58:03.000000Z
      handler_name    : WowzaStreamingEngine

File 'testoutput.mp4' already exists. Overwrite? [y/N] y

[mp4 @ 0x7fe8b0808800] Could not find tag for codec none in stream #1, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
  
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Last message repeated 1 time


    


    Stream#1 is datastream in my case.

    


  • xabe.ffmpeg not working in azure app service

    28 décembre 2020, par Sripathi Raja

    I have a .net core application which generates video thumbnails for uploaded videos. I am using xabe.ffmpeg for this . The code runs fine in the local system and Iam able to generate the thumbnails . I have containerized this application and pushed it to azure app service . But when the code is deployed on azure app service its throws an error . I have placed the ffmpeg.exe ,ffprobe.exe , ffplay.exe inside a folder ffmpeg in wwwroot folder .
the app service logs give this error

    


    the first line is the path : /app/wwwroot/ffmpeg

    


    2020-12-25T14:34:01.347103909Z /app/wwwroot/ffmpeg&#xA;2020-12-25T14:34:01.443016709Z [41m[30mfail[39m[22m[49m : Microsoft.AspNetCore.Server.Kestrel[13]&#xA;2020-12-25T14:34:01.443066009Z Connection id "0HM58S8AE014U", Request id "0HM58S8AE014U:00000002" : An unhandled exception was thrown by the application.&#xA;2020-12-25T14:34:01.456821709Z System.ComponentModel.Win32Exception (2) : No such file or directory&#xA;2020-12-25T14:34:01.462537109Z at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)&#xA;2020-12-25T14:34:01.462555709Z at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)&#xA;2020-12-25T14:34:01.462560609Z at System.Diagnostics.Process.Start()&#xA;2020-12-25T14:34:01.463739309Z at Xabe.FFmpeg.FFmpeg.RunProcess(String args, String processPath, Nullable1 priority, Boolean standardInput, Boolean standardOutput, Boolean standardError) 2020-12-25T14:34:01.463755809Z    at Xabe.FFmpeg.FFprobeWrapper.&lt;>c__DisplayClass9_0.<runprocess>b__0() 2020-12-25T14:34:01.463761809Z    at System.Threading.Tasks.Task</runprocess>1.InnerInvoke()&#xA;2020-12-25T14:34:01.463766309Z at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)&#xA;2020-12-25T14:34:01.463781109Z at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)&#xA;2020-12-25T14:34:01.463786509Z --- End of stack trace from previous location where exception was thrown ---&#xA;2020-12-25T14:34:01.463790909Z at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)&#xA;2020-12-25T14:34:01.463795509Z at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)&#xA;2020-12-25T14:34:01.463800009Z --- End of stack trace from previous location where exception was thrown ---&#xA;2020-12-25T14:34:01.463813709Z at Xabe.FFmpeg.FFprobeWrapper.RunProcess(String args, CancellationToken cancellationToken)&#xA;2020-12-25T14:34:01.463818109Z at Xabe.FFmpeg.FFprobeWrapper.GetStreams(String videoPath, CancellationToken cancellationToken)&#xA;2020-12-25T14:34:01.463821909Z at Xabe.FFmpeg.FFprobeWrapper.SetProperties(MediaInfo mediaInfo, CancellationToken cancellationToken)&#xA;2020-12-25T14:34:01.463825509Z at Xabe.FFmpeg.MediaInfo.Get(String filePath, CancellationToken cancellationToken)&#xA;2020-12-25T14:34:01.463829109Z at Xabe.FFmpeg.MediaInfo.Get(String filePath)&#xA;2020-12-25T14:34:01.463832609Z at Xabe.FFmpeg.FFmpeg.GetMediaInfo(String fileName)&#xA;2020-12-25T14:34:01.467009509Z at root2webAPI.Controllers.AzureStorageControllers.BlobExplorerController.GetVideoThumbnailAsync(IFormFile file, Int32 frameTarget) in /src/root2webAPI/Controllers/AzureStorageControllers/BlobExplorerController.cs:line 271&#xA;2020-12-25T14:34:01.467023809Z at root2webAPI.Controllers.AzureStorageControllers.BlobExplorerController.UploadMediaBlob(IFormFile file, String parentId) in /src/root2webAPI/Controllers/AzureStorageControllers/BlobExplorerController.cs:line 96&#xA;2020-12-25T14:34:01.467028709Z at lambda_method(Closure , Object )&#xA;2020-12-25T14:34:01.467032109Z at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()&#xA;2020-12-25T14:34:01.467035909Z at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)&#xA;2020-12-25T14:34:01.467039409Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)&#xA;2020-12-25T14:34:01.467043209Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)&#xA;2020-12-25T14:34:01.467055709Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)&#xA;2020-12-25T14:34:01.467060609Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)&#xA;2020-12-25T14:34:01.467067409Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)&#xA;2020-12-25T14:34:01.467071609Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)&#xA;2020-12-25T14:34:01.467075209Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)&#xA;2020-12-25T14:34:01.467078709Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)&#xA;2020-12-25T14:34:01.467089009Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)&#xA;2020-12-25T14:34:01.467093409Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)&#xA;2020-12-25T14:34:01.467096909Z at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)&#xA;2020-12-25T14:34:01.467100509Z at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)&#xA;2020-12-25T14:34:01.467103809Z at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext]

    &#xA;

    here is my relevant .net application code

    &#xA;

      private async Task<mediametadata> GetVideoThumbnailAsync(IFormFile file,int frameTarget)&#xA;    {&#xA;     var fileName = file.FileName;&#xA;     var filePath = Path.Combine(_rootPath, "videos", fileName);&#xA;     var fileExtension = Path.GetExtension(filePath);&#xA;     &#xA;     // the xabe wrapper works with only mp4 extension to create thumbnail , if the file is any other format first convert it to&#xA;     //the mp4 format and then goahead with creating the thumbnail.  &#xA;     var thumbnailImageName = fileName.Replace(fileExtension, ".jpg");&#xA;     var thumbnailImagePath = Path.Combine(_rootPath, "thumbnails", thumbnailImageName);&#xA;     &#xA;            using (Stream fileStream = new FileStream(filePath, FileMode.Create)) {&#xA;                &#xA;             await file.CopyToAsync(fileStream);&#xA;            }&#xA;    Console.WriteLine(Path.Combine(_rootPath,"ffmpeg"));&#xA;    FFmpeg.SetExecutablesPath(Path.Combine(_rootPath,"ffmpeg"));&#xA;    IMediaInfo mediaInfo = await FFmpeg.GetMediaInfo(filePath);&#xA;    var videoDuration = mediaInfo.VideoStreams.First().Duration;&#xA;    IConversion conversion = await FFmpeg.Conversions.FromSnippet.Snapshot(filePath, thumbnailImagePath , TimeSpan.FromSeconds(frameTarget));&#xA;    IConversionResult result = await conversion.Start();&#xA;    MediaMetadata media = new MediaMetadata();&#xA;    media.DurationSeconds=Convert.ToInt32(videoDuration.TotalMilliseconds);&#xA;    // media.DurationSeconds=10;&#xA;    media.ThumbnailImagePath= thumbnailImagePath;&#xA;    return media;&#xA;    &#xA;    }&#xA;</mediametadata>

    &#xA;

    could you help me out with this ..many thanks

    &#xA;

  • ffmpeg exit code 429496724 when opening file with {} in name

    16 février, par Holly Wilson

    I'm trying to write a program that will read the names of files in a directory, and parse them for info which it will then write into that file's metadata (seems pointless, I know, but it's more of a trial run for a larger project. If I can figure this out, then I'll be ready to move on to what I actually want to do).&#xA;All of my filenames are formatted :

    &#xA;

    Title, Article* - Subtitle* Cut* [Year]&#xA;*if present

    &#xA;

    The four test videos I'm using are titled :

    &#xA;

    Test Video 1 [2000]

    &#xA;

    Test Video 2, A [2000]

    &#xA;

    Test Video 3 Test Cut [2000]

    &#xA;

    Test Video 4 - The Testening [2000]

    &#xA;

    The code seems to be working fine on videos 1, 2, & 4 ; but video 3 is causing me a lot of headache.

    &#xA;

    //node C:\Users\User\Documents\Coding\Tools\testMDG.js&#xA;const fs = require(&#x27;fs&#x27;);&#xA;const path = require(&#x27;path&#x27;);&#xA;const ffmpeg = require(&#x27;fluent-ffmpeg&#x27;);&#xA;const async = require(&#x27;async&#x27;);&#xA;const directory = path.normalize(&#x27;F:\\Movies &amp; TV\\Movies\\testDir&#x27;);&#xA;let x = 0;&#xA;const fileArray = [];&#xA;const succArray = [];&#xA;const failArray = [];&#xA;// Set the path to the ffmpeg executable&#xA;ffmpeg.setFfmpegPath(path.normalize(&#x27;C:\\ffmpeg\\bin\\ffmpeg.exe&#x27;));&#xA;&#xA;// Add this near the start of your script&#xA;const tempDir = path.join(directory, &#x27;temp&#x27;);&#xA;if (!fs.existsSync(tempDir)) {&#xA;    fs.mkdirSync(tempDir, { recursive: true });&#xA;}&#xA;&#xA;const progresscsv = path.normalize(&#x27;C:\\Users\\User\\Documents\\Coding\\Tools\\progress.csv&#x27;);&#xA;if (fs.existsSync(progresscsv)) {&#xA;    fs.unlinkSync(progresscsv);&#xA;};&#xA;&#xA;const csvStream = fs.createWriteStream(progresscsv);&#xA;csvStream.write(&#x27;File Name,Status\n&#x27;);&#xA;&#xA;const CONCURRENCY_LIMIT = 3; // Adjust based on your system capabilities&#xA;&#xA;// Add at the start of your script&#xA;const processedFiles = new Set();&#xA;&#xA;function sanitizeFilePath(filePath) {&#xA;    return filePath.replace(/([{}])/g, &#x27;\\$1&#x27;);&#xA;}&#xA;&#xA;// Create a queue&#xA;const queue = async.queue(async (task, callback) => {&#xA;    const { file, filePath, tempFilePath, movieMetadata } = task;&#xA;    try {&#xA;        await new Promise((resolve, reject) => {&#xA;            console.log(`ffmpeg reading: ${sanitizeFilePath(filePath)}`);&#xA;            ffmpeg(sanitizeFilePath(filePath))&#xA;                .outputOptions([&#xA;                    &#x27;-y&#x27;,&#xA;                    &#x27;-c&#x27;, &#x27;copy&#x27;,&#xA;                    &#x27;-map&#x27;, &#x27;0&#x27;,&#xA;                    &#x27;-metadata&#x27;, `title=${movieMetadata.title}`,&#xA;                    &#x27;-metadata&#x27;, `subtitle=${movieMetadata.subtitle || &#x27;&#x27;}`,&#xA;                    &#x27;-metadata&#x27;, `comment=${movieMetadata.cut || &#x27;&#x27;}`,&#xA;                    &#x27;-metadata&#x27;, `year=${movieMetadata.year}`&#xA;                ])&#xA;                .on(&#x27;error&#x27;, (err) => reject(err))&#xA;                .on(&#x27;end&#x27;, () => resolve())&#xA;                .saveToFile(tempFilePath);&#xA;        });&#xA;        &#xA;        // Handle success&#xA;        console.log(`Successfully processed: ${file}`);&#xA;        succArray.push(file);&#xA;        // Only call callback once&#xA;        if (callback &amp;&amp; typeof callback === &#x27;function&#x27;) {&#xA;            callback();&#xA;        }&#xA;    } catch (err) {&#xA;        // Handle error&#xA;        console.error(`Error processing ${file}: ${err.message}`);&#xA;        failArray.push(file);&#xA;        // Only call callback once with error&#xA;        if (callback &amp;&amp; typeof callback === &#x27;function&#x27;) {&#xA;            callback(err);&#xA;        }&#xA;    }&#xA;}, CONCURRENCY_LIMIT);&#xA;&#xA;fs.readdir(directory, (err, files) => {&#xA;    if (err) {&#xA;        console.error(`Error reading directory: ${err.message}`);&#xA;        return;&#xA;    }&#xA;    console.log(directory);&#xA;&#xA;    // Filter for files only&#xA;    files = files.filter(file => fs.statSync(path.join(directory, file)).isFile());&#xA;    console.log(files);&#xA;&#xA;    for (const file of files) {&#xA;        x&#x2B;&#x2B;;&#xA;        const filePath = path.join(directory, file);&#xA;        let desort = file.replace(/(.*),\s(the\s|an\s|a\s)/i, &#x27;$2&#x27;&#x2B;&#x27;$1 &#x27;) || file;&#xA;        &#xA;        // Create task object for queue&#xA;        const task = {&#xA;            file,&#xA;            filePath: filePath,&#xA;            tempFilePath: path.join(directory, &#x27;temp&#x27;, `temp_${x}_${path.parse(file).name&#xA;                .replace(/[^a-zA-Z0-9]/g, &#x27;_&#x27;)}${path.extname(file)}`),&#xA;            movieMetadata: {&#xA;                title: desort.replace(/(\s[\-\{\[].*)/gi, ``),&#xA;                subtitle: desort.includes(&#x27;-&#x27;) ? desort.replace(/(.*)\-\s(.*?)[\{\[].*/gi, &#x27;$2&#x27;) : null,&#xA;                cut: desort.includes(&#x27;{&#x27;) ? desort.replace(/.*\{(.*)\}.*/gi, &#x27;$1&#x27;) : null,&#xA;                year: desort.replace(/.*\[(.*)\].*/gi, &#x27;$1&#x27;)&#xA;            }&#xA;        };&#xA;        &#xA;        // Add to processing queue&#xA;        queue.push(task, (err) => {&#xA;            if (!processedFiles.has(task.file)) {&#xA;                processedFiles.add(task.file);&#xA;                if (err) {&#xA;                    csvStream.write(`${task.file},Failed\n`);&#xA;                } else {&#xA;                    csvStream.write(`${task.file},Processed\n`);&#xA;                }&#xA;            }&#xA;        });&#xA;    }&#xA;});&#xA;&#xA;// Add queue completion handler&#xA;queue.drain(() => {&#xA;    console.log(&#x27;All files have been processed&#x27;);&#xA;    console.log(`Success: ${succArray.length} files: ${succArray}`);&#xA;    console.log(`Failed: ${failArray.length} files: ${failArray}`);&#xA;});&#xA;&#xA;//node C:\Users\User\Documents\Coding\Tools\testMDG.js&#xA;

    &#xA;

    And the console is logging :

    &#xA;

    PS C:\Users\User> node C:\Users\User\Documents\Coding\Tools\testMDG.js&#xA;F:\Movies &amp; TV\Movies\testDir&#xA;[&#xA;  &#x27;Test Video 1 [2020].mp4&#x27;,&#xA;  &#x27;Test Video 2, A [2020].mp4&#x27;,&#xA;  &#x27;Test Video 3 {Test Cut} [2020].mp4&#x27;,&#xA;  &#x27;Test Video 4 - The Testening [2020].mp4&#x27;&#xA;]&#xA;ffmpeg reading: F:\Movies &amp; TV\Movies\testDir\Test Video 1 [2020].mp4&#xA;ffmpeg reading: F:\Movies &amp; TV\Movies\testDir\Test Video 2, A [2020].mp4&#xA;ffmpeg reading: F:\Movies &amp; TV\Movies\testDir\Test Video 3 \{Test Cut\} [2020].mp4&#xA;Error processing Test Video 3 {Test Cut} [2020].mp4: ffmpeg exited with code 4294967294: Error opening input file F:\Movies &amp; TV\Movies\testDir\Test Video 3 \{Test Cut\} [2020].mp4.&#xA;Error opening input files: No such file or directory&#xA;&#xA;ffmpeg reading: F:\Movies &amp; TV\Movies\testDir\Test Video 4 - The Testening [2020].mp4&#xA;Successfully processed: Test Video 1 [2020].mp4&#xA;Successfully processed: Test Video 2, A [2020].mp4&#xA;Successfully processed: Test Video 4 - The Testening [2020].mp4&#xA;All files have been processed&#xA;Success: 3 files: Test Video 1 [2020].mp4,Test Video 2, A [2020].mp4,Test Video 4 - The Testening [2020].mp4&#xA;Failed: 1 files: Test Video 3 {Test Cut} [2020].mp4&#xA;

    &#xA;

    I've tried so many different solutions in the sanitizeFilePath function. Escaping the {} characters (as included below), escaping all non-alphanumeric characters, putting the filepath in quotes, etc. VSCode's CoPilot is just pulling me round in circles, suggesting solutions I've already tried.

    &#xA;