
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (82)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (8437)
-
How do you use FFMPEG to transcode h264_qsv from Apple PRORES Quicktime ?
4 décembre 2022, par RCJetPilotI am trying to transcode an Apple Prores 444 to H.264 using qsv without success.


If I use this command line :


ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac -pix_fmt qsv chris.mp4


I get :


ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
 configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '10minute_Pipeline_Test.mov':
 Metadata:
 major_brand : qt 
 minor_version : 537134592
 compatible_brands: qt 
 creation_time : 2020-12-19T12:43:38.000000Z
 com.apple.quicktime.author: 
 com.apple.quicktime.comment: 
 com.apple.quicktime.copyright: 
 com.apple.quicktime.description: 
 com.apple.quicktime.director: 
 com.apple.quicktime.genre: 
 com.apple.quicktime.information: 
 com.apple.quicktime.keywords: 
 com.apple.quicktime.producer: 
 com.apple.quicktime.displayname: 
 timecode : 12:43:37;28
 Duration: 00:10:06.72, start: 0.000000, bitrate: 167429 kb/s
 Stream #0:0(eng): Data: none (tmcd / 0x64636D74)
 Metadata:
 creation_time : 1970-01-04T00:49:14.000000Z
 timecode : 12:43:37;28
 Stream #0:1(eng): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, GBR, progressive), 1280x720, 164985 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 60k tbn, 60k tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:04.000000Z
 Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Metadata:
 creation_time : 2003-10-05T11:26:56.000000Z
File 'chris.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
 Stream #0:1 -> #0:0 (prores (native) -> h264 (h264_qsv))
 Stream #0:2 -> #0:1 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_qsv @ 0x56265b81a800] Selected ratecontrol mode is unsupported
[h264_qsv @ 0x56265b81a800] Low power mode is unsupported
[h264_qsv @ 0x56265b81a800] Current frame rate is unsupported
[h264_qsv @ 0x56265b81a800] Current picture structure is unsupported
[h264_qsv @ 0x56265b81a800] Current resolution is unsupported
[h264_qsv @ 0x56265b81a800] Current pixel format is unsupported
[h264_qsv @ 0x56265b81a800] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
user@NUC:~$ ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac -pix_fmt qsv chris.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
 configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '10minute_Pipeline_Test.mov':
 Metadata:
 major_brand : qt 
 minor_version : 537134592
 compatible_brands: qt 
 creation_time : 2020-12-19T12:43:38.000000Z
 com.apple.quicktime.author: 
 com.apple.quicktime.comment: 
 com.apple.quicktime.copyright: 
 com.apple.quicktime.description: 
 com.apple.quicktime.director: 
 com.apple.quicktime.genre: 
 com.apple.quicktime.information: 
 com.apple.quicktime.keywords: 
 com.apple.quicktime.producer: 
 com.apple.quicktime.displayname: 
 timecode : 12:43:37;28
 Duration: 00:10:06.72, start: 0.000000, bitrate: 167429 kb/s
 Stream #0:0(eng): Data: none (tmcd / 0x64636D74)
 Metadata:
 creation_time : 1970-01-04T00:49:14.000000Z
 timecode : 12:43:37;28
 Stream #0:1(eng): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, GBR, progressive), 1280x720, 164985 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 60k tbn, 60k tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:04.000000Z
 Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Metadata:
 creation_time : 2003-10-05T11:26:56.000000Z
File 'chris.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
 Stream #0:1 -> #0:0 (prores (native) -> h264 (h264_qsv))
 Stream #0:2 -> #0:1 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:1
Conversion failed!



If I use :


ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac chris.mp4


I get :


ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
 configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '10minute_Pipeline_Test.mov':
 Metadata:
 major_brand : qt 
 minor_version : 537134592
 compatible_brands: qt 
 creation_time : 2020-12-19T12:43:38.000000Z
 com.apple.quicktime.author: 
 com.apple.quicktime.comment: 
 com.apple.quicktime.copyright: 
 com.apple.quicktime.description: 
 com.apple.quicktime.director: 
 com.apple.quicktime.genre: 
 com.apple.quicktime.information: 
 com.apple.quicktime.keywords: 
 com.apple.quicktime.producer: 
 com.apple.quicktime.displayname: 
 timecode : 12:43:37;28
 Duration: 00:10:06.72, start: 0.000000, bitrate: 167429 kb/s
 Stream #0:0(eng): Data: none (tmcd / 0x64636D74)
 Metadata:
 creation_time : 1970-01-04T00:49:14.000000Z
 timecode : 12:43:37;28
 Stream #0:1(eng): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, GBR, progressive), 1280x720, 164985 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 60k tbn, 60k tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:04.000000Z
 Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Metadata:
 creation_time : 2003-10-05T11:26:56.000000Z
File 'chris.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
 Stream #0:1 -> #0:0 (prores (native) -> h264 (h264_qsv))
 Stream #0:2 -> #0:1 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:1
Conversion failed!
user@NUC:~$ ffmpeg -i 10minute_Pipeline_Test.mov -c:v h264_qsv -c:a aac chris.mp4
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
 configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree --enable-libmfx
 libavutil 56. 31.100 / 56. 31.100
 libavcodec 58. 54.100 / 58. 54.100
 libavformat 58. 29.100 / 58. 29.100
 libavdevice 58. 8.100 / 58. 8.100
 libavfilter 7. 57.100 / 7. 57.100
 libswscale 5. 5.100 / 5. 5.100
 libswresample 3. 5.100 / 3. 5.100
 libpostproc 55. 5.100 / 55. 5.100
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '10minute_Pipeline_Test.mov':
 Metadata:
 major_brand : qt 
 minor_version : 537134592
 compatible_brands: qt 
 creation_time : 2020-12-19T12:43:38.000000Z
 com.apple.quicktime.author: 
 com.apple.quicktime.comment: 
 com.apple.quicktime.copyright: 
 com.apple.quicktime.description: 
 com.apple.quicktime.director: 
 com.apple.quicktime.genre: 
 com.apple.quicktime.information: 
 com.apple.quicktime.keywords: 
 com.apple.quicktime.producer: 
 com.apple.quicktime.displayname: 
 timecode : 12:43:37;28
 Duration: 00:10:06.72, start: 0.000000, bitrate: 167429 kb/s
 Stream #0:0(eng): Data: none (tmcd / 0x64636D74)
 Metadata:
 creation_time : 1970-01-04T00:49:14.000000Z
 timecode : 12:43:37;28
 Stream #0:1(eng): Video: prores (Standard) (apcn / 0x6E637061), yuv422p10le(tv, GBR, progressive), 1280x720, 164985 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 60k tbn, 60k tbc (default)
 Metadata:
 creation_time : 1970-01-01T00:00:04.000000Z
 Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32 (24 bit), 1152 kb/s (default)
 Metadata:
 creation_time : 2003-10-05T11:26:56.000000Z
File 'chris.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
 Stream #0:1 -> #0:0 (prores (native) -> h264 (h264_qsv))
 Stream #0:2 -> #0:1 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_qsv @ 0x55b3bb6e8800] Selected ratecontrol mode is unsupported
[h264_qsv @ 0x55b3bb6e8800] Low power mode is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current frame rate is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current picture structure is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current resolution is unsupported
[h264_qsv @ 0x55b3bb6e8800] Current pixel format is unsupported
[h264_qsv @ 0x55b3bb6e8800] some encoding parameters are not supported by the QSV runtime. Please double check the input parameters.
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!



I cannot get ANYTHING to work. I can transcode other h264 files without issue. I cannot seem to transcode this prores file.


Here is a link to the source file if anyone can help I would REALLY appreciate it...


https://www.dropbox.com/s/ejrfzad20yzaifm/10minute_Pipeline_Test.mov?dl=1


-
xabe.ffmpeg not working in azure app service
28 décembre 2020, par Sripathi RajaI 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
2020-12-25T14:34:01.443016709Z [41m[30mfail[39m[22m[49m : Microsoft.AspNetCore.Server.Kestrel[13]
2020-12-25T14:34:01.443066009Z Connection id "0HM58S8AE014U", Request id "0HM58S8AE014U:00000002" : An unhandled exception was thrown by the application.
2020-12-25T14:34:01.456821709Z System.ComponentModel.Win32Exception (2) : No such file or directory
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)
2020-12-25T14:34:01.462555709Z at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
2020-12-25T14:34:01.462560609Z at System.Diagnostics.Process.Start()
2020-12-25T14:34:01.463739309Z at Xabe.FFmpeg.FFmpeg.RunProcess(String args, String processPath, Nullable
1 priority, Boolean standardInput, Boolean standardOutput, Boolean standardError) 2020-12-25T14:34:01.463755809Z at Xabe.FFmpeg.FFprobeWrapper.<>c__DisplayClass9_0.<runprocess>b__0() 2020-12-25T14:34:01.463761809Z at System.Threading.Tasks.Task</runprocess>
1.InnerInvoke()
2020-12-25T14:34:01.463766309Z at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
2020-12-25T14:34:01.463781109Z at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2020-12-25T14:34:01.463786509Z --- End of stack trace from previous location where exception was thrown ---
2020-12-25T14:34:01.463790909Z at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2020-12-25T14:34:01.463795509Z at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
2020-12-25T14:34:01.463800009Z --- End of stack trace from previous location where exception was thrown ---
2020-12-25T14:34:01.463813709Z at Xabe.FFmpeg.FFprobeWrapper.RunProcess(String args, CancellationToken cancellationToken)
2020-12-25T14:34:01.463818109Z at Xabe.FFmpeg.FFprobeWrapper.GetStreams(String videoPath, CancellationToken cancellationToken)
2020-12-25T14:34:01.463821909Z at Xabe.FFmpeg.FFprobeWrapper.SetProperties(MediaInfo mediaInfo, CancellationToken cancellationToken)
2020-12-25T14:34:01.463825509Z at Xabe.FFmpeg.MediaInfo.Get(String filePath, CancellationToken cancellationToken)
2020-12-25T14:34:01.463829109Z at Xabe.FFmpeg.MediaInfo.Get(String filePath)
2020-12-25T14:34:01.463832609Z at Xabe.FFmpeg.FFmpeg.GetMediaInfo(String fileName)
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
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
2020-12-25T14:34:01.467028709Z at lambda_method(Closure , Object )
2020-12-25T14:34:01.467032109Z at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
2020-12-25T14:34:01.467035909Z at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
2020-12-25T14:34:01.467039409Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
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)
2020-12-25T14:34:01.467055709Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
2020-12-25T14:34:01.467060609Z at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
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)
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)
2020-12-25T14:34:01.467075209Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
2020-12-25T14:34:01.467078709Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
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)
2020-12-25T14:34:01.467093409Z at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
2020-12-25T14:34:01.467096909Z at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
2020-12-25T14:34:01.467100509Z at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
2020-12-25T14:34:01.467103809Z at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext]

here is my relevant .net application code


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


could you help me out with this ..many thanks


-
ffmpeg capture video and audio produced corrupt output
18 décembre 2020, par wheelie tipsI have two separate FFmpeg commands that each works well on its own, one for capturing video and the other for capturing audio from the same device ; the captured audio is :


ffmpeg -f alsa -thread_queue_size 16384 -i hw:CARD=C4K,DEV=0 -acodec aac /home/pi/Videos/temp.wav



and the captured video is :


ffmpeg -y -nostdin -f v4l2 -threads auto -input_format yuyv422 -fflags +genpts -flags +global_header -thread_queue_size 16384 -i /dev/video0 -s 1280x720 -r 25 -vcodec h264_v4l2m2m -num_output_buffers 32 -num_capture_buffers 16 -keyint_min 25 -force_key_frames "expr:gte(t,n_forced*1)" -g 50 -b:v 6M -pix_fmt nv12 -f mpegts -muxdelay 0 -muxpreload 0 -movflags +faststart /home/pi/Videos/output.mp4



I’ve tried to combine the two into one call to produce one video file with the audio channel, but whatever I’ve been attempting, the results output were messed up ; obviously, I’m missing something, for example, my latest attempt prodused a frozen image video with the audio channel :


ffmpeg -y -nostdin -f v4l2 -threads auto -input_format yuyv422 -fflags +genpts -flags +global_header -thread_queue_size 16384 -i /dev/video0 -f alsa -thread_queue_size 16384 -i hw:CARD=C4K,DEV=0 -acodec aac -s 1280x720 -r 25 -vcodec h264_v4l2m2m -num_output_buffers 32 -num_capture_buffers 16 -keyint_min 25 -force_key_frames "expr:gte(t,n_forced*1)" -g 50 -b:v 6M -b:a 128K -pix_fmt nv12 -f mpegts -muxdelay 0 -muxpreload 0 -movflags +faststart /home/pi/Videos/output.mp4 -loglevel debug



the full output of the above command :


ffmpeg version ca55240 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 configuration: --prefix=/home/pi/ffmpeg_build --pkg-config-flags='pkg-config --static' --extra-cflags=-I/home/pi/ffmpeg_build/include --extra-ldflags=-L/home/pi/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/pi/bin --enable-gpl --enable-gnutls --disable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --disable-libx265 --enable-nonfree --arch=aarch64 --disable-libxml2 --enable-libwebp --enable-libdrm
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-nostdin' ... matched as option 'stdin' (enable or disable interaction on standard input) with argument 0.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-threads' ... matched as AVOption 'threads' with argument 'auto'.
Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'yuyv422'.
Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts'.
Reading option '-flags' ... matched as AVOption 'flags' with argument '+global_header'.
Reading option '-thread_queue_size' ... matched as option 'thread_queue_size' (set the maximum number of queued packets from the demuxer) with argument '16384'.
Reading option '-i' ... matched as input url with argument '/dev/video0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-thread_queue_size' ... matched as option 'thread_queue_size' (set the maximum number of queued packets from the demuxer) with argument '16384'.
Reading option '-i' ... matched as input url with argument 'hw:CARD=C4K,DEV=0'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'aac'.
Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '1280x720'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with argument '25'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'h264_v4l2m2m'.
Reading option '-num_output_buffers' ... matched as AVOption 'num_output_buffers' with argument '32'.
Reading option '-num_capture_buffers' ... matched as AVOption 'num_capture_buffers' with argument '16'.
Reading option '-keyint_min' ... matched as AVOption 'keyint_min' with argument '25'.
Reading option '-force_key_frames' ... matched as option 'force_key_frames' (force key frames at specified timestamps) with argument 'expr:gte(t,n_forced*1)'.
Reading option '-g' ... matched as AVOption 'g' with argument '50'.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '6M'.
Reading option '-b:a' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '128K'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'nv12'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'.
Reading option '-muxdelay' ... matched as option 'muxdelay' (set the maximum demux-decode delay) with argument '0'.
Reading option '-muxpreload' ... matched as option 'muxpreload' (set the initial demux-decode delay) with argument '0'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument '+faststart'.
Reading option '/home/pi/Videos/output.mp4' ... matched as output url.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option nostdin (enable or disable interaction on standard input) with argument 0.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option thread_queue_size (set the maximum number of queued packets from the demuxer) with argument 16384.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x55a0c86b40] fd:3 capabilities:84a00001
[video4linux2,v4l2 @ 0x55a0c86b40] Current input_channel: 0, input_name: Input 1, input_std: 0
[video4linux2,v4l2 @ 0x55a0c86b40] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x55a0c86b40] Setting frame size to 1920x1080
[video4linux2,v4l2 @ 0x55a0c86b40] Dequeued v4l2 buffer contains corrupted data (0 bytes).
[video4linux2,v4l2 @ 0x55a0c86b40] All info found Input #0, video4linux2,v4l2, from '/dev/video0':
 Duration: N/A, start: 0.000000, bitrate: 1988671 kb/s
 Stream #0:0, 1, 1/1000000: Video: rawvideo, 1 reference frame (YUY2 / 0x32595559), yuyv422, 1920x1080, 0/1, 1988671 kb/s, 59.94 fps, 59.94 tbr, 1000k tbn, 1000k tbc Successfully opened the file.
Parsing a group of options: input url hw:CARD=C4K,DEV=0.
Applying option f (force format) with argument alsa.
Applying option thread_queue_size (set the maximum number of queued packets from the demuxer) with argument 16384.
Successfully parsed a group of options.
Opening an input file: hw:CARD=C4K,DEV=0.
[alsa @ 0x55a0c89630] All info found
Guessed Channel Layout for Input Stream #1.0 : stereo Input #1, alsa, from 'hw:CARD=C4K,DEV=0':
 Duration: N/A, start: 1608286705.387903, bitrate: 1536 kb/s
 Stream #1:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s Successfully opened the file.
Parsing a group of options: output url /home/pi/Videos/output.mp4.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument aac.
Applying option s (set frame size (WxH or abbreviation)) with argument 1280x720.
Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument h264_v4l2m2m.
Applying option force_key_frames (force key frames at specified timestamps) with argument expr:gte(t,n_forced*1).
Applying option b:v (video bitrate (please use -b:v)) with argument 6M.
Applying option b:a (video bitrate (please use -b:v)) with argument 128K.
Applying option pix_fmt (set pixel format) with argument nv12.
Applying option f (force format) with argument mpegts.
Applying option muxdelay (set the maximum demux-decode delay) with argument 0.
Applying option muxpreload (set the initial demux-decode delay) with argument 0.
Successfully parsed a group of options.
Opening an output file: /home/pi/Videos/output.mp4.
[file @ 0x55a0ca7210] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_v4l2m2m))
 Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native)) cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 3 times
[video4linux2,v4l2 @ 0x55a0c86b40] Dequeued v4l2 buffer contains corrupted data (0 bytes).
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 12 times
[video4linux2,v4l2 @ 0x55a0c86b40] Dequeued v4l2 buffer contains corrupted data (0 bytes).
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[video4linux2,v4l2 @ 0x55a0c86b40] Dequeued v4l2 buffer contains corrupted data (0 bytes).
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[video4linux2,v4l2 @ 0x55a0c86b40] Dequeued v4l2 buffer contains corrupted data (0 bytes).
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[video4linux2,v4l2 @ 0x55a0c86b40] Dequeued v4l2 buffer contains corrupted data (0 bytes).
 Last message repeated 2 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[video4linux2,v4l2 @ 0x55a0c86b40] Dequeued v4l2 buffer contains corrupted data (0 bytes).
 Last message repeated 23 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 1452 times
[rawvideo @ 0x55a0c89130] PACKET SIZE: 4147200, STRIDE: 3840 detected 4 logical cores [graph 0 input from stream 0:0 @ 0x55a0ca9080] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0x55a0ca9080] Setting 'pix_fmt' to value '1'
[graph 0 input from stream 0:0 @ 0x55a0ca9080] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 0x55a0ca9080] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x55a0ca9080] Setting 'frame_rate' to value '7013/117'
[graph 0 input from stream 0:0 @ 0x55a0ca9080] w:1920 h:1080 pixfmt:yuyv422 tb:1/1000000 fr:7013/117 sar:0/1
[scaler_out_0_0 @ 0x55a0cb0060] Setting 'w' to value '1280'
[scaler_out_0_0 @ 0x55a0cb0060] Setting 'h' to value '720'
[scaler_out_0_0 @ 0x55a0cb0060] Setting 'flags' to value 'bicubic'
[scaler_out_0_0 @ 0x55a0cb0060] w:1280 h:720 flags:'bicubic' interl:0 [format @ 0x55a0cb05b0] Setting 'pix_fmts' to value 'nv12'
[AVFilterGraph @ 0x55a0ca2730] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed
[scaler_out_0_0 @ 0x55a0cb0060] w:1920 h:1080 fmt:yuyv422 sar:0/1 -> w:1280 h:720 fmt:nv12 sar:0/1 flags:0x4 [h264_v4l2m2m @ 0x55a0ca5610] probing device /dev/video12 [h264_v4l2m2m @ 0x55a0ca5610] driver 'bcm2835-codec' on card 'bcm2835-codec-isp' in mplane mode [h264_v4l2m2m @ 0x55a0ca5610] v4l2 capture format not supported [h264_v4l2m2m @ 0x55a0ca5610] probing device /dev/video11 [h264_v4l2m2m @ 0x55a0ca5610] driver 'bcm2835-codec' on card 'bcm2835-codec-encode' in mplane mode [h264_v4l2m2m @ 0x55a0ca5610] Using device /dev/video11 [h264_v4l2m2m @ 0x55a0ca5610] driver 'bcm2835-codec' on card 'bcm2835-codec-encode' in mplane mode [h264_v4l2m2m @ 0x55a0ca5610] requesting formats: output=NV12 capture=H264 [h264_v4l2m2m @ 0x55a0ca5610] output: NV12 32 buffers initialized: 1280x0720, sizeimage 01382400, bytesperline 00001280 [h264_v4l2m2m @ 0x55a0ca5610] capture: H264 16 buffers initialized: 1280x0720, sizeimage 00524288, bytesperline 00000000 [h264_v4l2m2m @ 0x55a0ca5610] Failed to set number of B-frames: Invalid argument [h264_v4l2m2m @ 0x55a0ca5610] Failed to get number of B-frames [h264_v4l2m2m @ 0x55a0ca5610] Failed to set header mode: Invalid argument [h264_v4l2m2m @ 0x55a0ca5610] Encoder: bit rate = 6000000 [h264_v4l2m2m @ 0x55a0ca5610] Failed to set frame level rate control: Invalid argument [h264_v4l2m2m @ 0x55a0ca5610] Failed to set gop size: Invalid argument [h264_v4l2m2m @ 0x55a0ca5610] Encoder: repeat parameter sets = 1 [h264_v4l2m2m @ 0x55a0ca5610] Encoder Context: id (27), profile (-99), frame rate(25/1), number b-frames (0), gop size (50), bit rate (6000000), qmin (-1), qmax (-1) [h264_v4l2m2m @ 0x55a0ca5610] Failed to set minimum video quantizer scale: Invalid argument [h264_v4l2m2m @ 0x55a0ca5610] Failed to set maximum video quantizer scale: Invalid argument Forced keyframe at time 0.000000 [h264_v4l2m2m @ 0x55a0ca5610] Encoder: force key frame = 0 cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) cur_dts is invalid st:1 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[graph_1_in_1_0 @ 0x55a0d465d0] Setting 'time_base' to value '1/48000'
[graph_1_in_1_0 @ 0x55a0d465d0] Setting 'sample_rate' to value '48000'
[graph_1_in_1_0 @ 0x55a0d465d0] Setting 'sample_fmt' to value 's16'
[graph_1_in_1_0 @ 0x55a0d465d0] Setting 'channel_layout' to value '0x3'
[graph_1_in_1_0 @ 0x55a0d465d0] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[format_out_0_1 @ 0x55a0d46af0] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x55a0d46af0] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[format_out_0_1 @ 0x55a0d46af0] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[AVFilterGraph @ 0x55a0d45c10] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x55a0d47740] [SWR @ 0x55a0d47890] Using s16p internally between filters
[auto_resampler_0 @ 0x55a0d47740] ch:2 chl:stereo fmt:s16 r:48000Hz -> ch:2 chl:stereo fmt:fltp r:48000Hz [mpegts @ 0x55a0caec00] service 1 using PCR in pid=256, pcr_period=80ms [mpegts @ 0x55a0caec00] muxrate VBR, sdt every 500 ms, pat/pmt every 100 ms Output #0, mpegts, to '/home/pi/Videos/output.mp4':
 Metadata:
 encoder : Lavf58.45.100
 Stream #0:0, 0, 1/90000: Video: h264 (h264_v4l2m2m), 1 reference frame, nv12(progressive), 1280x720, 0/1, q=-1--1, 6000 kb/s, 25 fps, 90k tbn, 25 tbc
 Metadata:
 encoder : Lavc58.91.100 h264_v4l2m2m
 Stream #0:1, 0, 1/90000: Audio: aac (LC), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s
 Metadata:
 encoder : Lavc58.91.100 aac
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) [rawvideo @ 0x55a0c89130] PACKET SIZE: 4147200, STRIDE: 3840 Clipping frame in rate conversion by 0.132942 cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
 Last message repeated 17 times
^Cframe= 2 fps=0.3 q=-0.0 Lsize= 183kB time=00:21:16.64 bitrate= 1.2kbits/s speed= 189x
video:24kB audio:101kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 46.992252% Input file #0 (/dev/video0):
 Input stream #0:0 (video): 34 packets read (8294400 bytes); 2 frames decoded;
 Total: 34 packets (8294400 bytes) demuxed Input file #1 (hw:CARD=C4K,DEV=0):
 Input stream #1:0 (audio): 2712 packets read (1233148 bytes); 2712 frames decoded (308287 samples);
 Total: 2712 packets (1233148 bytes) demuxed Output file #0 (/home/pi/Videos/output.mp4):
 Output stream #0:0 (video): 2 frames encoded; 2 packets muxed (24588 bytes);
 Output stream #0:1 (audio): 301 frames encoded (308224 samples); 302 packets muxed (103182 bytes);
 Total: 304 packets (127770 bytes) muxed
2714 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x55a0ca7100] Statistics: 0 seeks, 1 writeouts [aac @ 0x55a0ca65e0] Qavg: 165.061 Exiting normally, received signal 2.



can anyone please help me figure this out ?


Thanks much !


RS