Skip to content
This repository was archived by the owner on Jan 1, 2025. It is now read-only.

something in demucs previous version about ffmpeg error #242

Closed
DaerTaeKook opened this issue Dec 2, 2021 · 7 comments
Closed

something in demucs previous version about ffmpeg error #242

DaerTaeKook opened this issue Dec 2, 2021 · 7 comments
Labels
question Further information is requested

Comments

@DaerTaeKook
Copy link

DaerTaeKook commented Dec 2, 2021

❓ Questions

(Please ask your question here.)
My demucs version is demucs-V2
My ffmpeg version is 4.4.1.
When I try to run python3 -m demucs -b 4 --musdb MUSDB_PATH ,there is such a error: ffmpeg._run.Error: ffprobe error (see stderr output for detail). I try to add 'command += ['-encoder_codec','mp4v']' in demucs/audio.py read function(which line is 113 ). This method refers to the following links: YuvalNirkin/fsgan#70.
However I still have the above problems.
Now the command is ['ffmpeg', '-y', '-loglevel', 'panic', '-i', '/mnt/hgfs/share/musdb18_small/train/Actions - One Minute Smile.stem.mp4', '-map', '0:0', '-threads', '1', '-f', 'f32le', '--encoder_codec', 'mp4v', '-ar', '44100', '/tmp/tmpzig0j62l'].

How can I solve this problem?
Thanks a lot.

@DaerTaeKook DaerTaeKook added the question Further information is requested label Dec 2, 2021
@DaerTaeKook DaerTaeKook changed the title something in demucs previous version about metadata something in demucs previous version about ffmpeg error Dec 2, 2021
@adefossez
Copy link
Contributor

the error is happening during the ffprobe command. can you check that ffprobe '/mnt/hgfs/share/musdb18_small/train/Actions - One Minute Smile.stem.mp4' actually works ?

@DaerTaeKook
Copy link
Author

The command "ffprobe '/mnt/hgfs/share/musdb18_small/train/Actions - One Minute Smile.stem.mp4' "shows
ffprobe version 4.3 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
configuration: --prefix=/home/ying/anaconda3/envs/demucs --cc=/opt/conda/conda-
bld/ffmpeg_1597178665428/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-
avresample --enable-gnutls --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-pic --enable-
pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5627224e5400] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/hgfs/share/musdb18_small/train/Actions - One Minute Smile.stem.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
creation_time : 2017-12-16T16:51:27.000000Z
Duration: 00:02:43.37, start: 0.000000, bitrate: 1288 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s
Metadata:
handler_name : SoundHandler
Stream #0:2(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s
Metadata:
handler_name : SoundHandler
Stream #0:3(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s
Metadata:
handler_name : SoundHandler
Stream #0:4(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 256 kb/s
Metadata:
handler_name : SoundHandler
Stream #0:5: Video: png, rgba(pc), 512x512 [SAR 20157:20157 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)

I don't know if it is working properly.
Thanks for your help.

@adefossez
Copy link
Contributor

adefossez commented Dec 2, 2021

it worked properly :) can you provide the full output from the demucs command ?

@DaerTaeKook
Copy link
Author

DaerTaeKook commented Dec 3, 2021

when I run the command:python3 -m demucs -b 4 --musdb /root/music_data/musdb18
the terminal shows:
Experiment musdb=musdb18 batch_size=4
Agumentation pipeline: Sequential(
(0): Shift()
(1): FlipSign()
(2): FlipChannels()
(3): Scale()
(4): Remix()
)
Number of training samples adjusted to 447146
Traceback (most recent call last):
File "/root/anaconda3/envs/demucs/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/root/anaconda3/envs/demucs/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/root/project/demucs/demucs/main.py", line 322, in
main()
File "/root/project/demucs/demucs/main.py", line 198, in main
build_musdb_metadata(args.metadata, args.musdb, args.workers)
File "/root/project/demucs/demucs/compressed.py", line 87, in build_musdb_metadata
tracks = get_musdb_tracks(musdb)
File "/root/project/demucs/demucs/compressed.py", line 16, in get_musdb_tracks
mus = musdb.DB(root, *args, **kwargs)
File "/root/anaconda3/envs/demucs/lib/python3.8/site-packages/musdb/init.py", line 115, in init
self.tracks = self.load_mus_tracks(subsets=subsets, split=split)
File "/root/anaconda3/envs/demucs/lib/python3.8/site-packages/musdb/init.py", line 256, in load_mus_tracks
track = MultiTrack(
File "/root/anaconda3/envs/demucs/lib/python3.8/site-packages/musdb/audio_classes.py", line 133, in init
super(MultiTrack, self).init(path=path, *args, **kwargs)
File "/root/anaconda3/envs/demucs/lib/python3.8/site-packages/musdb/audio_classes.py", line 52, in init
self.info = stempeg.Info(self.path)
File "/root/anaconda3/envs/demucs/lib/python3.8/site-packages/stempeg/read.py", line 328, in init
self.info = ffmpeg.probe(filename)
File "/root/anaconda3/envs/demucs/lib/python3.8/site-packages/ffmpeg/_probe.py", line 23, in probe
raise Error('ffprobe', out, err)
ffmpeg._run.Error: ffprobe error (see stderr output for detail)
############################################################################
I configured the environment as follows:
conda env update -f environment-cuda.yml # if you have GPUs
conda activate demucs.
pip install -e .
My system configuration is as follows:
Ubuntu 18.04.6 LTS
GPU 0: Tesla V100-PCIE-32GB (UUID: GPU-e3976545-00d8-ef1c-101f-64c18a970671)
GPU 1: Tesla V100-PCIE-32GB (UUID: GPU-e7be1b47-effd-ea8b-7729-9b713f9fdb12)

I removed the code from PC to server.So there will be different paths。But I have confirmed the configuration and ffprobe.
Examples of file names in my train directory are as follows:
A Classic Education - NightOwl.stem.mp4
Actions - Devil's Words.stem.mp4
The data set download link is as follows:
https://zenodo.org/record/1117372/files/musdb18.zip
Thanks a lot.

@adefossez
Copy link
Contributor

okay so the error happens in stempeg, not in the demucs code. I am not sure though about the changes you are trying to make to ffmpeg flags. this shouldn't be required to read audio mp4.
What about doing ffplay '/mnt/hgfs/share/musdb18_small/train/Actions - One Minute Smile.stem.mp4' does it work ?

@DaerTaeKook
Copy link
Author

DaerTaeKook commented Dec 13, 2021

Hello Sir,Thanks for your help.I have solved the problem.
First,I actually have three bad songs in my train data,It may be due to network error that the corresponding data is not uploaded correctly.
Second, I installed a global ffmpeg in my environment,not in virtual environment.
The above two steps have solved my problem. The problem is not in the demucs code.
Thanks for your help.

@adefossez
Copy link
Contributor

sounds good, I will close this issue then !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants