Bleuzen / SpotRec

Spotify desktop client recorder for PulseAudio
MIT License
76 stars 17 forks source link

Suddenly no recording possible anymore #21

Open thescooby opened 2 years ago

thescooby commented 2 years ago

After the change to pipewire (ubuntu 22.04) everything worked as expected! But suddenly - maybe because of a general ubuntu update - spotrec only generates empty files. When running with -d debug messages I get:

2022-10-03 19:12:39,508 - INFO - [Spotify] Song changed: Amongst Liars - Amongst Liars/01 - Amongst Liars - Cut It
2022-10-03 19:12:44,510 - INFO - [SpotRec] Starting recording
2022-10-03 19:12:44,511 - DEBUG - [Shell] run: dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
method return time=1664817164.562944 sender=:1.543 -> destination=:1.550 serial=95 reply_serial=2
2022-10-03 19:12:44,563 - DEBUG - [Shell] run: dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
method return time=1664817164.567402 sender=:1.543 -> destination=:1.551 serial=96 reply_serial=2
2022-10-03 19:12:44,568 - DEBUG - [Shell] Popen: ffmpeg -hide_banner -y -f pulse -ac 2 -ar 44100 -fragment_size 8820 -i spotrec.monitor -metadata artist='Amongst Liars' -metadata album='Amongst Liars' -metadata track=1 -metadata title='Cut It' -acodec mp3 -vn -b:a 192k './Amongst Liars - Amongst Liars/.01 - Amongst Liars - Cut It.mp3'
2022-10-03 19:12:44,568 - INFO - [FFmpeg] [115717] Recording started
2022-10-03 19:12:44,634 - INFO - [Spotify] State changed: Paused
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'spotrec.monitor':
  Duration: N/A, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
2022-10-03 19:12:44,819 - DEBUG - [Shell] run: dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
method return time=1664817164.822670 sender=:1.543 -> destination=:1.552 serial=101 reply_serial=2
2022-10-03 19:12:44,857 - INFO - [Spotify] State changed: Playing
spotrec.monitor: Generic error in an external library
Output #0, mp3, to './Amongst Liars - Amongst Liars/.01 - Amongst Liars - Cut It.mp3':
  Metadata:
    TPE1            : Amongst Liars
    TALB            : Amongst Liars
    TRCK            : 1
    TIT2            : Cut It
    TSSE            : Lavf58.76.100
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 192 kb/s
    Metadata:
      encoder         : Lavc58.134.100 libmp3lame
size=       1kB time=00:00:00.00 bitrate=N/A speed=   0x    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

Unfortunately the color get lost here. There is the line "spotrec.monitor: Generic error in an external library" that is marked red. I can also NOT find a recording stream in pavucontrol, but I guess this is a subsequent issue because of the generic error above.

Any glue how to debug deeper?

Aarkon commented 2 years ago

I'm on Manjaro and I experience the same as of today (without touching pipewire though). Files with 8.3 KByte are created, but obviously no data is written to them. I presume it's something related to ffmpeg, but that's just a wild guess.