
Recherche avancée
Autres articles (67)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Gestion de la ferme
2 mars 2010, parLa ferme est gérée dans son ensemble par des "super admins".
Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
Dans un premier temps il utilise le plugin "Gestion de mutualisation" -
Gestion des droits de création et d’édition des objets
8 février 2011, parPar défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;
Sur d’autres sites (5551)
-
Reddit api only giving video and not its audio
25 mars 2023, par Rudra SharmaI am using Reddit API to play videos on my app but the audio is not playing with the video.


This is my code. I am using chewie package and I have no idea if the problem is in the player or Reddit Api. Also I am new to flutter. The code plays reddit videos on my app on chewie video player.


Future<void> _loadVideos() async {
 try {
 final videoUrls =
 await RedditApi.getVideoUrlsFromSubreddit('IndianDankMemes');

 setState(() {
 _videoUrls.addAll(videoUrls);
 });
 } catch (e) {
 print(e);
 }
 }

 Widget _buildVideosList() {
 return ListView.builder(
 itemCount: _videoUrls.length,
 itemBuilder: (context, index) {
 return Padding(
 padding: const EdgeInsets.all(8.0),
 child: Chewie(
 controller: ChewieController(
 videoPlayerController: VideoPlayerController.network(
 _videoUrls[index],
 ),
 aspectRatio: 9 / 16,
 autoPlay: true,
 looping: true,
 autoInitialize: true,
 ),
 ),
 );
 },
 );
 }
}

class RedditApi {
 static const String BASE_URL = 'https://www.reddit.com';
 static const String CLIENT_ID = 'my client id';
 static const String CLIENT_SECRET = 'my client secret';

 static Future> getVideoUrlsFromSubreddit(
 String subredditName) async {
 final response = await http.get(
 Uri.parse('$BASE_URL/r/$subredditName/top.json?limit=10'),
 headers: {'Authorization': 'Client-ID $CLIENT_ID'});

 if (response.statusCode == 200) {
 final jsonData = jsonDecode(response.body);
 final postsData = jsonData['data']['children'];

 final videoUrls = <string>[];

 for (var postData in postsData) {
 if (postData['data']['is_video']) {
 videoUrls.add(postData['data']['media']['reddit_video']
 ['fallback_url']);
 }
 }

 return videoUrls;
 } else {
 throw Exception("Failed to load videos from subreddit");
 }
 }
}```

If you are suggesting for ffmpeg please give me code as well as I said I am new to flutter. 

I have checked my client id and client secret is correct as well. Also if there is any other package I can add to make the task easy.

</string></void>


-
How to speed up my video creating/encoding pipeline
23 septembre 2015, par user606521I am creating a video from 120 JPEG images and concatening it with intro video.
- video (and images) dimmensions : 960x540
- video/audio output format that I need : mp4 H.264, AAC
I am creating video from JPEG images using following command :
ffmpeg -f lavfi -i anullsrc -r 60 -i pipe:0 -y -acodec aac -strict experimental \
-shortest -movflags frag_keyframe+empty_moov -f mp4 video.mp4It creates 2 seconds (120 frames with 60FPS) mp4 video with "silence" (silent audio). video.mp4 size is 94KB. This process takes 1 second. (Note that I am passing images through pipe:0).
Next I concatenate it with existing intro.mp4 video (H.264, AAC, 931KB, lasts 6 seconds) using following command :
ffmpeg -i intro.mp4 -i video.mp4 -y \
-filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" \
-map "[v]" -map "[a]" -acodec aac -strict experimental \
-movflags frag_keyframe+empty_moov -f mp4 final.mp4It creates final mp4 H.254, AAC video which lasts 2 + 6 = 8 seconds and it’s size 990KB. This process takes 3.5 seconds.
So the whole process takes 5.5 seconds on my Mac. I have to speed it up, especially concatening videos. I am not familiar with video encoding and video formats, but I thought that maybe creating first video in mp4 and then concatening it with another mp4 video is not efficient. Are there any other formats in which I could create video (and intro) that will be faster to create/concatenate so I could encode only final video as mp4 ?
For example I could create
video.<format></format>
, concatenate it withintro.<format></format>
and finally encode it asfinal.mp4
.Use case : I have to create videos in almost real time. 5.5 secs is ok on my Mac, but I have to execute my app on a weaker machine on which this process currently takes 3 + 15 = 18 seconds.
Also maybe there are some cool flags I could pass to ffmpeg to make it faster ?
-
ffmpeg ProcessBuilder No such file or directory
24 avril 2020, par silentsudoI am trying to get media duration using ffmpeg command from a java program. I am calling this method from within spring boot application.
I am using
ProcessBuilder
.


File object is valid and exists for privacy I have replaced file path in error logs.



My Code is as below :



private String getMediaDuration(File file) {
 final String command = "/usr/bin/ffmpeg -version";//-i " + file.getAbsolutePath() + " 2>&1 | grep Duration | cut -c 13-20";
 try {
 ProcessBuilder builder = new ProcessBuilder("/usr/bin/ffmpeg",
 "-version");
 builder.directory(file.getParentFile());

 System.out.println("Directory : " + builder.directory().exists());
 System.out.println("Directory : " + builder.directory().getAbsolutePath());
 final Process process = builder.start();
 final InputStream is = process.getInputStream();
 final InputStreamReader isr = new InputStreamReader(is);
 final BufferedReader br = new BufferedReader(isr);
 String line;
 while ((line = br.readLine()) != null) {
 System.out.println(line);
 }
 return line;
 } catch (Exception e) {
 e.printStackTrace();
 }
 return null;
 }




Unfortunately nothing seems to be working
Error below :



java.io.IOException: Cannot run program "/usr/bin/ffmpeg -version" (in directory "/abc/xyz"): error=2, No such file or directory
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at ....getMediaDuration(FFmpegRunner.java:208)
 at ....ffmpegprocessor.FFmpegRunner.run(FFmpegRunner.java:61)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: error=2, No such file or directory
 at java.lang.UNIXProcess.forkAndExec(Native Method)
 at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
 at java.lang.ProcessImpl.start(ProcessImpl.java:134)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
 ... 5 more
</init>



Output for
whereis ffmpeg



ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz




Please help me understand where it is going wrong. Thank you.