
Recherche avancée
Autres articles (104)
-
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 (...) -
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 ;
Sur d’autres sites (16114)
-
Header missing in mpg, in spite of using avformat_write_header
23 novembre 2012, par TheSHEEEPI am encoding a live rendered video to mpg and/or mp4 (depends on the later usage of the video) using the ffmpeg C API. When encoding to mp4, everything is well. But when encoding to mpg, the resulting video cannot be played by any player. A quick call to ffprobe on it reveals that the header is missing. But this seems pretty much impossible, as I am explicitly writing it.
This is how I write the header, before any frame is encoded :
// ptr->oc is the AVFormatContext
int error = avformat_write_header(ptr->oc, NULL);
if (error < 0)
{
s_logFile << "Could not write header. Error: " << error << endl;
fprintf(stderr, "Could not write header. Error: '%i'\n", error);
return 1;
}There never is any error when writing the header.
For encoding, I am following the official muxing.c example, so I do set the CODEC_FLAG_GLOBAL_HEADER flag. I use CODEC_ID_MPEG2VIDEO (for video) and CODEC_ID_MP2 (for audio).
The result mpg does work when I "encode" it in an additional step with an external ffmpeg executable like this : "ffmpeg -i ownEncoded.mpg -sameq -y working.mpg".
So it seems all the data is there, only the header is missing for some reason...Here is the only thing ffmpeg is reporting before/when writing the header :
mpeg -------------------
lvl: 24
msg: VBV buffer size not set, muxing may failCould that be the problem ?
I wonder what could be wrong here as I encode mp4 with the exact same function, except setting some special values like qmin, qmax, me_method, etc. when encoding to mp4. Do I probably have to set any special values so that ffmpeg really does write the header correctly ?
-
ffmpeg Padding & Delay to Audio File Accurately
14 avril 2022, par Ry-Recently I've been doing a personal project which does entail a little bit of
audio handling but I have noticed that the commands that I am using to modify
don't have a 1:1 correlation in the resulting file leading to it being fairly
offbeat (Note that this program is error sensitive).


All I need to do is accurately add Padding to the start of an audio file, or
jumpforward to some point in the song using an Offset/Delay value. The values
are strictly accurate such as 0.13149s however accuracy passed the third radix
is pretty redundant since 'nobody' should be able to notice it.


Here is an example of one issue:

 [Input File Info] // This is a test case/correct values
 Supposed to start at : 0.875
 Originally started at: 1.190
 Offset Value : -0.315
 Difference : 1.190 - 0.875 = 0.315



// Audio file offset attempt (FAIL)
 FFMPEG Command: 
 ffmpeg -y -i "..." -ss 0.315 -c copy -map 0 "..."
 
 [Output File Info]
 Start Time Beat : 0.766 
 Start Time Beat Audacity: 0.766
 Resulting Error : 0.106



What I want to know is if someone knows a better way to get 1:1 accuracy from
the command or atleast as close to it as possible. I don't often use ffmpeg so
I probably am missing vital information (I did my best googling ok :) but to
this I also wouldn't abstain from using a dedicated audio library for the
language I'm writing the program in (Java).


I probably should mention that I have been using:
 ffmpeg -y -i "..." -af "adelay=DELAY" "..."

to add the padding but I haven't really gotten around to testing audio files
that require this yet so I don't know if its broken/inaccurate.



-
Node JS partial video streaming to safari
12 juin 2021, par Thor BilsbyI'm trying to stream a video directly to a browser using node.js as the backend. I would like the video to be streamed from a specific time and would also like it to be partially streamed since it is a pretty large file. Right now I am doing this with fluent-ffmpeg, like this :


const ffmpeg = require('fluent-ffmpeg');

app.get('/clock/', (req, res) => {
 const videoPath = 'video.mp4'; 
 const now = new Date();

 ffmpeg(videoPath)
 .videoCodec('libx264')
 .withAudioCodec('aac')
 .setStartTime(`${(now.getHours() - 10) % 24}:${now.getMinutes() - 1}:${now.getSeconds()}`)
 .format('mp4')
 .outputOptions(['-frag_duration 100','-movflags frag_keyframe+faststart','-pix_fmt yuv420p'])
 .on('end', () => {
 console.log("File has been converted succesfully");
 })
 .on('error', (err) => {
 if (err.message.toLowerCase().includes('output stream closed')) return;
 console.log('An error occoured', err);
 })
 .pipe(res, { end: true });
});



This will work with Chrome, but Safari just doesn't want to stream it.
I know that the reason why it doesn't work on Safari is that Safari needs the range header. I've therefore tried to do that, but :


- 

- I can't get it to work with fluent-ffmpeg.
- When I try to do it the "normal" way, without fluent-ffmpeg, it needs to load the whole video file before it plays.






The video doesn't need to start at the specific timestamp. It would be nice tho, but I have a workaround for that if it's not possible :)


So my question is : How can I get the code above to work with Safari. And if that is impossible : How can I code something that doesn't need to be loaded fully, before it can be played in Safari browsers, aka. partial video streaming.