vidify / old-audiosync

First implementation of the audio synchronization feature for Vidify, now obsolete
GNU Lesser General Public License v3.0
17 stars 3 forks source link

sh: -c: line 0: syntax error near unexpected token `(' #57

Closed Nowa-Ammerlaan closed 4 years ago

Nowa-Ammerlaan commented 4 years ago

I think somewhere something is missing some quotation:

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `youtube-dl -g -f bestaudio 'ytsearch:ytsearch:Apocalyptica - I Don't Care (feat. Adam Gontier) Official Video''

Full log: debug-log.txt

I've only observed this with songs that have brackets in the YouTube title. But I expect there would be problems with other special characters too.

Also, does this mean that setting the delay was unsuccessful in VLC?

[00007f45bc022b30] main decoder error: Timestamp conversion failed for 1751751: no reference clock
[00007f45bc022b30] main decoder error: Could not convert timestamp 0 for FFmpeg

EDIT: Perhaps it is execvp("ffmpeg", args); Line 57 in ffmpeg_pipe.c that needs quotation.

marioortizmanero commented 4 years ago

I was experiencing the same issue, it's because the string isn't escaped when downloading the youtube-dl audio here. See for yourself:

youtube-dl -g -f bestaudio 'ytsearch:ytsearch:Apocalyptica - I Don't Care (feat. Adam Gontier) Official Video'

The ' in Don't ends the string, which is followed by t Care (feat. Adam Gontier) Official Video'. So everything falls apart and gives weird syntax errors. This can be fixed by either using something other than popen to launch youtube-dl, or by escaping the title strings.

This also made me realize that Vidify is actually sending the string with ytsearch:, so it's repeated twice when searching it. To be completely honest I don't even know how it worked before. I should have fixed this a long time ago lol. popen is also a really dirty function that breaks portability and should be changed. I've opened this issue: https://github.com/vidify/vidify/issues/100 (there are so many issues on Vidify right now haha)

I'm currently quite busy, but I'll try to come up with something once I have more time :)

marioortizmanero commented 4 years ago

Closing issue: see https://github.com/vidify/audiosync-rs/issues/2