
Recherche avancée
Autres articles (102)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (8056)
-
tiff : Return proper error for missing LZMA compression
18 août 2014, par Diego Elio Pettenò -
Converted mp4 from gif didn't shows in web browser
16 décembre 2017, par Stojan KukrikaI am trying to convert animated GIFs to MP4 files using ffmpeg. Only this convert GIF to MP4 :
exec('ffmpeg -i ' . $destinationPath . $filename . ' -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" ' . $destinationPath . $newFilename);
And I can play it in my pc when download it from server, but it’s didn’t want to pay in browser. Browser returns me this error :
After that GIF to MP4 converor I get one image for thumbnail image and that is works fine :
exec("ffmpeg -i " . $destinationPath . $video . ".mp4 -ss 00:00:01.000 -vframes 1 ".storage_path().$folderNameThumb."/media.png");
and it’s shows me a valid frame of GIF. Can anybody help me how to fix this problem with video ?
ffprobe output
ffprobe version 2.8.13 Copyright (c) 2007-2017 the FFmpeg developers built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
configuration:
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101Here is what I get from one MP4 file (run ffprobe filename.mp4) :
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf56.40.101
Duration: 00:00:02.16, start: 0.000000, bitrate: 593 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 500x312 [SAR 1:1 DAR 125:78], 589 kb/s, 8.33 fps, 8.33 tbr, 12800 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandlerBecause I use Laravel this is method for return media :
public function getGifImage(Media $media)
{
$path = storage_path() . '/uploads/gif/' . $media->content;
if (file_exists($path)) {
return response()->download($path, null, [], null);
}
} -
How to upload 7MB GIF to Twitter's API
22 février 2021, par randombitsI have a bunch of JPEG frames that I use ImageMagick to stitch together into a GIF. The final product has the following type :


GIF image data, version 89a, 1280 x 720


This gives the effect of an animated GIF. My file sizes range anywhere between 6-8MB.


If I upload this media manually to Twitter, it works great. Using
TwitterOAuth
PHP library found here when I attempt the following :

$media = $twitterConnection->upload('media/upload', ['media' => 'my_file.gif');


I get the following error :


Image file size must be <= 5242880 bytes


I have also tried uploading the file using Twitter's recommended Python large video library and that failed with the following :


INIT
Media ID: 1362940800456351744
APPEND
4194304 of 7685061 bytes uploaded
APPEND
7685061 of 7685061 bytes uploaded
Upload chunks complete.
FINALIZE
{'media_id': 1362940800456351744, 'media_id_string': '1362940800456351744', 'media_key': '7_1362940800456351744', 'size': 7685061, 'expires_after_secs': 86400, 'processing_info': {'state': 'pending', 'check_after_secs': 1}}
Media processing status is pending
Checking after 1 seconds
STATUS
Media processing status is failed



I am willing to use any platform/utility to get my video files uploaded to Twitter. What is my best bet to either :


1 : Fix my file type to adhere to Twitter's requirements. Should it not be a GIF ? Should I be converting my still shot JPEG files to another format ?


2 : Is there an API that Twitter has available that will allow the GIFs of these sizes to be uploaded ? Again, I can upload these files via the regular Twitter web UI client, but I cannot automate it via their API.


How do I upload my GIF to Twitter using their API ?