(Feel free to ignore my previous bug report - turns out that it was a more nasty issue NOT on YT's side)
Trying to get any YouTube video with subtitles leads to an error when it comes the moment to export the raw timed text subtitles to SRT, with errors similar to this one: Lua runtime errors due to null variables: error: libquvi: while exporting subtitle: ...share/libquvi-scripts/0.9/subtitle/export/subrip.lua:78: attempt to perform arithmetic on a nil value Unfortunately this problem not only affects the quvi client, it also cause playback issues on libquvi-enabled players like mpv - a relevant bug report: https://github.com/mpv-player/mpv/issues/516 In any case, there are no subtitles exported at all, rendering the whole feature useless. After hours of useless debugging, learning Lua forcefully, and banging my head aganist the desk, it turns out that tonumber() was returning nil on all calls. Finally, this unrelated bug report at another project gave me the clue: http://bugs.multitheftauto.com/print_bug_page.php?bug_id=5764 Since I live in Venezuela, my Linux setup is under a Spanish locale (es_VE.UTF8), and of course we don't use the period (.) as a decimal separator, but the comma(,) instead. YouTube sends the timestamps with periods, but Lua parses float numbers using the current locale, down to the specific decimal separator. This works handy-dandy on English locales (and of course on the generic C locale), but as soon as you try anything else which deviates from the "convention" (like EVERY SPANISH LOCALE), it assumes that everything is a wrong input, returns nil, and of course everything turns to chaos. Changing the locale for quvi (or anything using libquvi, like mpv) to en_US or C fixes this issue, but it isn't exactly a desirable behaviour. Steps to reproduce: Set your system locale to one which uses the comma (,) as decimal separator (say, es_ES). Try to get any video with subtitles on YouTube. Sample URLs which trigger the bug: https://www.youtube.com/watch?v=gy0E-1MD0bw&list=PL8Vd-cvqk4GtPGk2K8yfiEcWxy6nt3VZY&index=2 https://www.youtube.com/watch?feature=player_embedded&v=xBZOlipfjkQ Output: Lua runtime errors due to null variables: error: libquvi: while exporting subtitle: ...share/libquvi-scripts/0.9/subtitle/export/subrip.lua:78: attempt to perform arithmetic on a nil value -or- (process:22530): GLib-CRITICAL **: g_string_assign: assertion `rval != NULL' failed [quvi] ...share/libquvi-scripts/0.9/subtitle/export/subrip.lua:74: attempt to get length of local 't' (a nil value) $ quvi --version 2>/dev/null quvi v0.9.4 built on 2013-11-10 02:30:02 -0430 for x86_64-pc-linux-gnu with gcc, -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security configuration: --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking libquvi v0.9.3 built on 2013-11-10 02:26:44 -0430 for x86_64-pc-linux-gnu with gcc, -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security configuration: --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --datadir=/usr/share/libquvi7 --with-manual=no libquvi-scripts v0.9.20131130 configuration: --build=x86_64-linux-gnu --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ quvi-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/quvi-devel
