
Recherche avancée
Médias (39)
-
Stereo master soundtrack
17 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (41)
-
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 (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (4583)
-
FFMPEG and JNI - pass AVFrame data to Java and Back
17 octobre 2015, par tishuI have some C code that decodes a video frame by frame. I get to a point where i have an AVFrame in BGR32 and would like to send it back to Java for editing.
I have a ByteBuffer object in my C code that was created in Java using AllocateDirect but i struggle to write the content of the AVFrame->data[0] (of uint8_t type) to it and read it back. I have tried memcpy with no luck. Does anyone have an idea how to achieve this ?
UPDATE
Followed Will’s comment below and wrote this in Cchar *buf = (*pEnv)->GetDirectBufferAddress(pEnv, byteBuffer);
memcpy(buf, rgb_frame->data[0], output_width*output_height*4);The buffer does contain some data in Java but doing the following returns a null bitmap
BufferedImage frame = ImageIO.read(bitmapStream);
Where bitmapStream is a ByteBufferInputStream defined here :
https://code.google.com/p/kryo/source/browse/trunk/src/com/esotericsoftware/kryo/io/ByteBufferInputStream.java?r=205Not sure if I am not writing things correctly in this buffer
UPDATE 2
Got pretty close now thanks to the latest snippet. I am using BGR32 format in my C code ie 4 bytes per pixel. So I modified things a bit in Java :
final byte[] dataArray = new byte[width*height*4];
imageData.get(dataArray);
final BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_BGR);
final DataBuffer buffer = new DataBufferByte(dataArray, dataArray.length);
Raster raster = Raster.createRaster(sampleModel, buffer, null);
image.setData(raster);I get the image correctly but there seems to be an issue with color channels
Tried different formats with no luck
-
Rebuilding Website for sharing videos
22 novembre 2015, par Léo Le GallSome friends and I run a sport forum with a decent user base. A lot of users wanted the ability to share video clips of their tricks. We didn’t really think anyone would use a video website that we made, so I built a really simple one just to see if the users would really use it. I hosted the video site on a $10 VPS, and it got blown away. The site was literally garbage, it was not visually appealing and the performance was just sad. Just as expected really, since this was just a test site. Since our test project was a success, we want to create a new and more polished site for the videos.
The website is really simple, and probably not optimized in any way at the moment. I will try to explain in details what the website does. The user uploads some video files in format X, the website combines them and converts (using ffmpeg) the final video to mp4(so it can be served with a html5 video player). The users gets a link (example.com/randomvideo) where he can see the video through a html5 player serving the mp4 file(just default html5, nothing fancy). The videos only contains highlights, and the final video is always under 1 minute, most are around 30 seconds.
Currently everything happens on the same server, both the video processing and the video serving. I can try to show how it works :
- User uploads some videos
- Servers stores the videos in a new random folder
- Combine videos and convert to mp4 (ffmpeg)
- Move final video(random name) to directory containing processed videos
- Store the name of the video file in the database (for website to serve it)
- Delete directory used to process the videos
I want to rebuild the website’s architecture to make it able to scale and handle heavy load. I have never done this before and I am currently making a plan how to do this. My plan is at the moment :
- Seperate servers for processing videos and viewing videos (all VPS in the start)
- Utilize content delivery network for serving static files
- Utilize load balancers both for servers proccesing and serving
I don’t really know what I should do with database(s). Can I do with one database or should use more ? They do not need to store sensitive information, since the auth in done through an API. They only need store information about the videos. I have experience with postgresql, mysql and redis, but I am not limited to those. What would you recommend in terms of scaleability ?
I will appriciate all the feedback I can get regarding my plan and what to do about databases. I know this might be a bit vague, so please ask me if I have forgotten anything imporant. Thanks for reading.
-
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).