#11354 closed defect (invalid)

Certain PlayStation STR complained "Invalid data"

Reported by: Joseph DeVore Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: psxstr
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description

Summary of the bug:
How to reproduce: use Avanti GUI (v0.9.2) to try and covert Sony PlayStation 1 .STR movie files..
I get the error message below.

ffmpeg version: FFmpeg-2024-12-14-win64-static
I tried the latest build from the 
built on ... idk?

error message:
Input #0, not reported and process canceled by FFmpeg with the message:

[in#0 @ 000001a21d256c00] Error opening input:

Invalid data found when processing input
Error opening input file Tales of Destiny 1 -- Opening.STR.
Error opening input files:

Invalid data found when processing input
---

https://github.com/BtbN/FFmpeg-Builds/releases
http://www.avanti.arrozcru.org/
I will try a newer up to date encoder called VidCoder not sure if it will help.

Change History (10)

comment:1 by Joseph DeVore, 20 months ago

VidCoder would not open the .STR files either...

I will say in the long past I used FFmpeg to open and convert the .STR files from that to .mp4 so
I could watch and relive my favorite moments of PlayStation RPG history.. my favorite games.. and so on.

comment:2 by MasterQuestionable, 20 months ago

Analyzed by developer: set
Cc: MasterQuestionable added
Component: avcodecavformat
Keywords: psxstr added
Summary: cannot open and convert PlayStation 1 .STR AV/movie files now.[Regression] PlayStation STR complained "Invalid data"

͏    This shall be a regression.
͏    Try ascertaining the exact regression window?
͏    (download the various FFmpeg builds and test out the last working)

͏    Refer also: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/psxstr.c

͏    Or probably just your specific input didn't work?

comment:3 by Joseph DeVore, 20 months ago

It must be a bad dump of the .STR files for Tales of Destiny 1 for PS1...
because I was able to re-convert the Wild ARMs 1 opening movie using the
AvantiGUI and FFmpeg build dated 07/13/2024 fine..

and will try out the latest build from today.
on the Wild ARMs 1 STR files and also then the Tales of Destiny.

I got these STR files from Tales of Destiny 1 PS1 game using the ISO browser (extract) feature in DuckStation PS1 emulator.

comment:4 by Joseph DeVore, 20 months ago

hmm nope.
it doesn't appear to be FFmpeg sry.
I am not sure why I got a bad dump of the .STR files...
the ISO dump appears to work fine in DuckStation.

tried using today's Windows binary build from GitHub..

FFmpeg-2024-12-16-win64-static
Wild ARMs converted fine but I could not open or convert Tales of Destiny files..
bummer.

comment:5 by Joseph DeVore, 20 months ago

"Invalid data found when processing input"
still tried using a new build from today of DuckStation..
I will make a bug report there too.

comment:6 by MasterQuestionable, 20 months ago

Summary: [Regression] PlayStation STR complained "Invalid data"Certain PlayStation STR complained "Invalid data"

͏    Alike formats tend to be cryptic and glitchy.
͏    Maybe the extractor didn't do anything special:
͏    Just the extracted file was somehow in sort unrecognized format..?

comment:7 by Joseph DeVore, 20 months ago

ooh maybe.. idk
bummer... ooh well..

comment:8 by Joseph DeVore, 20 months ago

this is what a person on the DuckStation Discord server had to say about what DuckStation's ISO browser did or does...


each sector on a CD is 2352 bytes
a data track on a playstation CD follows the CD-ROM XA standard, where there are two types of sectors, "mode 2 form 1" and "mode 2 form 2"
"mode 2 form 1" uses 2048 of those 2352 bytes for data and the rest for things like error correction, and this form is used for most data because CDs are unreliable and that error correction is really important if it's something like code
"mode 2 form 2" uses 2324 of those 2352 bytes for data, getting rid of the error correction in exchange for more space, and is generally used for compressed audio where small errors are not a big deal
so, most files on a PlayStation disc will use mode 2 form 1, with mode 2 form 2 only used for compressed audio, either on its own or within a video file
so each of those .STR files contains a mix of those two sector types
the problem you're running into is that DuckStation's ISO browser simply dumps 2048 bytes of data for every sector regardless of what type it is
whereas ffmpeg actually wants the full raw 2352 byte sectors
try dumping the files with jpsxdec instead


comment:9 by Joseph DeVore, 20 months ago

ok, I used jPSXdec
I was able to dump the full raw data and it converted fine this time..
with the latest build of FFMpeg and AvantiGUI..
so its not a bug in FFmpeg.

ty and sry for wasting anyones time.
this ticket can be closed now.

comment:10 by MasterQuestionable, 20 months ago

Resolution: invalid
Status: newclosed

͏    The information is regardless valuable.
[[
͏    Each sector on a CD is 2,352 Bytes.
͏    A data track on a PlayStation CD follows the CD-ROM XA standard:
͏    https://en.wikipedia.org/wiki/CD-ROM#XA
͏    .
͏    Where there are 2 types of sectors:
͏    |1| Mode 2 Form 1:
͏    Uses 2,048 of those 2,352 bytes for data; and the rest for things like error correction.
͏    This form is used for most data: because CD are unreliable and that error correction is really important, if it's something like code.
͏    |2| Mode 2 Form 2:
͏    Uses 2,324 of those 2,352 bytes for data: getting rid of the error correction in exchange for more space.
͏    Generally used for compressed audio where small errors are not a big deal.

͏    So, most files on a PlayStation disc will use Mode 2 Form 1:
͏    With Mode 2 Form 2 only used for compressed audio, either on its own or within a video file.
͏    So each of those STR files contains a mix of those 2 sector types.

͏    The problem you're running into is that:
͏    DuckStation's ISO browser simply dumps 2,048 Bytes of data for every sector, regardless of what type it is.
͏    Whereas FFmpeg actually wants the full raw 2,352 Bytes sectors.

͏    Try dumping the files with jPSXdec instead.
]]

Note: See TracTickets for help on using tickets.