
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Sur d’autres sites (2288)
-
File contains data in an unknown format. (m4a load from librosa)
2 août 2022, par Moriyama AikoSo I am currently working on a DNN that takes in m4a files. I have ffmpeg, it creates a few batches and then dies on this error :


Traceback (most recent call last):
 File "/users/work/s163838/./main.py", line 126, in <module>
 
 File "/users/work/s163838/./main.py", line 96, in main
 print("e")
 File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
 data = self._next_data()
 File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
 return self._process_data(data)
 File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
 data.reraise()
 File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/_utils.py", line 425, in reraise
 raise self.exc_type(msg)
EOFError: Caught EOFError in DataLoader worker process 0.
Original Traceback (most recent call last):
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 164, in load
 y, sr_native = __soundfile_load(path, offset, duration, dtype)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 195, in __soundfile_load
 context = sf.SoundFile(path)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/soundfile.py", line 629, in __init__
 self._file = self._open(file, mode_int, closefd)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/soundfile.py", line 1183, in _open
 _error_check(_snd.sf_error(file_ptr),
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/soundfile.py", line 1357, in _error_check
 raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
RuntimeError: Error opening 'vox2/dev/aac/id08194/QnBYPze-x9A/00079.m4a': File contains data in an unknown format.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
 data = fetcher.fetch(index)
 File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
 data = [self.dataset[idx] for idx in possibly_batched_index]
 File "/apl/tryton/python/3.9.5/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
 data = [self.dataset[idx] for idx in possibly_batched_index]
 File "/users/work/s163838/vox_celeb_loader.py", line 53, in __getitem__
 load(speaker2utt1, self.num_samples)
 File "/users/work/s163838/vox_celeb_loader.py", line 13, in load
 wav, sr = librosa.load(path, sr=16000)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/util/decorators.py", line 88, in inner_f
 return f(*args, **kwargs)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 170, in load
 y, sr_native = __audioread_load(path, offset, duration, dtype)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/librosa/core/audio.py", line 226, in __audioread_load
 reader = audioread.audio_open(path)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/audioread/__init__.py", line 111, in audio_open
 return BackendClass(path)
 File "/users/kdm/s163838/.local/lib/python3.9/site-packages/audioread/rawread.py", line 65, in __init__
 self._file = aifc.open(self._fh)
 File "/apl/tryton/python/3.9.5/lib/python3.9/aifc.py", line 917, in open
 return Aifc_read(f)
 File "/apl/tryton/python/3.9.5/lib/python3.9/aifc.py", line 358, in __init__
 self.initfp(f)
 File "/apl/tryton/python/3.9.5/lib/python3.9/aifc.py", line 314, in initfp
 chunk = Chunk(file)
 File "/apl/tryton/python/3.9.5/lib/python3.9/chunk.py", line 63, in __init__
 raise EOFError
EOFError

</listcomp></module>


I am using this command


wav, sr = librosa.load(path, sr=16000)



is it just a broken file ? How do I skip such then ? Or is it something about loading a m4a file even with ffmpeg and the desired output when tested on a single m4a file ?


-
FFMpeg Unknown function in zoompan filter
4 août 2022, par Luciano Salemmei'm using ffmpeg with zoompan filter in my local environment whit the following command and it works well :


ffmpeg -y -i "https://my.domain/workspaces/1/a_render_dir/video_spotx.mp4" -i "https://my.domain/workspaces/1/Gallery/travel_6.jpeg" -i "https://my.domain/workspaces/1/Gallery/travel_6.jpeg" -i "https://my.domain/workspaces/1/Gallery/travel_6.jpeg" -i "/usr/app/src/output/video.mp4/text_0.png" -i "/usr/app/src/output/video.mp4/text_1.png" -filter_complex "[0]drawbox=x=0:y=0:w=iw:h=ih:color=00FF00@1:t=fill[padded];[0]format=yuva420p,pad=iw*2:ih*2:color=black@0,zoompan=z='if(lt(it,0),2,if(lte(pzoom,1.0),2,max(1.56,pzoom-0.005789473684210526)))':x=0:y=0:d=1:s=950x540[zp],[padded][zp]overlay=x='if(lt(t,3.04),t*213/3.04,213)':y='if(lt(t,3.04),t*50/3.04,50)':eval=frame[zp_stream],[1:v]scale=237.5:-1 [image1],[2:v]scale=237.5:-1 [image2],[3:v]scale=237.5:-1 [image3],[4:v]scale=475:-1 [image4],[5:v]scale=237.5:-1 [image5],[zp_stream][image1] overlay=95:54:enable='between(t,3,8)' [overlay1],[overlay1][image2] overlay=380:216:enable='between(t,3,8)' [overlay2],[overlay2][image3] overlay=532:54:enable='between(t,5,10)' [overlay3],[overlay3][image4] overlay=475:270:enable='between(t,1,8)' [overlay4],[overlay4][image5] overlay=0:0:enable='between(t,1,8)' [overlay5]" -map "[overlay5]" -pix_fmt yuv420p -map 0:a -c:a copy "/usr/app/src/output/video.mp4/render_video.mp4"



However when i build a docker container and run that command it is not working. The output error is the following :


[Parsed_zoompan_3 @ 0x2a08ac0c5140] [Eval @ 0x3ec4ec4c9ad0] Unknown function in 'it,0),2,if(lte(pzoom,1.0),2,max(1.56,pzoom-0.005789473684210526)))'



I tried to add a fixed z value to the zoompan filter, and the command works also inside the container, so the issue is on the zoompan syntax.


Here is my docker file


FROM node:16

ENV NODE_ENV=production

RUN apt-get -y update && \
 apt-get install -y ffmpeg \
 build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev 

WORKDIR /usr/src/app
COPY . .
RUN npm ci --production --silent

CMD node src/index.js



Problem starts when i switch on new Macbook pro with M1 processor, but i'm not sure it's related, i build the image with the following command :


docker buildx build --platform linux/x86_64 -t render-job .



On my macchine there is ffmpeg 5.0.1 installed, but on docker container the command
apt-get install -y ffmpeg
installs just the follow wersion :

ffmpeg version 4.1.9-0+deb10u1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)



I don't think is relate to the version, because before to build with M1 processor the zoompan filter was working also in the container.


Any help is appreciated.
Thanks.


-
ffmpeg : create slideshow of unknown number of images with transition
13 août 2022, par FreddyVihope someone could help me with this. Kinda new with ffmpeg and a bit stumped.


Given an input of a set of numbered images in a folder, I want to generate a video with each image shown for 60 seconds. I would love to use a default transition between each images.


The following code, correctly generates an mp4 without transitions :


ffmpeg -framerate 1/60 -pattern_type glob -i "*.png" -vcodec libx264 \
-pix_fmt yuv420p -r 30 -threads 4 -crf 25 -refs 1 -bf 0 -coder 0 -g 25 \
-keyint_min 15 -movflags +faststart no_audio_output.mp4



But when I try to add a default transition (supported in the version of ffmpeg I'm using that is the 5.1) :


ffmpeg -framerate 1/60 -pattern_type glob -i "WC*.png" -filter_complex 
xfade=transition=circleopen:duration=5:offset=55 -vcodec libx264 \
-pix_fmt yuv420p -r 30 -threads 4 -crf 25 -refs 1 -bf 0 -coder 0 -g 25 \
-keyint_min 15 -movflags +faststart no_audio_output.mp4



I have as error :


Cannot find a matching stream for unlabeled input pad 1 on filter Parsed_xfade_0



I googled a lot but still the solution is unclear. All the examples I found have been designed to deal with a slideshow/input with a define number of pieces while in my case the folder could contain any number of images.


Thanks all for your help !