freyr-js icon indicating copy to clipboard operation
freyr-js copied to clipboard

Error while encoding audio

Open AlainBuy opened this issue 2 years ago • 9 comments

Hi folks, I successfully installed Freyr-js (not without pain though) but when executing I get the message;

spotify:track:6mHOKXC2w4AwLGIWQ3pRnp] (failed: Error while encoding audio [ffmpeg exited with code 1: /tmp/fr3yrcach3/freyrcli-98d7a2551bdec700c8736abb52f71250.x4a: No such file or directory

So it looks like I did get the images but not the audio files. In the stats I did not get an error: e.g.

  • [07 Make That Sound]
      | ➤ Collating sources...
      |  ➤ [•] YouTube Music...[success, found 1 source]
      | ➤ Awaiting audiofeeds...[done] 
      | [✓] Got album art 
      | [✓] Got raw track file 
      | [•] Post Processing...

maybe someone can quickly tell me how to fix it?

Thanks!

AlainBuy avatar Mar 15 '22 11:03 AlainBuy

That's an interesting error, can you try deleting the cache folder and retrying? If you still have this error, please include the full logs.

$ rm -rf /tmp/fr3yrcach3
$ freyr spotify:track:6mHOKXC2w4AwLGIWQ3pRnp

miraclx avatar Mar 15 '22 14:03 miraclx

Bump. I'll close this issue in 7 days if there's no update.

miraclx avatar Jun 08 '22 21:06 miraclx

Hi,

looks like I am still further from achieving. I get

Checking directory permissions...[done] 
[spotify:track:5FNS5Vj69AhRGJWjhrAd01]
 [•] Identifying service...[Spotify]
 [•] Checking authentication...[unauthenticated]
 [Spotify Login]
  [•] Logging in...(failed: [connect ETIMEDOUT 2600:1901:1:c36:::443]) 
  [•] Attempting to open [ http://localhost:36346 ] within browser...[done] 
  [•] Awaiting user authentication...(failed: [connect ETIMEDOUT 2600:1901:1:c36:::443]) 
[✕] Failed to authenticate client!
============ Stats ============
 [•] Runtime: [4m 28.6s]
 [•] Total queries: [01]
 [•] Total tracks: [00]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [00]
 [•] Output directory: [.]
 [•] Cover Art: cover.png (640x640)
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 0.00 B
     ♫ Media: 0.00 B
     ➤ Album Art: 0.00 B
 [•] Output bitrate: 320k

While I am logged in Spotify and I get a screen in my browser image which says I am succesfully authenticated.

AlainBuy avatar Jun 09 '22 10:06 AlainBuy

Hi there, so I'm not sure the state of things on your end, but there seems to be some inconsistencies with the config.

In freyr's attempt to reconcile that, it launches a local server for handling spotify authentication callback, but you seem to not be using ipv4? Anyway, freyr ends up confused and fails.

How about this, let's reset the freyr session config by deleting the file.

$ rm ~/.config/FreyrCLI/d3fault.x4p

Also remove the temp media artifacts cache

$ rm -rf /tmp/fr3yrcach3

And then retry freyr

$ freyr spotify:track:6mHOKXC2w4AwLGIWQ3pRnp

If this still doesn't work, how about you consider using docker?

https://hub.docker.com/r/freyrcli/freyrjs/tags

miraclx avatar Jun 14 '22 21:06 miraclx

no luck,

(base) alain@alain-Linux:~$ rm ~/.config/FreyrCLI/d3fault.x4p
(base) alain@alain-Linux:~$ rm -rf /tmp/fr3yrcach3
(base) alain@alain-Linux:~$ freyr spotify:track:6mHOKXC2w4AwLGIWQ3pRnp
    ____                    
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /    
/_/ /_/   \___/\__, /_/     
              /____/ v0.6.0

freyr - (c) Miraculous Owonubi <[email protected]>
------------------------------------------------------
Checking directory permissions...[done] 
[spotify:track:6mHOKXC2w4AwLGIWQ3pRnp]
 [•] Identifying service...[Spotify]
 [•] Checking authentication...[unauthenticated]
 [Spotify Login]
  [•] Logging in...(failed: [connect ETIMEDOUT 2600:1901:1:c36:::443]) 
  [•] Attempting to open [ http://localhost:36346 ] within browser...[done] 
  [•] Awaiting user authentication...(failed: [connect ETIMEDOUT 2600:1901:1:c36:::443]) 
[✕] Failed to authenticate client!
============ Stats ============
 [•] Runtime: [4m 21.8s]
 [•] Total queries: [01]
 [•] Total tracks: [00]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [00]
 [•] Output directory: [.]
 [•] Cover Art: cover.png (640x640)
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 0.00 B
     ♫ Media: 0.00 B
     ➤ Album Art: 0.00 B
 [•] Output bitrate: 320k
===============================

AlainBuy avatar Jun 18 '22 13:06 AlainBuy

I give up....

AlainBuy avatar Jun 18 '22 13:06 AlainBuy

Hey @AlainBuy sorry about the hiccup. No one else has had this issue before so it's hard to pinpoint what's wrong. How about you use docker instead?

miraclx avatar Jun 18 '22 13:06 miraclx

Following up, did you manage to try docker?

miraclx avatar Jun 23 '22 01:06 miraclx

Bump, I'll have to close this if I don't get any feedback.

miraclx avatar Aug 04 '22 05:08 miraclx

Hey @AlainBuy sorry about the hiccup. No one else has had this issue before so it's hard to pinpoint what's wrong. How about you use docker instead?

I do now, after having some issues while installing node.

<Checking directory permissions...[done] 
[spotify:track:6mHOKXC2w4AwLGIWQ3pRnp]
 [•] Identifying service...[Spotify]
 [•] Checking authentication...[authenticated]
 Detected [track]
 Obtaining track metadata...[done] 
  ➤ Title: World Party
  ➤ Album: Endless
  ➤ Artist: GOOSE
  ➤ Year: 2022
  ➤ Playtime: 03:13
 [•] Collating...
 • [05 World Party]
    | ➤ Collating sources...
    |  ➤ [•] YouTube Music...[success, found 1 source]
    | ➤ Awaiting audiofeeds...[done] 
    | {i} Resuming at 66105
    | [✓] Got album art 
    | [✓] Got raw track file 
    | [•] Post Processing...
 [•] Download Complete
 [•] Embedding Metadata...
  • [✕] 05 World Party [spotify:track:6mHOKXC2w4AwLGIWQ3pRnp] (failed: Error while encoding audio [ffmpeg exited with code 1: Output #0, ipod, to 'GOOSE/Endless/05 World Party.m4a':
Output file #0 does not contain any stream
])
[•] Collation Complete>

I've tried to clear cache as you said, but there were no improvements.

perchenonva avatar Aug 05 '22 12:08 perchenonva

It's a different error every time. Just use the docker image.

miraclx avatar Aug 05 '22 16:08 miraclx

It's a different error every time. Just use the docker image.

Yeah but I mean it won't solve the problem other members could face 🤣 Freyr is installed correctly...

perchenonva avatar Aug 05 '22 17:08 perchenonva

Yeah so no one else has this issue. That's the issue. And I've tested freyr on as many systems I could get my hands on. If my local tests work, CI passes, docker works.. it must be something with your setup. Cause the issue is not reproducible.

miraclx avatar Aug 05 '22 18:08 miraclx

I am currently experiencing this issue now, unsure if it has to do with my ffmpeg (I am currently running ffmpeg version 2022-07-06-git-03d81a044a-full_build-www.gyan.dev).

C:\Users\sterl>freyr https://open.spotify.com/track/0uB4bNmZDCSY6ieUdJyDPq?si=e7699f84bd0b40d4
    ____
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /
/_/ /_/   \___/\__, /_/
              /____/ v0.8.1

freyr - (c) Miraculous Owonubi <[email protected]>
------------------------------------------------------
Checking directory permissions...[done]
[https://open.spotify.com/track/0uB4bNmZDCSY6ieUdJyDPq?si=e7699f84bd0b40d4]
 [•] Identifying service...[Spotify]
 [•] Checking authentication...[authenticated]
 Detected [track]
 Obtaining track metadata...[done]
  ➤ Title: Look How Far We've Come
  ➤ Album: It’s Time EP
  ➤ Artist: Imagine Dragons
  ➤ Year: 2011
  ➤ Playtime: 04:07
 [•] Collating...
 • [07 Look How Far We've Come]
    | ➤ Collating sources...
    |  ➤ [•] YouTube Music...[success, found 5 sources]
    | ➤ Awaiting audiofeeds...[done]
    | [✓] Got album art
    | [✓] Got raw track file
    | [•] Post Processing...
 [•] Download Complete
 [•] Embedding Metadata...
  • [✕] 07 Look How Far We've Come [spotify:track:0uB4bNmZDCSY6ieUdJyDPq] (failed: Error while encoding audio [ffmpeg exited with code 1: Output #0, ipod, to 'Imagine Dragons\It’s Time EP\07 Look How Far We've Come.m4a':
Output file #0 does not contain any stream
])
[•] Collation Complete
============ Stats ============
 [•] Runtime: [5.9s]
 [•] Total queries: [01]
 [•] Total tracks: [01]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [01]
 [•] Output directory: [.]
 [•] Cover Art: cover.png (640x640)
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 267.23 KB
     ♫ Media: 12.72 KB
     ➤ Album Art: 254.51 KB
 [•] Output bitrate: 320k
===============================

After doing a little research, some people mentioned moving the -i flag to the very end of the command right before the output, but I'm not sure if that's a proper solution

Smaltin avatar Aug 05 '22 22:08 Smaltin

I am currently experiencing this issue now, unsure if it has to do with my ffmpeg (I am currently running ffmpeg version 2022-07-06-git-03d81a044a-full_build-www.gyan.dev).

C:\Users\sterl>freyr https://open.spotify.com/track/0uB4bNmZDCSY6ieUdJyDPq?si=e7699f84bd0b40d4
    ____
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /
/_/ /_/   \___/\__, /_/
              /____/ v0.8.1

freyr - (c) Miraculous Owonubi <[email protected]>
------------------------------------------------------
Checking directory permissions...[done]
[https://open.spotify.com/track/0uB4bNmZDCSY6ieUdJyDPq?si=e7699f84bd0b40d4]
 [•] Identifying service...[Spotify]
 [•] Checking authentication...[authenticated]
 Detected [track]
 Obtaining track metadata...[done]
  ➤ Title: Look How Far We've Come
  ➤ Album: It’s Time EP
  ➤ Artist: Imagine Dragons
  ➤ Year: 2011
  ➤ Playtime: 04:07
 [•] Collating...
 • [07 Look How Far We've Come]
    | ➤ Collating sources...
    |  ➤ [•] YouTube Music...[success, found 5 sources]
    | ➤ Awaiting audiofeeds...[done]
    | [✓] Got album art
    | [✓] Got raw track file
    | [•] Post Processing...
 [•] Download Complete
 [•] Embedding Metadata...
  • [✕] 07 Look How Far We've Come [spotify:track:0uB4bNmZDCSY6ieUdJyDPq] (failed: Error while encoding audio [ffmpeg exited with code 1: Output #0, ipod, to 'Imagine Dragons\It’s Time EP\07 Look How Far We've Come.m4a':
Output file #0 does not contain any stream
])
[•] Collation Complete
============ Stats ============
 [•] Runtime: [5.9s]
 [•] Total queries: [01]
 [•] Total tracks: [01]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [01]
 [•] Output directory: [.]
 [•] Cover Art: cover.png (640x640)
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 267.23 KB
     ♫ Media: 12.72 KB
     ➤ Album Art: 254.51 KB
 [•] Output bitrate: 320k
===============================

After doing a little research, some people mentioned moving the -i flag to the very end of the command right before the output, but I'm not sure if that's a proper solution

@miraclx what about now?

perchenonva avatar Aug 06 '22 12:08 perchenonva

Interesting. Give me a sec, let me see if I can reproduce this issue locally. Because CI doesn't have it.

miraclx avatar Aug 06 '22 12:08 miraclx

@perchenonva, @Smaltin, fixed in #299

miraclx avatar Aug 06 '22 13:08 miraclx

Needs reopening, I'm getting this issue now. Installed via yarn~

root@hostname /music # freyr -v
v0.8.1
freyr - (c) Miraculous Owonubi <[email protected]>
------------------------------------------------------
Checking directory permissions...[done]
[https://open.spotify.com/track/6Tsu3OsuMz4KEGKbOYd6A0?si=8314546f7d194cf9]
 [•] Identifying service...[Spotify]
 [•] Checking authentication...[authenticated]
 Detected [track]
 Obtaining track metadata...[done]
  ➤ Title: Hypnotize - 2007 Remaster
  ➤ Album: Greatest Hits
  ➤ Artist: The Notorious B.I.G.
  ➤ Year: 2007
  ➤ Playtime: 03:50
 [•] Collating...
 • [03 Hypnotize - 2007 Remaster]
    | ➤ Collating sources...
    |  ➤ [•] YouTube Music...[success, found 1 source]
    | ➤ Awaiting audiofeeds...[done]
    | {i} Resuming at 109044
    | [✓] Got album art
    | [✓] Got raw track file
    | [•] Post Processing...
 [•] Download Complete
 [•] Embedding Metadata...
  • [✕] 03 Hypnotize - 2007 Remaster [spotify:track:6Tsu3OsuMz4KEGKbOYd6A0] (failed: Error while encoding audio [ffmpeg exited with code 1: Output #0, ipod, to 'The Notorious B.I.G/Greatest Hits/03 Hypnotize - 2007 Remaster.m4a':
Output file #0 does not contain any stream
])
[•] Collation Complete
============ Stats ============
 [•] Runtime: [3.1s]
 [•] Total queries: [01]
 [•] Total tracks: [01]
     » Skipped: [00]
     ✓ Passed:  [00]
     ✕ Failed:  [01]
 [•] Output directory: [.]
 [•] Cover Art: cover.png (640x640)
 [•] Total Output size: 0.00 B
 [•] Total Network Usage: 21.52 KB
     ♫ Media: 21.52 KB
     ➤ Album Art: 0.00 B
 [•] Output bitrate: 320k
===============================

Hi-ImKyle avatar Sep 12 '22 21:09 Hi-ImKyle

It's been fixed, but a new release hasn't been cut. If you want to use the fix before the release, you have to point to the latest master on GitHub

$ yarn install miraclx/freyr-js#master

Or use the latest release of the git docker image

$ docker pull freyrcli/freyrjs-git:master

I'm still working on a few things under the radar before I finally cut v0.8.2 but it's coming soon.

miraclx avatar Sep 13 '22 13:09 miraclx