Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

How to match video file with subtitle

Thu Oct 15, 2015 12:45 pm

Here is something I've been some time thinking about.

We have the problem of how to match a video file with a subtitle. Then the solution comes in form of hashes. I think it is fine. But
you still have a lot of false negatives. You just change a bit in the file and it doesn't match anymore. Somebody talked about soundtrack hashes. Perhaps too complicated.

Why not use a simpler solution? What about time? With the pair of values imdb-id and duration you can do better. But I can't see the duration data anywhere. You have the field FPS but I think it is confusing and not very useful.

User avatar
oss
Site Admin
Posts: 5887
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: How to match video file with subtitle

Thu Oct 15, 2015 1:22 pm

we got duration in database (not many clients send this), but it is same story as false-negatives with hashes. If hash is false negative, time would be too.

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: How to match video file with subtitle

Thu Oct 15, 2015 1:33 pm

Not necessarily. You can have many files with the same duration (and essentially the same film) and different hashes.

Take this example: you have a film and encode it using mpeg1. Then you encode it with H.264. The two files are different and have different hashes but the duration is the same. And the subtitle would match both.

Yes, if duration is different hash is different but the opposite is not true. If hash is different duration can be the same.

In other words: you can find many cases in which hash does not match but subtitle do (false negative). With duration you reduce
the number of false negatives. You still fave some. For example, add just one second at the end and you have the same problem. Subtitle still matches but duration does not match anymore. But I think it could be better than hashes.

User avatar
oss
Site Admin
Posts: 5887
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: How to match video file with subtitle

Thu Oct 15, 2015 6:37 pm

I know what you mean, but imagine you got Javascript, PHP or BASH scripting language. How do you want extract movie-length from hundreds of different movie formats/codecs/containers ?

User avatar
SmallBrother
Site Admin
Posts: 3726
Joined: Sun Mar 04, 2012 12:59 pm
Location: Somewhere on this globe

Re: How to match video file with subtitle

Thu Oct 15, 2015 8:51 pm

In reality, people dont so often re-encode using mpeg and then 264. What happens more, is encoding the web-dl, or DVD, or Bluray (with all different timings and FPS). Moooooore happens that people just rename that file, from Moviename.2084.Bluray.720p.MyEgo.mp4 to Moviename.mp4 or even Nice-Porn-Movie.mp4. Hash system is not always very funny, but in this sense it's good.
Nowadays a VPN is a must for everyone. A VPN allows you safe surfing and protects you against spying governments and companies.
I advise AirVPN - from € 2,75 per month. Click the below banner for more info.


Image

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: How to match video file with subtitle

Fri Oct 16, 2015 11:05 am

Well, I'm talking here from my personal point of view. I guess this is not how normal people use OS.

I'm too a manual guy ;-) so I almost never use API .Therefore I don't rely on hashes to find the correct sub. I like to download from the web. Honestly, I don't understand all the concern about hashes and all that. How long does it take to search via web? Two minutes at most.

What do I care about the name of the file? It's been a long time that you can't rely on title to do the match.

Yes, I know my example is not very common. It's just an example to illustrate why I think duration could do better than hashes.
How do you want extract movie-length from hundreds of different movie formats/codecs/containers ?
How to extract this value? I don't know how but my player always knows it no matter what format or container. I guess it uses some library. You say a few clients send this information. How do they do it? The rest could use the same method.

From my manual point of view I could supply this information when I upload via web just the same way I could supply country code. I just need a placeholder. I could use the comment just like I've already done sometimes to hold this information but I don't think it's a good idea because it's not easy to extract. I don't think any client uses the comment to do the match.

User avatar
oss
Site Admin
Posts: 5887
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: How to match video file with subtitle

Fri Oct 16, 2015 12:18 pm

well, it is even theoretically possible to make search now with length of the movie (+imdb). It is not possible to use just length of movie, without any other parameter.

The thing about API is this:
1. you sit in front of your TV powered by Android TV (where you install KODI or something)
2. you take remote control, play movie, click download subtitles and enjoy the movie with subtitles

With your solution - well, maybe 2% of people would use that. But again, it is still so big hassle to find correct subtitles ? You have to use anyway name of movie, then if you got DVD/BR rip it is easy to know which subtitles are good.

Inserting movie length in upload I think is not really so good idea, actually I didnt want to allow even put FPS there...

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: How to match video file with subtitle

Fri Oct 16, 2015 12:55 pm

Android TV? What the heck is that? I have a 20-year-old CRT sitting in my living-room and my remote control is a long stick. I'm just kidding (not about the CRT, that is true:-) But I don't have one. I know it exists, that's all.
But again, it is still so big hassle to find correct subtitles ?
I think the main problem is FPS. I have to download every available subtitle and inspect one by one to see if it matches just because I don't have enough information. I don't think the FPS field is very useful.
Inserting movie length in upload I think is not really so good idea
Why not? Is it so big hassle to add one more field to form? You say you already have duration in database. Why don't you use it?

I think this is a clear discrimination against web users. I don't know why you favour API users. I guess that's because most of the users belong to this category. I understand that most of your effort goes in this direction but I think you should still provide other means for the poor users that don't have a shiny android TV. Or simply users that want to do things by themselves.

User avatar
oss
Site Admin
Posts: 5887
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: How to match video file with subtitle

Fri Oct 16, 2015 3:07 pm

Yes I didnt know about Android TV, but we are near. Check it out.

For FPS: I think it is useful, in many cases the different releases is just different FPS, which is the most hard (well...) to correct

Well, for duration, it is in database, I can use it, if you want to so much. Dont forget 1 subtitle file can work with many time length (cutted out the credits in the end), so thats a little bit problem (now the time is stored per moviehash, so it means, if it is 2 and more CD (past) it will not work.

So for example, you want to use it:

- moviename: matrix
- movietime: 01:33:45 (1hour 33 minutes 45 seconds)

Now the question is if there should be some approximation, or it must be on second exact (I dont think thats good idea)

I can enable this field in search (super advanced:), and we can see how it will work.

So also 0.001% (joking) of users will be happy. Or more % :)

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: How to match video file with subtitle

Sat Oct 17, 2015 12:32 pm

Dont forget 1 subtitle file can work with many time length (cutted out the credits in the end),
I know. Or intro removed.
For FPS: I think it is useful, in many cases the different releases is just different FPS, which is the most hard (well...) to correct
It is useful. But sometimes I just don't know. Besides I think sometimes it is incorrect (that is not your fault). It is good as optional.
I can enable this field in search (super advanced:), and we can see how it will work.
I would be happy just being able to see it somehow. You don't have to set it up in search. But I could give it a try just to see how useful it is. 5 seconds? Adjustable?
So also 0.001% (joking) of users will be happy
Perhaps 0.0001% is more accurate. That's me in one million :-) But I'd really appreciate it.

User avatar
SmallBrother
Site Admin
Posts: 3726
Joined: Sun Mar 04, 2012 12:59 pm
Location: Somewhere on this globe

Re: How to match video file with subtitle

Sat Oct 17, 2015 2:51 pm

I think duration data could help a bit with doing a manual search. If I need a subtitle I always search manually - ask oss my opinion about some modern technology ;-) But I never used FPS or ever missed info about duration.

I know it's a bit besides your point ("I want duration data"), but if it is about how to find subs, this is my method:
I see which subs are available. If my release is not mentioned literally, I know by experience that for example SPARKS (most probably) will fit a YIFY release. Etc.

But more importantly, I rather choose a GOOD subtitle (translation, language, technique) than a MATCHING subtitle.
So I see who is the uploader and/or translator, by experience (and/or the Trusted/Sub Translator badge) I know what to choose or what to avoid. If this doesnt satisfy me, I would check out the preview, get an idea about linguistic quality. If that's okay, I open it in Subtitle Edit. In one second I can see if technique is bearable or not.
Like this, I can find a subtitle which is good quality. If it doesn't match, I will MAKE it match. Re-synching is a piece of cake (provided that its not a different cut, added or deleted pieces) and can be learned and done in a minute or two.

I feel sorry for those API users who get a perfectly matching..... machine translation ;-)

Btw, I never use a long stick as remote control. I always push the wrong buttons.
Nowadays a VPN is a must for everyone. A VPN allows you safe surfing and protects you against spying governments and companies.
I advise AirVPN - from € 2,75 per month. Click the below banner for more info.


Image

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: How to match video file with subtitle

Sat Oct 17, 2015 4:00 pm

I think it's great to have hash matching, Android TV, automated download and all that. But I don't think is good to impose a given technology. You could compare this to the way standards are used. It's good to have extensions but I think it's also good to have some standard, some minimal set of features you can rely on. First comply with the standards, then add your own extensions.

Besides, one of the advantages of my CRT over android TV is that it can't get viruses or bugs (perhaps some moths, but those can't break it) :-) And my remote control doesn't need batteries.
Like this, I can find a subtitle which is good quality. If it doesn't match, I will MAKE it match
Perhaps I should get used to it. But I find it cumbersome having to resynchronise.

Okay, I see your point. But a good sync (not only well done but one that matches) is basic. First things first.
Yes, you can resync but I'd prefer not having to. Sometimes you have 20 different subs (one of the things I find annoying of OS). For God's sake, there must be one that matches :-)

User avatar
arcchancellor
Moderator
Posts: 202
Joined: Sat Apr 03, 2010 12:56 pm
Location: Ankh-Morpork

Re: How to match video file with subtitle

Sun Oct 18, 2015 7:36 am

But what's the point, if they fit like a glove, but are bad in translation?
When I search for subs I proceed the same way as SmallBrother.

And first thing is the translation, not the timing. :wink:
"I don't believe in God. I just believe in Billy Wilder" - Fernando Trueba

User avatar
SmallBrother
Site Admin
Posts: 3726
Joined: Sun Mar 04, 2012 12:59 pm
Location: Somewhere on this globe

Re: How to match video file with subtitle

Sun Oct 18, 2015 10:17 am

I agree with arcchancellor (and with myself).

A resynch might be annoying to do, but what about fixing (or suffering) a bad translation and/or technique?

Besides, if a subtitle is linguistically bad, odds are that also sync is bad. I mean, if for example someone didn't take the effort to run it through a spell-check, probably sync wasn't checked and fixed neither. So the 'matching' subs could jump per line from one second too early to one second too late, have too fast lines, etc.
Nowadays a VPN is a must for everyone. A VPN allows you safe surfing and protects you against spying governments and companies.
I advise AirVPN - from € 2,75 per month. Click the below banner for more info.


Image

User avatar
hector
Posts: 370
Joined: Wed Jan 01, 2014 12:27 pm
Location: Spain

Re: How to match video file with subtitle

Sun Oct 18, 2015 5:48 pm

What is more important: sync or translation/transcription? Clearly the latter.
What is more difficult to fix? Clearly the latter.

But what's the use of having the best translation written by Shakespeare himself if it doesn't fit the video? The best translation can be simply UNUSABLE. But I'm not discussing what is more important. What I'm trying to prove is that this information (video duration) can be useful and therefore it should be made available to users to use it in manual match.

You have now the FPS field. But duration has some advantages. Most notably I always know this value. I just have to read it from my player. With FPS most of the time I just don't know the correct value. When I upload I don't know the value to fill the form. When I download I don't know what to look for. Duration is simpler than FPS and is more general. I think it could do better than FPS.

Return to “General talk”

Who is online

Users browsing this forum: No registered users and 124 guests