Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wartool: "Could not find Warcraft 2 Data" #163

Closed
hasufell opened this issue Mar 3, 2016 · 20 comments
Closed

wartool: "Could not find Warcraft 2 Data" #163

hasufell opened this issue Mar 3, 2016 · 20 comments

Comments

@hasufell
Copy link

hasufell commented Mar 3, 2016

I have a warcraft 2 version with the following data files

# ls -l ~/warcraft2/data
total 21805
-r--r--r-- 1 root root   213855 Nov 27  1995 insmain.ins
-r--r--r-- 1 root root    12513 Nov 27  1995 insstr.ins
-r--r--r-- 1 root root  8459965 Nov 27  1995 maindat.war
-r--r--r-- 1 root root 50739616 Nov 27  1995 muddat.cud
-r--r--r-- 1 root root  1888714 Nov 27  1995 rezdat.war
-r--r--r-- 1 root root  4302671 Nov 27  1995 sfxdat.sud
-r--r--r-- 1 root root 23650135 Nov 27  1995 snddat.war
-r--r--r-- 1 root root    51451 Nov 27  1995 strdat.war

It doesn't appear to be the battle.net version. But wartool still fails with:

# wartool -m -v -r ~/warcraft2/data ~/.stratagus/wargus
Could not find Warcraft 2 Data

The thing is mounted via fuseiso. Any ideas?

@timfel
Copy link
Member

timfel commented Mar 4, 2016

The dir listing looks fine, but the error indicates that stat is failing to access the files (it's trying first for the Battle.net version, then the DOS version as rezdat.war, then REZDAT.WAR, then the mac version). Did you trying copying it to disk rather than going through fuseiso?

@hasufell
Copy link
Author

hasufell commented Mar 4, 2016

Did you trying copying it to disk rather than going through fuseiso?

I don't even have a cdrom drive anymore. I could try mounting via cdemu or so. But I'd think that wartool shouldn't depend on such a thing?

@timfel
Copy link
Member

timfel commented Mar 4, 2016

It shouldn't, and I have no idea why it should fail. But if you have mounted it through fuseiso, cp -R ~/warcraft2/ /tmp/warcraft2/ && wartool /tmp/warcraft2 /tmp/data.wc2 should work.

@hasufell
Copy link
Author

hasufell commented Mar 4, 2016

That does something indeed. So the /tmp/data.wc2 directory contains the whole thing I need?

@timfel
Copy link
Member

timfel commented Mar 4, 2016

Yes, it does.

@hasufell
Copy link
Author

hasufell commented Mar 4, 2016

So it's something with the arguments passed to wartool? Can this be documented somehow? wartool --help doesn't show anything and I can't find a manpage either.

@timfel
Copy link
Member

timfel commented Mar 4, 2016

Oh wait, no, I'm confused about war1tool vs wartool. wartool doesn't copy the scripts folder, you'll have to copy the scripts folder from the checkout to the data.wc2 directory, too.

@timfel
Copy link
Member

timfel commented Mar 4, 2016

wartool -h should work, and there is a man page in the doc directory. The only cmdline option that should not work in your setup is -r, because that needs the original cd.

@timfel
Copy link
Member

timfel commented Mar 4, 2016

and -m isn't a valid option (we should remove it)

@hasufell
Copy link
Author

hasufell commented Mar 4, 2016

abusing this ticket for another question:

Input #0, smk, from '/home/jule/.stratagus/wc2/videos/logo.smk':
  Duration: 00:00:11.67, start: 0.000000, bitrate: 544 kb/s
    Stream #0:0: Video: smackvideo (SMK2 / 0x324B4D53), pal8, 320x160, 12 tbr, 12 tbn, 12 tbc
    Stream #0:1: Audio: smackaudio (SMKA / 0x414B4D53), 22050 Hz, mono, u8

Can't convert video videos/logo to ogv format. Is ffmpeg2theora installed in PATH?

ffmpeg2theora is in PATH. What codecs/formats are used for the conversion here? Maybe my ffmpeg is missing something?

@hasufell
Copy link
Author

hasufell commented Mar 4, 2016

It appears the .smk files are not there, is that also because it's not directly executed on CD?

@timfel
Copy link
Member

timfel commented Mar 5, 2016

The smk files are deleted during the extraction process, they should have been converted by ffmpeg2theora (and since the output shows that it did figure out the codec, that suggests they were there when that command was run). No, the error message is misleading in this case. ffmpeg2theora did start, but exited with a non-zero exit code. If you're building from source, comment out line 2019 in wartool.cpp (remove(buf);). This will leave the smk files in the output folder. Then try to run ffmpeg2theora --optimize <path-to-smk> -o <some-output-ogv> and see what you get.

@hasufell
Copy link
Author

hasufell commented Mar 5, 2016

wow, I'm getting a segmentation fault:

(gdb) run --optimize "/home/jule/.stratagus/wc2/videos/logo.smk" -o "/home/jule/.stratagus/wc2/videos/logo.ogv"
Starting program: /usr/x86_64-pc-linux-gnu/bin/ffmpeg2theora --optimize "/home/jule/.stratagus/wc2/videos/logo.smk" -o "/home/jule/.stratagus/wc2/videos/logo.ogv"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/x86_64-pc-linux-gnu/lib/libthread_db.so.1".
Input #0, smk, from '/home/jule/.stratagus/wc2/videos/logo.smk':
  Duration: 00:00:11.67, start: 0.000000, bitrate: 544 kb/s
    Stream #0:0: Video: smackvideo (SMK2 / 0x324B4D53), pal8, 320x160, 12 tbr, 12 tbn, 12 tbc
    Stream #0:1: Audio: smackaudio (SMKA / 0x414B4D53), 22050 Hz, mono, u8


Program received signal SIGSEGV, Segmentation fault.
av_samples_fill_arrays (audio_data=0x0, linesize=0x7fffffffc4f0, 
    buf=0x6965c0 "", nb_channels=1, nb_samples=1024, 
    sample_fmt=AV_SAMPLE_FMT_FLTP, align=0) at libavutil/samplefmt.c:161
161 libavutil/samplefmt.c: No such file or directory.
(gdb) bt
#0  av_samples_fill_arrays (audio_data=0x0, linesize=0x7fffffffc4f0, 
    buf=0x6965c0 "", nb_channels=1, nb_samples=1024, 
    sample_fmt=AV_SAMPLE_FMT_FLTP, align=0) at libavutil/samplefmt.c:161
#1  0x00007ffff505ea24 in av_samples_alloc (audio_data=0x0, 
    linesize=0x7fffffffc4f0, nb_channels=1, nb_samples=1024, 
    sample_fmt=AV_SAMPLE_FMT_FLTP, align=0) at libavutil/samplefmt.c:184
#2  0x0000000000409eab in ff2theora_output (this=this@entry=0x619610)
    at src/ffmpeg2theora.c:1068
#3  0x000000000040485f in main (argc=<optimized out>, argv=<optimized out>)
    at src/ffmpeg2theora.c:3095

@timfel
Copy link
Member

timfel commented Mar 6, 2016

Interesting, so it's some problem with the specific ffmpeg2theora version.

@hasufell
Copy link
Author

hasufell commented Mar 6, 2016

It's 0.30, the lastest version.

@timfel
Copy link
Member

timfel commented Mar 6, 2016

Well, sounds like a bug in ffmpeg ;)

@timfel
Copy link
Member

timfel commented Mar 8, 2016

did you report the bug to ffmpeg? otherwise i can do it.

@hasufell
Copy link
Author

I did not... I am so lazy :(

@timfel
Copy link
Member

timfel commented Mar 15, 2016

I just reported it: https://bugs.launchpad.net/ffmpeg2theora/+bug/1557641. Let's see if they have time to look into it and what else we can do to help them.

@khronosschoty
Copy link

I'm having this issue with ffmpeg 3.4 using ffmpeg2theora on Slackware64-current. I'm using the latest stable wargus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants