Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path interpretation #826

Open
MrGeomancer opened this issue Mar 14, 2024 · 1 comment
Open

path interpretation #826

MrGeomancer opened this issue Mar 14, 2024 · 1 comment

Comments

@MrGeomancer
Copy link

MrGeomancer commented Mar 14, 2024

``i'm trying something like:

path = 'C:\Users\Pekarnya\Videos\Captures\за грубость извени.mp4'
overlay = ffmpeg.input(fr'{path}_folder/input.mp4')
srtf=fr'"{path}_folder/audio.srt"'
print(srtf)  # > "C:/Users/Pekarnya/Videos/Captures/за грубость извени.mp4_folder/audio.srt"
overlay = overlay.filter('subtitles', srtf, force_style="PrimaryColour=&H03fcff,fontsize=8,Italic=1,Spacing=0.8,MarginV=72")
overlay = overlay.output(ffmpeg.input(path).audio, fr'{path}_folder/final.mp4', vcodec='libx264', acodec='aac')
ffmpeg.run(overlay, overwrite_output=True)

but then error coming:

[Parsed_subtitles_10 @ 000001e1419df380] libass API version: 0x1701000
[Parsed_subtitles_10 @ 000001e1419df380] libass source: commit: 0.17.0-51-g91422bdb9497e8484b3248f5ae7eb50d41e2555d
[Parsed_subtitles_10 @ 000001e1419df380] Shaper: FriBidi 1.0.13 (SIMPLE) HarfBuzz-ng 8.1.1 (COMPLEX)
[Parsed_subtitles_10 @ 000001e1419df380] Unable to open "C\:/Users/Pekarnya/Videos/Captures/за грубость извени.mp4_folder/audio.srt"
[AVFilterGraph @ 000001e1419cf880] Error initializing filters

So error in Unable to open "C\:/Users/Pekarnya/Videos/Captures/за грубость but for real on print(srtf) i got "C:/Users/Pekarnya/... how can i fix error or it's bug?

@MrGeomancer
Copy link
Author

But in my code I always use fr'{path}_folder/...' and there is never were a problem with "C\:/Users/ instead of "C:/Users/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant