Recherche avancée

Médias (3)

Mot : - Tags -/Valkaama

Autres articles (64)

  • Les images

    15 mai 2013
  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (7442)

  • FFmpeg Error : Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM and incorrect codec parameters

    24 mars 2023, par Not A Bot

    Using FFmpeg to record the live stream.

    


    Actually, it is a platform where someone can stream live (camera or screen) and others can join the stream as views.

    


    The person who is streaming live has the option to record that stream. For recording stream FFmpeg is being used.

    


    The stream is being recorded in the WEBM file format.

    


    The issue is FFmpeg is throwing the error.

    


    


    Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM. 
    
Could not write header for output file #0 (incorrect codec parameters ?) : Invalid argument

    


    


    The command that records the stream is below.

    


    ffmpeg -loglevel debug -protocol_whitelist pipe udp rtp 
-fflags+genpts -f sdp -i pipe:0 -map 0:v:0 -c:v copy 
-map 0:a:0 -strict -2 -c:a copy -flags +global_header 1234_VIDEO_1671647432529.webm  


    


    





    


    


    


    


    



    


    


    


    


    


    


    


    


    Service Version
    Server(EC2) AWS Linux 2
    FFmpeg version 4.3.2-static

    


    


    NOTE : 2 weeks back the same command was working.

    


  • How to configure ffmpeg for streaming videos from Red5 into Youtube using youtube-v3-api ?

    28 mai 2018, par Alfonso Valdes

    You’ll see my problem is next :

    Currently I’m working to configure youtube-v3-api for live streaming of .flv videos on my Youtube channel using Red 5 service as stated on next link https://www.red5pro.com/docs/server/ffmpegstreaming.html, this is using next commands for streaming on Linux :

    ffmpeg  -i rtmp://127.0.0.1:1935/live/streamname live=1 timeout=2 -vcodec libx264 -s 640x480 -vb 500k -acodec libfdk_aac -ab 128k  -f flv rtmp://a.rtmp.youtube.com/live2/{Stream name/key}


    ffmpeg -rtsp_transport tcp -i rtsp://127.0.0.1:8554/live/streamname -acodec copy -vcodec copy -f flv rtmp://a.rtmp.youtube.com/live2/{Stream name/key}

    On this, neither RMTP nor RTSP protocols are working for streaming. Also, I have tried several codecs for audio and video configuring different sizes for each one of them, but none of those have worked.

    The root streaming videos are generated by an IOS/Android app still on development phase.

    The problem comes when no video is displayed on Youtube screen, regardless the video is being sent by Red5 (I confirmed this on my Red5 dedicated server on AWS) and received correctly by Youtube (confirmed by validating on Console), so I have come into a dead end on which I hope you could help me get through.

    Any idea of what could be a possible solution ?

    Thank you.

  • Convert video into mp3 using ffmpeg in angular and nodejs and saving audio into the database

    2 septembre 2021, par Amir Shahzad

    This 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 where i want to create logic to convert video into audio from the server side code

    


    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">&#xA;   <h1>Video Proccessing App</h1>&#xA;   <form>&#xA;     <input type="file" formcontrolname="mp4" />&#xA;     <input type="submit" value="Convert" />&#xA;  </form>&#xA;</div>&#xA;

    &#xA;

    &#xA;

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

    &#xA;

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

    &#xA;

    import { Injectable } from &#x27;@angular/core&#x27;;&#xA;import { HttpClient  } from &#x27;@angular/common/http&#x27;;&#xA;@Injectable({&#xA;   providedIn: &#x27;root&#x27;&#xA;})&#xA;export class VideoConversionService {&#xA;&#xA;constructor(private httpClient: HttpClient) { }&#xA;&#xA;conversion(data: any){&#xA;   return this.httpClient.post(&#x27;http://localhost:3000/mp4tomp3&#x27;, data)&#xA;}&#xA;}&#xA;

    &#xA;

    Please anyone can solve my problem Thanks in advance

    &#xA;