
Recherche avancée
Médias (91)
-
Valkaama DVD Cover Outside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Valkaama DVD Cover Inside
4 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Image
-
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
Autres articles (25)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...) -
Sélection de projets utilisant MediaSPIP
29 avril 2011, parLes exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
Ferme MediaSPIP @ Infini
L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)
Sur d’autres sites (3032)
-
Why is FFMpeg outputting wrong NAL unit types ? (javascript h264 livestream)
17 juillet 2018, par YetiI am trying to set up a livestream in the browser using h264 encoding, in which javascript decodes the h264 frames and paints it on a Canvas-element (or using WebGL).
Both Broadway and Prism implement decoding NAL units of type 1, 5, 7, and 8.
My current setup is as follows :
- FFMpeg outputs an MPEG-TS stream with h264 data
- The stream is piped to netcat which listens on port 8084
- A websocket server in NodeJS pipes data from port 8084 to clients on 8085
- The jsmpeg library decodes MPEG-TS into separate NAL units
- The separate NAL units are decoded by Broadway or Prism which outputs to a canvas
I am using this FFMpeg command :
ffmpeg -f v4l2 -i /dev/video0 -r 15 -c:v h264_nvenc -pix_fmt yuv420p -b:v 500k -profile:v baseline -tune zerolatency -f mpegts - | nc -l -p 8084 127.0.0.1
The problem is that the NAL units I’m getting are of type 9 (or maybe 6 ?), here is the header of one of the NAL units that javascript is receiving, in Base64 and binary formatting :
echo "AAAAAQnwAAAAAQYBBAAECBCAAAAAAWHg" | base64 -d | xxd -b
00000000: 00000000 00000000 00000000 00000001 00001001 11110000 ......
00000006: 00000000 00000000 00000000 00000001 00000110 00000001 ......
0000000c: 00000100 00000000 00000100 00001000 00010000 10000000 ......
00000012: 00000000 00000000 00000000 00000001 01100001 11100000 ....a.Neither Broadway nor Prism supports these NAL unit types. How can I configure FFMpeg to only output NAL units of type 1, 5, 7, and 8 ?
EDIT : I have also tried the following command :
ffmpeg -f v4l2 -i /dev/video0 -r 15 -c:v h264_nvenc -pix_fmt yuv420p \
-b:v 500k -profile:v baseline -tune zerolatency \
-movflags frag_keyframe+empty_moov -g 52 -f mp4 - \
| nc -l -p 8084 127.0.0.1Which encodes to mp4, and from there I try to parse NAL units starting with three zero bytes. The lines look all similar to the following :
echo "AAAACAYBBABOCBCAAAARemHk4f8df1Su" | base64 -d | xxd -b
00000000: 00000000 00000000 00000000 00001000 00000110 00000001 ......
00000006: 00000100 00000000 01001110 00001000 00010000 10000000 ..N...
0000000c: 00000000 00000000 00010001 01111010 01100001 11100100 ...za.
00000012: 11100001 11111111 00011101 01111111 01010100 10101110 ....T.That is type 6 (00110 in the 5th byte), still not the desired NAL unit type.
UPDATE : The reason it didn’t work for me was a matter of an encoding/decoding issue between chars and bytes in Javascript. I have put the working code on github for others who may want to do a similar thing.
Concerning the NAL units, it turns out the raw video of FFMpeg output contained type 6 of only a few bytes, followed by type 1 that has the frame data. The type 6 can be discarded. Thanks to the comments and accepted answer for the insight into this.
-
doc/filters : drawtext : add example of printing texts on same baseline
14 décembre 2016, par Andrey Utkindoc/filters : drawtext : add example of printing texts on same baseline
Height of canvas produced by drawtext varies depending on symbols in
text, so add example for printing separate texts aligned horizontally.Wording suggested by Lou Logan <lou@lrcd.com>
Signed-off-by : Andrey Utkin <andrey.utkin@pb.com>
Signed-off-by : Lou Logan <lou@lrcd.com> -
Fluent-ffmpeg won't create video file sometime it will create ?
27 mai 2022, par Himanshu Thakuranyone know the reason of this problem ? what is the issue ?
in this code, i am trying to convert a blob into video format. but sometime it is working and sometime not. can anyone help me in this ?




const recordVideo = require('../model/recordVideo_model')
const { join, dirname } = require('path');
const { fileURLToPath } = require('url')
const { mkdir, open, unlink, writeFile } = require('fs/promises');
const {Blob, Buffer} = require('buffer');
const { path } = require('@ffmpeg-installer/ffmpeg');
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(path)
// const __dirname = dirname(fileURLToPath(import.meta.url));
const saveData = async(data, roomid, course_id)=>{
 //console.log(data);
 const videoPath = join(__dirname, '../video');
 //final folder name
 //const dirName = new Date().toLocaleDateString().replace(/\./g, '_');
 const dirName = roomid;
 // console.log(`dirName: ${dirName}`);
 //const dirPath = `${videoPath}/${dirName}`;
 const dirPath = `./public/video/canvideo/${dirName}`;
 
 const fileName= `${Date.now()}-${roomid}.webm`;
 //const fileName= `${roomid}.webm`;
 const tempFilePath = `${dirPath}/temp-${fileName}`;
 const finalFilePath = `${dirPath}/${fileName}`;
 
 let fileHandle; 
 try {
 fileHandle = await open(dirPath);
 console.log(`open the file${fileHandle}`)
 } 
 
 catch {
 await mkdir(dirPath);
 console.log(`making directory${fileHandle}`)
 } 
 
 finally {
 
 if (fileHandle) {
 fileHandle.close();
 console.log(`closing ${fileHandle}`)
 }
 
 }

 try {
 const videoBlob = new Blob(data, {
 type: 'video/webm'
 })
 const videoBuffer = Buffer.from(await videoBlob.arrayBuffer())
 const res = await recordVideo.findOne({roomid:roomid, recordType:'canvas'})
 if(!res){ 
 await writeFile(tempFilePath, videoBuffer)
 
 await ffmpeg(tempFilePath)
 .outputOptions([
 '-c:v libvpx-vp9',
 '-c:a copy',
 '-crf 35',
 '-b:v 0',
 '-vf scale=1280:720','-max_muxing_queue_size 1024'
 ])
 .on('end', async () => {
 await unlink(tempFilePath)
 console.log(`*** File ${fileName} created`)
 //insert database entry (recorded video entry with same details roomid, finename, finalfilepath, created at) 
 await recordVideo.create({roomid:roomid,filename:fileName,filePath:finalFilePath,recordType:'canvas', courseid:course_id});
 
 }).on('error', function(err) {
 console.log('An error occurred: ' + err.message);
 })
 .save(finalFilePath, dirPath);

 } 

 } 
 
 catch (e) {
 console.log('*** Erro in code ', e)
 }

}

module.exports = {saveData,};






if any help me in this. it would be great for me.
in this code, i am trying to convert a blob into video format. but sometime it is working and sometime not. can anyone help me in this ?