
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (74)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)
Sur d’autres sites (11350)
-
How to convert 7sec Video to Gif Android
21 août 2014, par Donnie IbiyemiAm making an app that convert shot video clips to Gif. i was wondering if there was a libary that directly converts videos to gifs on the Fly on Android.
I’ve tried to extract all the frames of the video and encode them into a gif but am only getting the the first frame of the video. my code is below :
public static final int GIF_DELAY_BETWEEN_FRAMES = 100;
public static final float SPEED_RATIO = 1.1f;
Uri videoFileUri=Uri.parse(mOutputFile.toString());
FFmpegMediaMetadataRetriever retriever = new FFmpegMediaMetadataRetriever();
retriever.setDataSource(mOutputFile.getAbsolutePath());
rev = new ArrayList<bitmap>();
MediaPlayer mp = MediaPlayer.create(RecorderActivity.this, videoFileUri);
int millis = mp.getDuration();
for(int i=1000000;itest.gif");
outStream.write(generateGIF());
outStream.close();
}catch(Exception e){
e.printStackTrace();
}
public byte[] generateGIF() {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
AnimatedGifEncoder encoder = new AnimatedGifEncoder();
encoder.setDelay((int)(GIF_DELAY_BETWEEN_FRAMES * (1 / SPEED_RATIO)));
encoder.start(bos);
for (Bitmap bitmap : rev) {
encoder.addFrame(bitmap);
}
encoder.finish();
return bos.toByteArray();
}
</bitmap>Please help me guys...thanks
-
How to automate ffmpeg to split and merge parts of video, and keep the audio in sync ?
9 décembre 2024, par TreeI have a Python script that automates trimming a large video (2 hours) into smaller segments and then concatenating them without re-encoding, to keep the process fast. The script runs these ffmpeg commands :


import subprocess

# Extract chunks
segments = [(0, 300), (300, 600), (600, 900)] # example segments in seconds
for i, (start, length) in enumerate(segments):
 subprocess.run([
 "ffmpeg", "-i", "input.mp4", "-ss", str(start), "-t", str(length),
 "-c", "copy", "-reset_timestamps", "1", "-y", f"chunk_{i}.mp4"
 ], check=True)

# Create concat list
with open("list.txt", "w") as f:
 for i in range(len(segments)):
 f.write(f"file 'chunk_{i}.mp4'\n")

# Concatenate
subprocess.run([
 "ffmpeg", "-f", "concat", "-safe", "0",
 "-i", "list.txt", "-c", "copy", "-y", "merged_output.mp4"
], check=True)



All chunks come from the same source video, with identical codecs, resolution, and bitrate. Despite this, the final merged_output.mp4 sometimes has audio out of sync—especially after the first chunk.


I’ve tried using -ss before -i to cut on keyframes, but the issue persists.


Question : How can I ensure correct A/V sync in the final concatenated video when programmatically segmenting and merging via ffmpeg without fully re-encoding ? Is there a way to adjust the ffmpeg commands or process to avoid audio desynchronization ?


-
How to sync network audio with a different network video and play it with chewie
26 mars 2023, par Rudra SharmaI am trying to stream a reddit videos on my app. For that reason I am using Reddit API but it is only giving the video url like 'redd.it/mpym0z9q8opa1/DASH_1080.mp4 ?source=fallback' with no audio but after some research I found out that we can get audio url by editing video url 'redd.it/mpym0z9q8opa1/DASH_audio.mp4 ?source=fallback'.


Now I have both audio and video url with me how can I sync them on network and stream them on my app using chewie package (video player).


This my code so far


import 'dart:async';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:flutter/material.dart';
import 'package:video_player/video_player.dart';
import 'package:chewie/chewie.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
 @override
 Widget build(BuildContext context) {
 return MaterialApp(
 title: 'Reddit Videos',
 theme: ThemeData(
 primarySwatch: Colors.blue,
 visualDensity: VisualDensity.adaptivePlatformDensity,
 ),
 home: VideoPlayerScreen(),
 );
 }
}

class VideoPlayerScreen extends StatefulWidget {
 @override
 _VideoPlayerScreenState createState() => _VideoPlayerScreenState();
}

class _VideoPlayerScreenState extends State<videoplayerscreen> {
 final List<string> _videoUrls = [];

 @override
 void initState() {
 super.initState();
 _loadVideos();
 }

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

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

 @override
 Widget build(BuildContext context) {
 return Scaffold(
 appBar: AppBar(
 title: Text('Reddit Videos'),
 ),
 body: SafeArea(
 child: _videoUrls.isNotEmpty
 ? _buildVideosList()
 : Center(child: CircularProgressIndicator()),
 ),
 );
 }

 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 = 'id';
 static const String CLIENT_SECRET = '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");
 }
 }
}
</string></void></string></videoplayerscreen>


I think the code is self explainatory about what I am trying to achieve (Trying to make a client for reddit).