AIMP Forum

AIMP for Windows => Вопросы / Questions => Topic started by: Biff on April 17, 2021, 11:59:44

Title: How can one play a shn file / track?
Post by: Biff on April 17, 2021, 11:59:44
How can one play a shn file / track?
Title: Re: How can one play a shn file / track?
Post by: Artem on April 17, 2021, 13:48:01
No
Title: Re: How can one play a shn file / track?
Post by: Biff on April 17, 2021, 20:19:39
Why is that?
Title: Re: How can one play a shn file / track?
Post by: Artem on April 17, 2021, 20:20:43
Because this file format doesn't supported by a player
Title: Re: How can one play a shn file / track?
Post by: Biff on April 17, 2021, 21:10:02
Yes, but why?
Title: Re: How can one play a shn file / track?
Post by: Artem on April 17, 2021, 21:17:19
Yes, but why?

But why it should? Is it popular file format?
Title: Re: How can one play a shn file / track?
Post by: Biff on April 17, 2021, 22:18:07
Quote
But why it should?
Because I want to play such files.

Quote
Is it popular file format?
Sorry, I do not have any idea, I had never heard of it.

Title: Re: How can one play a shn file / track?
Post by: sveakul on April 18, 2021, 02:03:38
Biff:  you can convert shn files to flac easy if you have ffmpeg installed by using the following command line in the folder you have the shn(s) in:

Code: [Select]
for /r %i in (*.shn) do ffmpeg -i "%~ni%~xi" "%~ni.flac"
Code assumes you have ffmpeg in your Windows path environment variable, or have ffmpeg.exe in the same folder as the shn's.
Title: Re: How can one play a shn file / track?
Post by: Biff on April 18, 2021, 09:17:38
OK. But sorry, what do I have to do with that code?

And it goes without quality loss?
Title: Re: How can one play a shn file / track?
Post by: sveakul on April 18, 2021, 20:20:43
OK. But sorry, what do I have to do with that code?
And it goes without quality loss?
Yes there is no loss of quality it just goes from one lossless format (shn) to another (flac).

I don't know if you already have ffmpeg.exe;  if you don't, you can download the 4.4 release version here: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z (https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z) .  Then extract just ffmpeg.exe from the package (it's inside the "bin" subfolder) to the folder where the shn files are.

Now open a command window inside that folder.  Depending on your OS (7,8,10) there are various ways to do that.  If you have 10, right-click the Start button and choose "Command prompt", then change the path in the command window to the folder where the shn files are, for example at the prompt type "cd c:\shn" (no quotes).  Then the command line window will show "c:\shn>".  Now copy the code, and paste it into the command window at the prompt.  Then hit enter.  All the *.shn files in the folder will be converted to flac files, keeping the original shn's, which you can delete if you want after the operation.

You could also make a batch file to do this but then the command syntax changes to this:

Code: [Select]
for /r %%i in (*.shn) do ffmpeg -i "%%~ni%%~xi" "%%~ni.flac"
pause

Copy the above code into a text file, then change the *.txt extension to *.bat, like "shn-to-flac.bat", and put it along with ffmpeg.exe in the folder with the shn's, and double-click it to do the conversion.  This way there is no need to open a command window.

Title: Re: How can one play a shn file / track?
Post by: Biff on April 18, 2021, 22:01:56
Ah, great, tried both variants, worked right away very easily. So I now have that bat file and so I just need to copy it to the folders the shns are in and double click that bat.

Thank you very much!
Title: Re: How can one play a shn file / track?
Post by: sveakul on April 18, 2021, 22:33:20
Ah, great, tried both variants, worked right away very easily. So I now have that bat file and so I just need to copy it to the folders the shns are in and double click that bat.
Thank you very much!

Glad to help.  Yes, you can put the bat file in any folder that has shns and it will work, as long as ffmpeg.exe is also in that folder or in your Windows environment path variable (the latter would always be the case if you just kept ffmpeg.exe in your c:\Windows or c:\Windows\System32 folder).
Title: Re: How can one play a shn file / track?
Post by: Biff on April 18, 2021, 22:52:16
Yes, sorry, forgot to mention to alway copy ffmpeg.exe along with the bat file to the folders the shns are in.

OK, and a third varaint. Keeping in / copying ffmpeg.exe to those folders on C:.

Many thanks again.