Giter Site home page Giter Site logo

SRT converting issue about qnapi HOT 8 CLOSED

qnapi avatar qnapi commented on May 27, 2024
SRT converting issue

from qnapi.

Comments (8)

krzemin avatar krzemin commented on May 27, 2024

Could you please post fragment of that incorrectly produced SRT file?

from qnapi.

pagenoare avatar pagenoare commented on May 27, 2024

Sure.

1

00:00:06,000 --> 00:00:12,074

Zareklamuj swój produkt lub Firmę

zkontaktuj się www.OpenSubtitles.org dzisiaj



2

00:00:12,000 --> 00:00:15,950

www.NapiProjekt.pl - nowa jakość napisów.

Napisy zostały specjalnie dopasowane do Twojej wersji filmu.



3

00:00:16,000 --> 00:00:18,100

Chodź do nas, Murphy.



4

00:00:22,600 --> 00:00:25,600

- Co jest?

- Dobrze się bawicie?


After my Python script:

1
00:00:06,000 --> 00:00:12,074
Zareklamuj swój produkt lub Firmę
zkontaktuj się www.OpenSubtitles.org dzisiaj
2
00:00:12,000 --> 00:00:15,950
www.NapiProjekt.pl - nowa jakość napisów.
Napisy zostały specjalnie dopasowane do Twojej wersji filmu.
3
00:00:16,000 --> 00:00:18,100
Chodź do nas, Murphy.
4
00:00:22,600 --> 00:00:25,600
- Co jest?
- Dobrze się bawicie?

from qnapi.

krzemin avatar krzemin commented on May 27, 2024

OK, so it seems that every single line is separated by additional empty line.

QNapi uses CLRF ("\r\n") as line separator, which should be correctly recognized by most of systems/software, so I think that this is not necessarily a problem. It's hard verify now, but I suspect that reader of the input format has some defect and produce content with additional newline tokens.

Could you provide link to original, untouched (without conversion enabled) subtitles downloaded by QNapi, which the problem concerns?

from qnapi.

pagenoare avatar pagenoare commented on May 27, 2024

LOL

I think I've found the issue - the subtitles I was converting were already in SRT format.
https://gist.github.com/pagenoare/ed671ec53669ae591d12

So it more like SRT (original) -> (qnapi's conversion) -> messed up SRT.

Tried on different Series now, and it downloaded .txt subtitles, which were in SRT format. It converted it wrong too.

TXT: https://gist.github.com/pagenoare/84ca931d5a84998680f3
Converted SRT: https://gist.github.com/pagenoare/6701412b5fddd5ccadde

IMO, You're missing some detection IF downloaded subtitles are in the format requested by converter. If they are, just change the extension and should be fine, hm?

Thanks!!

from qnapi.

krzemin avatar krzemin commented on May 27, 2024

Well, I couldn't reproduce conversion resulting with messed up file that you have provided.

It's nothing wrong that QNapi reads SRT file and produce resulting file in SRT format too. Sometimes that is desired behaviour - that kind of "conversion" performed by QNapi can fix incorrect SRT in some cases.

The problem is that I converted subtitles from gitsts that you provided, resulting with no problematic empty lines. Similarly, I downloaded other subtitles in SRT format for certain movies, having enabled target format conversion to SRT - again without empty lines.

So far I checked that on Linux only.

Basing on current knowledge, it can be:

  • some OS-dependent problem - please provide info about your operating system (name, version, etc.),
  • configuration-dependen problem - could you please localize and post your qnapi.ini file?

Another question: what text viewer you use to preview resulting srt files (where you see the empty lines)? Does it change when you use other text viewer?

from qnapi.

pagenoare avatar pagenoare commented on May 27, 2024

I'm using Windows 8.1,
qnapi.ini: https://gist.github.com/pagenoare/d123037a9de5b7a5c471

I can check later on Linux or OSX if you like.

I'm using Sublime, Vim, Atom to see the file, on all of them - this issue is visible. (it can be fixed via Python, so it's not really editor issue, but the chars).

@edit
I'm not saying it is wrong that QNapi is parsing srt to srt; I'm saying, that something is wrong on that level.

Thanks,
Kacper.

from qnapi.

krzemin avatar krzemin commented on May 27, 2024

I checked that both on Windows 7 and Windows 10 with your config applied - none of them inserted additional empty lines to resulting files.

I can check later on Linux or OSX if you like.

Yes, if you can - it could confirm or eliminate dependency on OS.

from qnapi.

pagenoare avatar pagenoare commented on May 27, 2024

Will do later today / tomorrow morning!

sob., 24 paź 2015, 19:23 Piotr Krzemiński użytkownik <
[email protected]> napisał:

I checked that both on Windows 7 and Windows 10 with your config applied -
none of them inserted additional empty lines to resulting files.

I can check later on Linux or OSX if you like.

Yes, if you can - it could confirm or eliminate dependency on OS.


Reply to this email directly or view it on GitHub
#29 (comment).

from qnapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.