
Recherche avancée
Autres articles (54)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...)
Sur d’autres sites (7091)
-
ffmpeg split video H264 stutters on Windows Media Player
9 mars 2019, par Juan FoegenI am converting and splitting wmv and mp4 into new mp4 files. I am using ffmpeg to do the conversion with simply :
ffmpeg -i inputfile.wmv -vcodec libx264 -ss 00:00:10 -t 00:00:15 outputfile.mp4So when I create my split video it plays fine on other video players, like VLC, but stutters when initially playing on Windows Media Player and even shows a blank screen for a moment and then after about 5 seconds, the video will play normally. If I then select play again without reloading, Windows Media Player will play the video fine, with no stuttering.
If I REMOVE the start parameter when doing the conversion, then the resulting video will play without issues on all my players, INCLUDING Windows Media Player.
I have tried changing the frame rate, the bit rate and altered different optimization options mentioned here - https://trac.ffmpeg.org/wiki/Encode/H.264
I need the split video to play on Windows machines on Windows Media Player and on the web streamed using the video element. This is why I chose H264 codec and MP4.
Has anyone had issues playing ffmpeg split videos using H264 codec with Windows Media Player ? I am using the latest version of ffmpeg. Anyone have any other suggestions on any different settings I could try to adjust ?
Thanks
-
Error audio loading when runing Whisper Open AI model
9 juin 2024, par John mickThe problem I'm trying to solve is that I can't run Whisper model for some audio, it says something related to audio decoding.


payload.wav: Invalid data found when processing input.
raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e



I tried using the
micro-machines.wav
and it works fine but when i used other audio it gives me an error.

import whisper

model = whisper.load_model("base")
text=model.transcribe('micro-machines.wav',fp16=False)
print(text)
text=model.transcribe('payload.wav',fp16=False)
print(text)



Error I'm getting for payload :


d:\...\venv\lib\site-packages\whisper\transcribe.py:79: UserWarning: FP16 is not supported on CPU; using FP32 instead
 warnings.warn("FP16 is not supported on CPU; using FP32 instead") 
Traceback (most recent call last):
 File "d:\...\venv\lib\site-packages\whisper\audio.py", line 42, in load_audio
 ffmpeg.input(file, threads=0) 
 File "d:\...\venv\lib\site-packages\ffmpeg\_run.py", line 325, in run 
 raise Error('ffmpeg', out, err) 
ffmpeg._run.Error: ffmpeg error (see stderr output for detail) 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
 File "C:\....\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
 return _run_code(code, main_globals, None,
 File "C:\.....\Python\Python39\lib\runpy.py", line 87, in _run_code
 exec(code, run_globals)
 File "D:\...\venv\Scripts\whisper.exe\__main__.py", line 7, in <module>
 File "d:\...\venv\lib\site-packages\whisper\transcribe.py", line 314, in cli
 result = transcribe(model, audio_path, temperature=temperature, **args)
 File "d:\...\venv\lib\site-packages\whisper\transcribe.py", line 85, in transcribe
 mel = log_mel_spectrogram(audio)
 File "d:\...\venv\lib\site-packages\whisper\audio.py", line 111, in log_mel_spectrogram
 audio = load_audio(audio)
 File "d:\...\venv\lib\site-packages\whisper\audio.py", line 47, in load_audio
 raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") from e
RuntimeError: Failed to load audio: ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enab
le-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxv
id --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf 
--enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libo
pencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enab
le-librubberband
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100
payload.wav: Invalid data found when processing input
</module>


I tried searching for solutions and I found one which says It appears that the code failed to load the audio file for some reason and even failed to display that error because e.stderr did not contain a valid UTF-8 string


-
Detect if AVStream is broken
9 juillet 2018, par Eugene AlexeevIn my project I’m using an
FFMpeg
and I wrote a muxer which works with multi-video container (it’s an.mp4
with few video streams). And sometimes I have to deal with a situation when my code was fed up with file which has broken video stream. And the problem is - I need to find a way how I can detect broken stream and abandon it from usage.Here’s my code which I’m using for reading streams out of the file :
- (BOOL)openFile:(NSString *)filePath options:(AVDictionary *)options
{
_pFormatCtx = NULL;
if (avformat_open_input(&_pFormatCtx, [filePath UTF8String], NULL, &options) != 0) {
[self raiseExceptionWithMessage:@"Couldn't open the file!"];
return NO;
}
if (avformat_find_stream_info(_pFormatCtx, NULL) < 0) {
//[self raiseExceptionWithMessage:@"Couldn't find stream info!"];
return NO;
}
int stream_index = 0;
for (int i = 0; i < _pFormatCtx->nb_streams ; i++)
{
AVStream *st = _pFormatCtx->streams[i];
if (_pFormatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
{
AVCodecParameters *params = st->codecpar;
st->index = stream_index;
_streams[@(st->index)] = [[VideoStream alloc] initWithStream:st];
stream_index++;
}
}
_firstStream = [_streams.allValues firstObject].stream;
if (_streams.count == 0) {
[self raiseExceptionWithMessage:@"Couldn't find videostream!"];
return NO;
}
_pCodecParams = [self firstStream]->codecpar;
_pCodec = avcodec_find_decoder(_pCodecParams->codec_id);
if (!_pCodec) {
[self raiseExceptionWithMessage:@"Unsupported codec!"];
return NO;
}
_pCodecCtx = avcodec_alloc_context3(_pCodec);
if (avcodec_parameters_to_context(_pCodecCtx, _pCodecParams) < 0) {
[self raiseExceptionWithMessage:@"Couldn't copy params into codec"];
return NO;
}
if (avcodec_open2(_pCodecCtx, _pCodec, 0) < 0) {
[self raiseExceptionWithMessage:@"Couldn't open the Codec!"];
return NO;
}
return YES;
}When this method is opening video with broken video-stream,
avformat_find_stream_info
gives such output in logs :[h264 @ 0x10684e200] top block unavailable for requested intra mode -1
[h264 @ 0x10684e200] error while decoding MB 45 0, bytestream 76665
[h264 @ 0x10684e200] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
[h264 @ 0x106854a00] top block unavailable for requested intra mode -1
[h264 @ 0x106854a00] error while decoding MB 47 0, bytestream 69501
[h264 @ 0x106854a00] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
[h264 @ 0x10683de00] left block unavailable for requested intra4x4 mode -1
[h264 @ 0x10683de00] error while decoding MB 0 1, bytestream 73290
[h264 @ 0x10683de00] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
[h264 @ 0x106860800] left block unavailable for requested intra4x4 mode -1
[h264 @ 0x106860800] error while decoding MB 0 2, bytestream 23072
[h264 @ 0x106860800] concealing 3559 DC, 3559 AC, 3559 MV errors in I frameGood news is
avformat_find_stream_info
clearly sees that something is wrong with the file. But bad news is - output ofavformat_find_stream_info
isn’t affected at all. After this method execution myAVFormatContext
variable which is_pFormatCtx
will have all streams file provides whether it’s valid or not.And my question - how can I differ bad stream from a good one ? What kind of data inside the stream I can rely on ? What kind of method I could use to test stream out ? Any help would be appreciated !