Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unspecified error "[ERROR] Couldn't write to:" when handling .m4a files #135

Open
Sammala opened this issue Nov 19, 2024 · 3 comments
Open

Comments

@Sammala
Copy link

Sammala commented Nov 19, 2024

I'm currently adding RG tags to my entire audio library. For most files this worked fine, but I can't add RG tags to any .m4a files using rsgain v3.5.3.

ffprobe output of an example file that I get the error [ERROR] Couldn't write to: [Filepath] with (ignore the existing RG tags, I checked to see if MusicBee was able to add tags and it worked just fine):

ffprobe -i "Now We Are Free - Gladiator.m4a"

ffprobe version 7.1-essentials_build-www.gyan.dev Copyright (c) 2007-2024 the FFmpeg developers
  built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.100 / 61. 19.100
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Now We Are Free - Gladiator.m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: isomiso2
    encoder         : Lavf58.29.100
    replaygain_track_gain: +0.17 dB
    replaygain_track_peak: 1.011301
    replaygain_album_gain: +0.17 dB
    replaygain_album_peak: 1.011301
  Duration: 00:04:14.12, start: 0.000000, bitrate: 255 kb/s
  Stream #0:0[0x1](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 253 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
      Side data:
        replaygain: track gain - 0.170000, track peak - 0.000024, album gain - 0.170000, album peak - 0.000024,

The .bat file I'm using to run rsgain:

@echo off
setlocal

cd /d "%~dp0"
set "currentDir=%cd%"

"C:\Users\user\Programme\RSGain\rsgain.exe" easy -p "C:\Users\user\Programme\RSGain\presets\EigeneStandard.ini" "%currentDir%"

pause
endlocal

(The error also happens when I run the rsgain command directly.)

The output I get is:

[OK] Applying preset 'C:\Users\user\Programme\RSGain\presets\EigeneStandard.ini'...
[OK] Building directory tree...
[OK] Found 1 directory...
[OK] Scanning directory for files..._
[OK] Scanning 'E:\Daten\Eigene Musik\test\Now We Are Free - Gladiator.m4a'
[OK] Container: QuickTime / MOV [mov,mp4,m4a,3gp,3g2,mj2]
[OK] Stream #0: AAC (Advanced Audio Coding), 44.100 Hz, 2 ch
 100% [================================================]
[ERROR] Couldn't write to: E:\Daten\Eigene Musik\test\Now We Are Free - Gladiator.m4a

Track: E:\Daten\Eigene Musik\test\Now We Are Free - Gladiator.m4a
  Loudness:   -18.16 LUFS
  Peak:     1.000000 (0.00 dB)
  Gain:         0.00 dB  (adjusted to prevent clipping)

Album:
  Loudness:   -18.16 LUFS
  Peak:     1.000000 (0.00 dB)
  Gain:         0.00 dB  (adjusted to prevent clipping)

Scanning Complete
Time Elapsed:      00:00:00
Files Scanned:     1
Clip Adjustments:  1 (100.0% of files)
Average Gain:      0.00 dB
Average Peak:      1.000000 (0.00 dB)
Negative Gains:    0 (0.0% of files)
Positive Gains:    1 (100.0% of files)

My .ini looks like this:

[Global]
TagMode=i
Album=true
TargetLoudness=-18
ClipMode=p
MaxPeakLevel=0.0
TruePeak=false
Lowercase=false
ID3v2Version=keep
OpusMode=s
PreserveMtimes=true

MusicBee and foobar2000 tag the file without any errors or warnings. The file is also not set to read-only, and the problem occurs with any .m4a file that I have. I'm on Windows 10 and the E: drive is a local NTFS-formatted SSD.

Let me know if you'd like any more infos.

@complexlogic
Copy link
Owner

I'm unable to reproduce this. Can you upload the file so I can inspect it?

@Sammala
Copy link
Author

Sammala commented Nov 20, 2024

@complexlogic
Copy link
Owner

I can't access the file. Are you sure the password is correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants