Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Miles Edgeworth

Has anyone created custom tracks for PSP on Linux?

Recommended Posts

Miles Edgeworth

GTA:LCS didn't support simply MP3s or OGGs. Instead, R* released a tool to convert Audio CD to the custom format recognizable by the game. However, a much more convenient way (just using MP3s or WAVs) was made by Codemasters and available online as Codemasters_EACSetup.zip. The result is a WAV container with ATRAC3 proprietary audio codec:

General
Complete name                            : Running in the 90s (Initial D).gta
Format                                   : Wave
File size                                : 4.49 MiB
Duration                                 : 4 min 44 s
Overall bit rate                         : 132 kb/s
FileExtension_Invalid                    : act at9 wav

Audio
Format                                   : Atrac3
Format/Info                              : Adaptive Transform Acoustic Coding 3
Codec ID                                 : 270
Codec ID/Hint                            : Sony
Duration                                 : 4 min 44 s
Bit rate                                 : 132 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Compression mode                         : Lossy
Stream size                              : 4.49 MiB (100%)

Now, what's the problem? This encoder is Windows-only and using Wine isn't exactly a solution. That's why I tried to make a Bash script to do the job:

#!/bin/bash
# parameters: "video link" "name"
mkdir /tmp/gtamusic
path="$PWD"
cd /tmp/gtamusic || exit
youtube-dl "$1" -x -o "1.out"                                                # download an audio file
if [ "$(mediainfo --Output='Audio;%SamplingRate%' "1.*")" != "44100" ]; then # ATRAC3 doesn't support 48 kHz, so we need to convert if necessary
    for i in 1.*; do                                                         # youtube-dl keeps changing extension of YouTube audio, often to OPUS, so we guess
        ffmpeg -i "$i" -ar 44100 "2.wav"                                     # WAV is the safest option
    done
    atracdenc -e atrac3 -i "2.wav" -o "3.at3"                                # convert to ATRAC3
else
    atracdenc -e atrac3 -i "1.*" -o "3.at3"                                  # convert to ATRAC3
fi
cd "$path" || exit
ffmpeg -i "/tmp/gtamusic/3.at3" -f wav -acodec copy -bitexact "$2.gta"       # pack in WAV container
rm -rf /tmp/gtamusic

Obviously, since I'm making this topic, this doesn't work, GTA just skips the song. I looked at the headers and one thing that caught my eye was that func block is 8 bytes long in working files and contain 00 04 00 00 as the last four bytes. Files created by this script have this block 4 bytes long, adding 00 04 00 00 and changing sizes of segments didn't make it work. According to some random site about RIFF, this part contains info about number of samples, so I assume it depends on song length.

I suspect the culprit here is the encoder with its "WARNING: ATRAC3 is uncompleted, result will be not good )))" string, but since the console will be 15 this year, GTA: LCS - 14, I wonder - was someone better than me and managed to create a working file?

Share this post


Link to post
Share on other sites
Helegad

 

Try this guide. Use a Windows XP VM.

Share this post


Link to post
Share on other sites
Miles Edgeworth

That's exactly what I'm doing right now, but with much less steps (this tutorial is really bad if you ask me, very technical where it shouldn't be in the first place), as stated in my 1st paragraph.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.