Apostrophes are escaped a little too much
See original GitHub issueHello,
I’m not 100% sure this is an issue with this library or if it’s something else, but basically I am attempting to use the ‘subtitles’ filter by feeding it an mkv file, ffmpeg always crashes and when I printed the stream arguments I got the below:
['-i', "tes't.mkv", '-filter_complex', "[0]subtitles=tes\\\\\\\\\\\\\\'t.mkv[s0]", '-map', '[s0]', "tes't.mkv2.mkv"]
This is for a file called tes't.mkv
This is a script I recreated this with:
import ffmpeg
import sys
file_path = "tes't.mkv"
def convert_video(file_path):
#Create a stream
stream = ffmpeg.input(file_path)
#Apply subtitle filter
stream = ffmpeg.filter_(stream,'subtitles',str(file_path))
#Output file
stream = ffmpeg.output(stream, file_path + '2.mkv')
#Get to work
print(ffmpeg.get_args(stream))
convert_video(file_path)
If I attempt to run this stream then ffmpeg crashes with the below error:
[Parsed_subtitles_0 @ 0x5591972f24a0] Unable to open tes\'t.mkv
[AVFilterGraph @ 0x5591972cd1c0] Error initializing filter 'subtitles' with args 'tes\\\'t.mkv'
Error initializing complex filters.
No such file or directory
Traceback (most recent call last):
File "test.py", line 16, in <module>
convert_video(file_path)
File "test.py", line 14, in convert_video
ffmpeg.run(stream)
File "/home/baa/.local/lib/python3.6/site-packages/ffmpeg/_run.py", line 212, in run
raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Should I escape the Apostrophe ( ' ) character with its HTML ...
You should ideally use as little escaping as possible and use UTF-8 to express characters natively. To do this you need an editor...
Read more >When to Use an Apostrophe—And When You Shouldn't
Apostrophe usage doesn't have to be confusing. Here's the lowdown on when to use an apostrophe—and other apostrophe rules you need to know....
Read more >Life's Short! So Why am I Fretting about Apostrophes and ...
I really am fretting—about the apostrophe in the phrase life's short. ... So, Bruce Cockburn shall forever escape scrutiny from the language law...
Read more >How to escape apostrophe (') in MySql? - Stack Overflow
The MySQL documentation you cite actually says a little bit more than you mention. It also says,. A “ ' ” inside a...
Read more >Apostrophes with Words and Names Ending in s
Rule 1: Many common nouns end in the letter s (lens, cactus, bus, etc.). So do ... There also are a few who...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, has this problem been solved? I have the same problem.
Running against the same issue when trying to scale down. Simplified code example:
I’m actually trying to scale conditionally (only scale down for if source has bigger dimensions), for that I need to enter a more complex scaling value which involves expressions as found on https://trac.ffmpeg.org/wiki/Scaling