
Recherche avancée
Autres articles (84)
-
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
MediaSPIP en mode privé (Intranet)
17 septembre 2013, parÀ partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...) -
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.
Sur d’autres sites (10768)
-
Berlin website owners need consent for using Google Analytics
19 novembre 2019, par Joselyn Khor — Uncategorized -
FFMPEG - Width/ Height Not Divisible by 2 (Scaling to Generate MBR Output)
15 avril 2020, par Sanjeev PandeyI am trying to generate multilple variants of videos in my library (Mp4 formats) and have renditions planned ranging from 1080p to 240p and popular sizes in between. For that I am taking a video with a AxB resolution and then running through a code (on bash) which scales them to desired following sizes - 
426x240
640x360
842x480
1280x720
1920x1080, with different bitrates of course, and then saves as Mp4 again.



Now, this works just fine if source video has height and width divisible by 2, but code breaks on the following line for the videos with odd width and height :

-vf scale=w=${width}:h=${height}:force_original_aspect_ratio=decrease"



Where 'width' and 'height' are the desired (and hardcoded) for every iteration : E.g. "426x240", and "640x360"



The Error :

[libx264 @ 00000187da2a1580] width not divisible by 2 (639x360)

Error initializing output stream 1:0 -- Error while opening encoder for output stream #1:0 - maybe incorrect parameters such as bit_rate, rate, width or height



Now approaches those are explained in this one doesn't work for me since I am scaling - FFMPEG (libx264) "height not divisible by 2"



And, I tried this one too but it seems all qualities are getting the same size -ffmpeg : width not divisible by 2 (when keep proportions)





- 

- This is how I tried to use this one :
scale='bitand(oh*dar,65534)':'min(${height},ih)'







Kindly suggest how to solve this, keeping in view that :
1. I have a very large library and I can't do manual change for every video
2. I need to scale the video and keep the aspect ratio



Thanks !



PS : [Edit] One way that I can see is padding all of the odd height/ weight videos using a second script in advance. This however doubles my work time and load. I would prefer to keep it in single script. This is the script I see that I can use for padding :
```ffmpeg -r 24 -i -vcodec libx264 -y -an -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2"`` (from : FFMPEG (libx264) "height not divisible by 2")


- This is how I tried to use this one :
-
FFMPEG - Width/ Height Not Divisible by 2 (Scaling to Generate MBR Output)
15 avril 2020, par Sanjeev PandeyI am trying to generate multilple variants of videos in my library (Mp4 formats) and have renditions planned ranging from 1080p to 240p and popular sizes in between. For that I am taking a video with a AxB resolution and then running through a code (on bash) which scales them to desired following sizes - 
426x240
640x360
842x480
1280x720
1920x1080, with different bitrates of course, and then saves as Mp4 again.



Now, this works just fine if source video has height and width divisible by 2, but code breaks on the following line for the videos with odd width and height :

-vf scale=w=${width}:h=${height}:force_original_aspect_ratio=decrease"



Where 'width' and 'height' are the desired (and hardcoded) for every iteration : E.g. "426x240", and "640x360"



The Error :

[libx264 @ 00000187da2a1580] width not divisible by 2 (639x360)

Error initializing output stream 1:0 -- Error while opening encoder for output stream #1:0 - maybe incorrect parameters such as bit_rate, rate, width or height



Now approaches those are explained in this one doesn't work for me since I am scaling - FFMPEG (libx264) "height not divisible by 2"



And, I tried this one too but it seems all qualities are getting the same size -ffmpeg : width not divisible by 2 (when keep proportions)





- 

- This is how I tried to use this one :
scale='bitand(oh*dar,65534)':'min(${height},ih)'







Kindly suggest how to solve this, keeping in view that :
1. I have a very large library and I can't do manual change for every video
2. I need to scale the video and keep the aspect ratio



Thanks !



PS : [Edit] One way that I can see is padding all of the odd height/ weight videos using a second script in advance. This however doubles my work time and load. I would prefer to keep it in single script. This is the script I see that I can use for padding :
```ffmpeg -r 24 -i -vcodec libx264 -y -an -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2"`` (from : FFMPEG (libx264) "height not divisible by 2")


- This is how I tried to use this one :