
Recherche avancée
Autres articles (102)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...) -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)
Sur d’autres sites (6828)
-
HEVC : Fetching the input width and height from input bin stream
1er juillet 2022, par ZaxI have created an elementary bin stream using
HM-12.0
reference code. So the out put is an HEVC encoded bin stream (say input.bin).


I have a task which involves reading the header of this elementary stream. That is i need to fetch information such a the stream width, height etc. from the
input.bin
file.


After seeing a lots of streams, i can conclude that all these bin streams starts from the sequence :



00 00 00 01




So whenever i see this sequence in any bin stream, i can say that this stream has to be decoded by HEVC decoder.



Further if i want to fetch the width, height, fps etc. from the input.bin (like ff_raw_video_read_header function in ffmpeg), that are the steps need to be performed to fetch this information ?



I have gone through the parsing section of the HEVC draft, but its very complicated for my level in video domain. Can anyone suggest a simple way to fetch the required information from the encoded bin file ?



Any suggestions will be really helpful to me. Thanks in advance.


-
FFMEPG crop : Invalid too big or non positive size for width '1920' or height '1040'
12 février 2021, par NatePhysicsI run into a strange issue with a particular file in FFMPEG. When I try and crop it down a little I get :


[Parsed_crop_0 @ 000002ad60c27980] Invalid too big or non positive size for width '1920' or height '1040'
[Parsed_crop_0 @ 000002ad60c27980] Failed to configure input pad on Parsed_crop_0
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:37
Conversion failed!



This is odd to me because you can even see from the stream metadata that the resolution is much higher :


Metadata:
 encoder : libebml v1.4.0 + libmatroska v1.6.2
 creation_time : 2021-02-09T22:45:47.000000Z
 Duration: 02:17:48.93, start: 0.000000, bitrate: 8548 kb/s
 Stream #0:0: Video: h264 (High), yuv420p(progressive), **1920x1080** [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)



There's only 1 video stream. I'm running the following command :


ffmpeg -i "wedding.mkv" -filter:v "crop=1920:1040" -c:v libx264 -preset slow -tune film -profile:v high -level 4.1 -crf 19 -c:a copy -c:s copy -map 0 "wedding-cropped.mkv"



I can preview the crop using the following command without any errors :


ffplay -i "wedding.mkv" -vf "crop=1920:960"



I've cropped a few files before without issue. I'm a bit confused as to why I'm getting a resolution error in this case when the video file is clearly higher resolution. I've also tested lowering the cropped resolution and even when I lower both by several hundred pixels it still spits out the same error. Any thoughts or suggestions ?


-
FFMpeg : scale down videos with maximum width and height while maintaining aspect ratio
20 février 2021, par R3D34THR4YIn my program the user can input any video file he wants and have it transcoded ready for social media no matter its dimensions and aspect ratio.
The "export profiles" have many variables but the important ones here are maxheight and maxwidth.


The FFMpeg filters must output a video that follows the following rules :


- 

- If the video is vertical, permutate the maxheight and maxwidth values (social media considers both 1280x720 and 720x1280 as "720P")
- The video must not have a height superior to maxheight or a width superior to maxwidth.
- The original video and exported video have the same aspect ratio and no distortion occurs.
- No padding or cropping should occur.
- The video should not be scaled if it is already under those maximum dimensions (no upscaling).
- The function must work even with odd input resolutions.














I have tried finding a combination of filters that do that but I haven't been able so far, either the video gets distorted or it gets huge black bars if the aspect ratio isn't right, the solution may be simple but I'm a beginner on this library so I'm probably just missing an easy solution.


My current solution :


ffmpeg -i input.mp4 -vf [in] scale=1280:720:flags=lanczos:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1 [res]; [res] format=yuv420p [format] -c:v libx264 -c:a aac -movflags +faststart output.mp4



Thanks for reading