
Recherche avancée
Autres articles (31)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (5863)
-
C# Bitmap to AVI / WMV with Compression
5 juillet 2019, par Digitalsa1ntPrelude :
I’m going to preface this with, I have been learning C# in my spare time at work, and that I have been staring at code for a solid two days trying to wrap my head around this problem. I am developing some software to be used with a visualiser that connects by USB to a standard Desktop PC, the software detects the capture device and loads frames into bitmap using a New Frame Event, this is then displayed in a ’picture box’ as a live video stream. The problem as it sits is trying to encorporate the ability to record the stream and save to file, preferably a WMV or a compressed AVI.
What’s been tried :
I have considered and looked into the following :
SharpAVI - cant seem to get this to compress or save the frames properly as it appears to mainly look at existing AVI files.
AForge.Video.VFW - AVI files can be created but are far too large to be used, due to restrictions on the user areas of the individuals who will be using this software.
AForge.Video.FFMPEG - Again due to considerations of those using this software I can’t have unmanaged DLL’s sat in the output folder with the Executable file, and unfortunately this particular DLL cant be compiled properly using Costura Fody.
AVIFile Library Wrapper (From Code Project) - Again can’t seem to get this to compress a stream correctly from Bitmaps from the New Frame Events.
DirectShow - Appears to use C++ and unfortunately is beyond my skill level at this time.
The Relevant Code Snippets :
Current References :
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Resources;
using System.Drawing.Imaging;
using System.IO;
//Aforge Video DLL's
using AForge.Video;
using AForge.Video.VFW;
using AForge.Video.DirectShow;
//Aforge Image DLL's
using AForge.Imaging;
using AForge.Imaging.Formats;
using AForge.Imaging.Filters;
//AviLibrary
using AviFile;Global Variables :
#region Global Variables
private FilterInfoCollection CaptureDevice; // list of available devices
private VideoCaptureDevice videoSource;
public System.Drawing.Image CapturedImage;
bool toggleMic = false;
bool toggleRec = false;
//aforge
AVIWriter aviWriter;
Bitmap image;
#endregionCode for Displaying Stream
#region Displays the Stream
void videoSource_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
picBoxStream.SizeMode = PictureBoxSizeMode.Zoom;
picBoxStream.Image = (Bitmap)eventArgs.Frame.Clone();// clones the bitmap
if (toggleRec == true)
{
image = (Bitmap)eventArgs.Frame.Clone();
aviWriter.AddFrame(image);
}
}
#endregionCurrent Code for Recording Stream
#region Record Button
private void btnRecord_Click(object sender, EventArgs e)
{
if (toggleRec == false)
{
saveAVI = new SaveFileDialog();
saveAVI.Filter = "AVI Files (*.avi)|*.avi";
if (saveAVI.ShowDialog() == DialogResult.OK)
{
aviWriter = new AVIWriter();
aviWriter.Open(saveAVI.FileName, 1280, 720);
toggleRec = true;
Label lblRec = new Label();
}
}
else if (toggleRec == true)
{
aviWriter.Close();
toggleRec = false;
}
}
#endregionI apoligise if the above code doesn’t look quite right, I have been swapping, changing and recoding those three sections a lot in order to find a working combination. This means that it’s rather untidy but I didn’t see the point in cleaning it all up until I had the code working. That being said really any help that you can provide is greatfully recieved, even if it’s a case of what I want to do just cannot be done.
Thank you in advance.
EDIT : 2019 :
It’s been awhile since I posted this and it still gets the odd bit of interest here and there. Back when I posted this I was teaching myself to code and I had this weird quirk that I didn’t like using 3rd party libraries if I could avoid it, I wanted to do my own work, since then I’ve learnt a lot and one of those things is that the open source world is immense, impressive and kind. So if there is a 3rd party library that does what you want just use it, it’ll save you time.
-
How to Convert video into mp3 using ffmpeg in nodejs and angular and save converted audio into the database
2 septembre 2021, par Amir ShahzadThis is nodejs server side code


const express = require('express');
const ffmpeg = require('fluent-ffmpeg');
const fileUpload = require('express-fileupload');
const mongoose = require('mongoose');
const cors = require('cors')
const app = express();
const Video = require('./models/video');
mongoose.connect('mongodb://localhost:27017/YoutubeApp', {
 useNewUrlParser: true,
 useUnifiedTopology: true,
});
const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error'));
db.once('open', () => {
 console.log('Data Base Connected Successfully!');
});

app.use(fileUpload({
 useTempFiles: true,
 tempFileDir: 'temp/'
}));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cors({ origin: 'http://localhost:4200' }));


ffmpeg.setFfmpegPath('/usr/bin/ffmpeg');

app.post('/mp4tomp3', (req, res) => {
const data = new Video({
 mp4: req.body.mp4
});
res.contentType('video/avi');
res.attachment('output.mp3');
req.files.mp4val.mv("temp/" + req.body, function(err) {
 if(err){
 res.sendStatus(500).send(err)
 }else{
 console.log("Fiel Uploaded Successfully.!");
 }
});
// Convertin Mp4 To Avi
ffmpeg('temp/' + req.files.mp4val.mp4)
.toFormat('mp3')
.on('end', function() {
 console.log('Done');
})
.on('error', function(err){
 console.log('An Error Occured' + err.message)
})
 .pipe(res, {end: true})
 })

 app.listen(3000, () => {
 console.log('Server Start On Port 3000')
 })



Here i want to get input from the user with input tag and then want to convert video into audio and save into the database but i not know how i can do this


This is video model file


const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const videoSchema = new Schema({
 mp4: String,
});
module.exports = mongoose.model("Videos", videoSchema);



**This is Typescript code in angular client side that handle user input and select video **


import { ThrowStmt } from '@angular/compiler';
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { VideoConversionService } from 'src/services/video-conversion.service';

@Component({
 selector: 'app-root',
 templateUrl: './app.component.html',
 styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {

 submitted =false;
 form! : FormGroup
 data:any

 constructor(private formBuilder: FormBuilder,
 private videoService: VideoConversionService){}

 creatForm(){
 this.form = this.formBuilder.group({
 mp4: ['', Validators.required],
 });
 }
 ngOnInit(): void {
 this.creatForm();

 }


 convertVideo(){
 this.submitted = true
 this.videoService.conversion(this.form.value).subscribe(res => {
 this.data = res;
 })
 }

 }



I do not know how to create logic to do that (convert video into audio using angular framework)


This is app.component.html file where i want to get video from the user using input field


<div class="container">
 <h1>Video Proccessing App</h1>
 <form>
 <input type="file" formcontrolname="mp4" />
 <input type="submit" value="Convert" />
 </form>
</div>





But my code is not working and video is not converting into audio


This is my video service file where i calling nodejs api to perform the task


import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable({
 providedIn: 'root'
})
export class VideoConversionService {

constructor(private httpClient: HttpClient) { }

conversion(data: any){
 return this.httpClient.post('http://localhost:3000/mp4tomp3', data)
}
}



Please anyone can solve my problem Thanks in advance


-
How to Convert video into mp3 format using ffmpeg in nodejs and angular and then save converted audio into the database
2 septembre 2021, par Amir ShahzadThis is nodejs server side file


const express = require('express');
const ffmpeg = require('fluent-ffmpeg');
const fileUpload = require('express-fileupload');
const mongoose = require('mongoose');
const cors = require('cors')
const app = express();
const Video = require('./models/video');
mongoose.connect('mongodb://localhost:27017/YoutubeApp', {
 useNewUrlParser: true,
 useUnifiedTopology: true,
});
const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error'));
db.once('open', () => {
 console.log('Data Base Connected Successfully!');
});

app.use(fileUpload({
 useTempFiles: true,
 tempFileDir: 'temp/'
}));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cors({ origin: 'http://localhost:4200' }));


ffmpeg.setFfmpegPath('/usr/bin/ffmpeg');

app.post('/mp4tomp3', (req, res) => {
 convertdata = req.body;
 console.log('path of innput is', req.body);
 function convert(input, output, callback) {
 ffmpeg(input)
 .output(output)
 .on('end', function() { 
 console.log('conversion ended');
 callback(null);
 }).on('error', function(err){
 console.log('error: ', err.code, err.msg);
 callback(err);
 }).run();
 }
 convert(convertdata, './temp/output.mp3', function(err){
 if(!err) {
 console.log('conversion complete');

 
 }
 })

 app.listen(3000, () => {
 console.log('Server Start On Port 3000')
 })



In Convert function i not know how i can get input by the user i'm new in angular Please anyone can solve this out thanks in advance


This is video model file


const mongoose = require("mongoose");
const Schema = mongoose.Schema;

const videoSchema = new Schema({
 mp4: String,
});
module.exports = mongoose.model("Videos", videoSchema);



**This is Typescript code in angular client side that handle user input and select video **


import { ThrowStmt } from '@angular/compiler';
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { VideoConversionService } from 'src/services/video-conversion.service';

@Component({
 selector: 'app-root',
 templateUrl: './app.component.html',
 styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {

 submitted =false;
 form! : FormGroup
 data:any

 constructor(private formBuilder: FormBuilder,
 private videoService: VideoConversionService){}

 creatForm(){
 this.form = this.formBuilder.group({
 mp4: ['', Validators.required],
 });
 }
 ngOnInit(): void {
 this.creatForm();

 }


 convertVideo(){
 this.submitted = true
 this.videoService.conversion(this.form.value).subscribe(res => {
 this.data = res;
 })
 }

 }



I do not know how to create logic to do that (convert video into audio using angular framework)


This is app.component.html file where i want to get video from the user using input field


<div class="container">
 <h1>Video Proccessing App</h1>
 <form>
 <input type="file" formcontrolname="mp4" />
 <input type="submit" value="Convert" />
 </form>
</div>





But my code is not working and video is not converting into audio


This is my video service file where i calling nodejs api to perform the task


import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Injectable({
 providedIn: 'root'
})
export class VideoConversionService {

constructor(private httpClient: HttpClient) { }

conversion(data: any){
 return this.httpClient.post('http://localhost:3000/mp4tomp3', data)
}
}



Please anyone can solve my problem Thanks in advance