phileday / whirligig-old-issues

Whirligig Media Player bug tracking
0 stars 0 forks source link

Bug (serious): long file names cannot be played (again) #34

Open cheater opened 5 years ago

cheater commented 5 years ago

Files with long file names cannot be played with DirectShow or Media Foundation, but can be played with Videolan. Bug exists in 4.752. Those files were playable before. Shortening the file paths makes it possible to play the videos.

phileday commented 4 years ago

Very likely to be the change in Unity3D from 2019 back to 2018. The reason for the reversion was to solve a larger issue with colour in Directshow. The people at AVpro are working on it and once they've updated their plugin I'll update to 2019 again and hopefully this will fix it.

cheater commented 4 years ago

Bug still exists in the beta version "early access v4.787".

phileday commented 4 years ago

Thanks for letting me know. It's odd that it stopped being a problem when I initially updated to 2019 (although had to revert back to 2018) but now is a problem again.

Well Renderheads has updated their video plugin. So I'll be updating and testing that as well.

Something that would be good from you is if you could give me an exact path and filename that fails on your system. I can make one myself but if I can recreate you issue exactly I know I'm running into the same problem you are.

I'll look into this tonight and let you know how I get on.

cheater commented 4 years ago

I don't think it has stopped being a problem at all.

If you want to make a video that doesn't work with whirligig just do the following:

  1. go to the root of your drive. create a folder called x.
  2. copy in a video. call it x.mp4, or something like that (keep the extension it had before)
  3. rename the video. don't remove the extension. press the left arrow to go to the beginning. press and hold x until Explorer starts beeping and press enter. this is the max name length it will give you.
  4. go up. rename the folder. give it the max length name it will give you.

That's it. That should be difficult enough for Whirligig to play. Some programs can open files like that (eg utorrent will do it), and some won't (eg VLC will also have problems).

Looking at the bug tracker, it would be nice if I could contribute to the source code. There's a bunch of small bugs I could likely fix without too much help understanding the source code. I don't want anyone's plugins or anything, I just want the player to have features I've wanted for over a year now :) I have a good job and that pays my bills, so i don't need to take someone's plugins or anything :)

phileday commented 4 years ago

Hi

So I've uploaded a new version (Over the old one "whirligig_early_access_v.4.787_unity2019" I need to work out the order of the betas) which with any luck should fix the long filename issue.

This turned out to be much more complicated than I thought as the issue wasn't the Unity version or API compatibility level but the way in which files are passed that are beyond 259 characters.

It seems that a way to fix this is to add "\?\" to the beginning of file names before loading and checking they exist. However the problem didn't stop there as this only works if the path string doesn't have ".." or "\" in it, which isn't a problem for all previous checking etc. Also AVPro that runs the Media Foundation and DirectShow also adds this so adding prior to loading makes that fail where it is needed in all other cases.

All this considered I've created a function that should fix this and in my initial tests it seems to be working. I do need to check quite a few things now though as it has caused quite a bit of code changing.

So check out the latest upload and see if it helps. Fingers crossed it does as it seems to be working my end.

Regarding help with the coding. I still need to go through the Github issues and tick off ones that I've fixed or need to address. If I need any help I'll let you know. Regarding issues let me know which one you would be interested in me fixing/addressing next.

All the best and thanks for the help.

Phil

cheater commented 4 years ago

If AVPro adds the \? to the string, then you should definitely request an api enhancement for operations that take the long path format. Otherwise, AVPro will be making other assumptions about the file path than you are, which will for sure result in issues.

Please make sure that you've updated all variables you store paths in, so that they can hold 32767 unicode characters (+string termination). This could otherwise make WG blow up.

There's a bunch of issues that I think are most important. If you made me a collaborator in this github repository, I could assign labels and prioritize them so you can just look at the bug list and sort by priority.

Regarding help with coding. There's a bunch of relatively large requests that you'll unlikely do in the foreseeable future, since as you say your time is limited. For example, more advanced controller layouts, with layers and modes that several people have requested, and just generally more bindings for more functions. That looks like something I could take on right away. I have no reason to re-release the program under my own name or anything like that, I just want this to happen before the heat death of the universe :) I understand you're busy, but if you're busy, AND at the same time there are requests that take a lot of time, then we're in a situation where those requests will never be filled and people will be left with a program that only fulfills part of the functionality they wish they had. Hoping for coding spurs during weekends or holidays isn't really a plan to address that either, I know what it's like myself, if you've been doing a lot of coding in your day job then sometimes you just can't do anything to force yourself to code on a side project.

cheater commented 4 years ago

Regarding long file names, did you remember to change the functionality of playlists? Will playlists now store long file names? What happens with playlists that exist already?

Personally I think playlists should hold file paths with the \? format, and if a playlist is encountered that does something else, it should be updated.

cheater commented 4 years ago

As for what issues seem the most important right now, I think clearly #46 (Critical bug: Video playing at wrong speed, out of sync with audio) is the most important one right now. This seems to happen on a bunch of videos now.

The next bug that's probably most important is #26 (basic file search). It would add a lot of usability to Whirligig. This is something a bunch of people have requested. It could take a bunch of time, and it's something I could probably do.

It looks like this could be very quick and easy and have a bunch of impact on usability: #48 (Serious bug: Playlist: drag and drop of multiple files doesn't work). It's something you could do, or something I can imagine I could do as well.

Then either of those are probably all equally annoying:

Then, those are probably next:

65 (mouse binding support) would be a pretty big win for usability, but it's involved. I could probably implement that one.

Then there's 60 issues in total that I could help with. Most of them look like they haven't been worked on, I went through all of them and updated them over the last 2-3 hours with new info, and I also added new issues as well.

cheater commented 4 years ago

(note I edited the list of bugs that could be worked on above, if you're checking this via email)

phileday commented 4 years ago

If AVPro adds the ? to the string, then you should definitely request an api enhancement for operations that take the long path format. Otherwise, AVPro will be making other assumptions about the file path than you are, which will for sure result in issues.

Please make sure that you've updated all variables you store paths in, so that they can hold 32767 unicode characters (+string termination). This could otherwise make WG blow up.

There's a bunch of issues that I think are most important. If you made me a collaborator in this github repository, I could assign labels and prioritize them so you can just look at the bug list and sort by priority.

Regarding help with coding. There's a bunch of relatively large requests that you'll unlikely do in the foreseeable future, since as you say your time is limited. For example, more advanced controller layouts, with layers and modes that several people have requested, and just generally more bindings for more functions. That looks like something I could take on right away. I have no reason to re-release the program under my own name or anything like that, I just want this to happen before the heat death of the universe :) I understand you're busy, but if you're busy, AND at the same time there are requests that take a lot of time, then we're in a situation where those requests will never be filled and people will be left with a program that only fulfills part of the functionality they wish they had. Hoping for coding spurs during weekends or holidays isn't really a plan to address that either, I know what it's like myself, if you've been doing a lot of coding in your day job then sometimes you just can't do anything to force yourself to code on a side project.

Regarding AVPro it does add the ? to the string but as I have different functions for the different ways that things open I've allowed for that. The function I've made allows me to add or not add this depending on it's uses.

I've also gone through and updated all the code that should require it. As file.exist also requires this to work properly there are quite a few. Although it should work those elements need testing.

Regarding help with coding. This is very much my project and there is a lot in it beyond the video player that isn't used yet. I've in the past reached out to people to help with aspects of coding when adding new features, examples of this include the addition of subtitle support, shader development and desktop mirroring. I've done my best to pay people when they've helped out but strangely they often don't want to be paid which is a shame as I very much appreciate the time they've put in to help. I'm very happy to do this and when the needs arise and I am working on aspects of the player where I need help I'll ask you. Regarding Github, I do need to sort this out, I've not got a great deal of experience with Github but I've just opened a new issues thing for the project I'm working on that's freelance. This means I'll have a lot more time to learn this as I'll need to know it for that job. It will be a good opportunity for me update these and mine at the same time. Thanks for the offer though.

Regarding my time on Whirligig. This has fallen off this year but not intentionally. Personal and work commitments have meant the time I wished to spend on it hasn't happened. This isn't to say that I am no longer working on it. I just need to get back into a routine that allows me to get on top of what I'm doing.

I don't know if you're aware but Whirligig is actually a games engine I've built inside of the Unity engine. It's core is a video player but it's got a host of functions that allows it to be used to create games. Here is the page which explains this a bit more: https://www.whirligig-productions.xyz/

This is something I really want to get back into. So development on this player is very much not ended. Hopefully it's just been on hold for a little while.

cheater commented 4 years ago

That's pretty cool.

Regarding help with coding, all I want is for this project to move forward, because right now there are 62 tickets open. And they are all stuff that's been missing for a year or more. I understand it's not intentional but whether it is or not the project is just not progressing with only one person. So please just let me help you push this forward. There's clear things that need to be done so you don't have to reach out to me regarding specific things. If I see something I think I would like to work on I'll let you know, talk to you about how to best go about doing it, and make a fork of the code. Then you can incorporate it into the main version. But the way things are going right now the player is just not going to go forward ever. You should have the ability to look back at the last year and admit that progress has been slow even despite best intentions. I'm not faulting you for not having time, everyone has their life and shit happens, but if you're being given help for free and still say no, that's hard to understand. Let's get going on this and let us work together to get features implemented in the player because quite honestly the feature set is super stagnant.

phileday commented 4 years ago

As for what issues seem the most important right now, I think clearly #46 (Critical bug: Video playing at wrong speed, out of sync with audio) is the most important one right now. This seems to happen on a bunch of videos now.

The next bug that's probably most important is #26 (basic file search). It would add a lot of usability to Whirligig. This is something a bunch of people have requested. It could take a bunch of time, and it's something I could probably do.

It looks like this could be very quick and easy and have a bunch of impact on usability: #48 (Serious bug: Playlist: drag and drop of multiple files doesn't work). It's something you could do, or something I can imagine I could do as well.

Then either of those are probably all equally annoying:

  • 12 (missing joystick deadzones for scrolling) - makes the file browser hard to use

  • 28 (create bindings for actual head turning, rather than projection parameters) - makes fisheye and cinema view difficult to use

  • 63 (ability to rebind the controller dpad) - huge usability improvement

  • 57 (Bug: when entering menu, view position gets reset and back/forward is interpreted differently) - this results in notable visual glitches

Fixing #28 would close off 3 related bugs.

65 would be a pretty big win for usability, but it's involved. I could probably implement that one.

Then there's 50 issues in total that I could help with. Most of them look like they haven't been worked on, I went through all of them and updated them over the last 2-3 hours with new info, and I also added new issues as well.

Thanks for this. I'll go through these tomorrow.

I'd like to ask you a few questions. You're very interesting in this project and I appreciate your contribution. Is there any reason you so interested? I don't know anyone else who has put so much effort in to helping me than you.

Tell me a bit about yourself. What is it that you do and what experiences do you have in programming and Unity. Do you have any of your own projects on the go. You seem a very passionate person so I can imagine you have a few ideas for apps yourself :)

Myself I'm from the UK, Leicester. I've worked at the International Space Centre in Leicester for 12 years before going freelance last June when I got an offer from another company to work on a different project. When I worked at the space centre I started off working in computer animation making the fulldome shows (that's where the fisheye stuff comes from). I then developed into programming and VR when the DK1 came out and I wanted to make my own 360 degree films. I decided to make a player to play the films that I wanted to make and it just took over. That was about 5 years ago. Since then I've been working on Whirligig part time. Right now I want to make the game I mentioned earlier and continue to develop Whirligig so others can do the same and while all that's going on I also am working on a new app that will be coming out soonish (September, was going to be earlier but the world has gone down with the plague). This is what's been taking up all my time recently. It's with a another company, although I'm the only one developing it. I can't tell you what it is as it's all hush hush but keep an eye out for that.

If there is anything else you want to know about me just ask. :)

cheater commented 4 years ago

That's a pretty cool intro!

What is it that you do and what experiences do you have in programming and Unity. Do you have any of your own projects on the go. You seem a very passionate person so I can imagine you have a few ideas for apps yourself :)

I'm a programmer, I mostly do backend programming, financial code, functional programming, and now increasingly more management. I've been doing this since forever. I got started with 8 bit computers :) The most popular project I contributed to was Tezos. I have loads of ideas for apps but a lot of the coding I do is just taking stuff I already like, and trying to improve it. That's why I am talking to you. Another similar thing is talking to the Windows team about a bunch of obscure bugs that seem to impact a lot of people but that slipped under the radar. Turns out that a lot of people were able to misconfigure their PC in a very easy way and MS knew nothing about it, so we've been working on fixing this for a few hundred thousand people for a few weeks now, and a few months of my own work before I was able to get in touch with them. I just like to improve things that already have a place in my life. I like WG because it's clearly a power user tool, and it seems like a lot of even more advanced features could do a lot of good for it and it feels like they would fit at home with it. I don't really believe that it's a good idea for me to start a project of my own to compete because that would be a lot of hassle and would also mean that by the time I get to the advanced stuff I would like to see I would be exhausted in terms of time already. So I'd rather try and help you :) I've got a bunch of experience with 3D content creation and game content creation and I've studied maths at uni so that part's covered. But I don't have much experience with opengl or game engine programming, so that'll be fun to learn. However, I think it shouldn't be an issue when trying to implement most of the changes I would like to see put into WG :) especially given that there's already a working 3D engine and most of the scenes and geometry are already in place. So that would make it easier for me to enter the project than if I had to write it on my own. I actually had a pretty early start with VR with the VFX1 - it didn't belong to me but a bunch of friends were running a computer club and we could use it there, with DOS games etc. That was ages ago. And now I got started with it again with the PSVR. It's pretty cool. and 3D movies are definitely the future to me, but a lot of them are made in an amateurish manner so eg the camera is the wrong FOV, it's pointing in the wrong direction or it's shifted to the side, so you need to be able to adjust those yourself - that's why an advanced player with powerful controls is very important. It's like the times of early moving film, there were no standards and you had to handle every film differently. So it's very exciting but also a bit cumbersome.

cheater commented 4 years ago

I've updated the list of bugs above btw.

phileday commented 4 years ago

Hi

So as everyone is aware the last few weeks have been a bit mad. My current freelance work has been a bit all over the place which has prevented me from working on Whirligig. Now though I've finally managed to catch up. So I'm going to start looking at the suggestions you've made for important bugs to address over the next few days.

I'll also be updating the github issues list. So keep an eye out for changes :)

Thanks for your help and expect some changes soon. I won't be able to address all the issues right away but I do hope to at least get through some of them and update everyone on changes and progress of Whirligig.

until I get back into this keep safe,m healthy and hearty.

Phil

cheater commented 4 years ago

Bug can still be reproduced. I created a file called:

ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff.mp4

inside a directory called:

K:\dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

and WG cannot open the file.

However, if the file has a normal, shorter file name, WG can play it OK.

phileday commented 4 years ago

Ok. I assuming it must be a bit better. The directory and file name I created was C:/temp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/__xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - Copy.mp4

Actually I've just checked and when I create a directory that long and put a file in it I can't actually change the name of the file that is in it to the one you suggested in Windows explorer. So this is even a limit of the Windows operating system.

I'd say the original fix has worked for long filenames but if Windows itself is having a problem with directories that long I don't think I'll be able to fix this problem any more than I already have.

cheater commented 4 years ago

The weird thing is that software like Deluge Bit Torrent can create those files and write to them and read from them. So I wonder what it is doing that it's able to do that.