LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-11-2024, 07:19 AM   #1
maddy0
Member
 
Registered: May 2023
Posts: 84

Rep: Reputation: 2
Add subtitles to a vid.


Hello, i'm trying to add subtitles using autosub.
fmpeg -version
ffmpeg version N-113609-g66231e5871 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --enable-gpl --enable-libx264 --enable-libfdk-aac --enable-nonfree
libavutil 58. 36.101 / 58. 36.101
libavcodec 60. 39.100 / 60. 39.100
libavformat 60. 20.100 / 60. 20.100
libavdevice 60. 4.100 / 60. 4.100
libavfilter 9. 17.100 / 9. 17.100
libswscale 7. 6.100 / 7. 6.100
libswresample 4. 13.100 / 4. 13.100
libpostproc 57. 4.100 / 57. 4.100
ls -al
total 3656
drwxr-xr-x 4 tony tony 4096 Feb 11 13:57 .
drwx------ 22 tony tony 4096 Feb 11 11:33 ..
drwxrwxr-x 18 tony tony 4096 Feb 11 14:14 FFmpeg
drwxrwxr-x 2 tony tony 4096 Feb 9 12:50 Mio
-rw-rw-r-- 1 tony tony 3690861 Feb 11 13:39 MY_VID.mp4
autosub -S en -D en MY_VID.mp4
File "/usr/local/bin/autosub", line 136
print "The given file does not exist: {0}".format(filename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2024-02-11 14-27-29.png
Views:	4
Size:	48.4 KB
ID:	42549  

Last edited by maddy0; 02-11-2024 at 07:28 AM.
 
Old 02-11-2024, 08:48 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
And what is your question?
Quote:
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
You need to use print(.....). Without ( ) it won't work.
 
1 members found this post helpful.
Old 02-11-2024, 02:24 PM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
Depends on what kind of subs that you are trying to add. And how you want them in the video. vob subs that are overlayed onto the video, srt subs that are a seperate stream in the video.

If you are trying to add a srt file as a substream to a video.

2 examples:
Code:
ffmpeg -i infile.mp4 -i infile.srt -c:a copy -c:v copy -c:s mov_text outfile.mp4
Or
Code:
ffmpeg -i infile.mp4 -i infile.srt -map 0:v -map 0:a -c copy -map 1 -c:s:0 mov_text output.mp4
Need more info.
 
Old 02-12-2024, 05:22 AM   #4
maddy0
Member
 
Registered: May 2023
Posts: 84

Original Poster
Rep: Reputation: 2
Hello, thanks for answering, i solved with Gnome subtitles and HandBrake for burning.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtitles not Syncing with Vid/Audio jbuckley2004 Linux - General 6 06-22-2023 06:58 PM
Transcoding MKV files with embedded subtitles to MP4's with 'burned in' subtitles TB0ne LinuxQuestions.org Member Success Stories 0 09-17-2014 11:45 AM
How do I install/enable compiz fusion in slack 12.2vm 64mb vid. ram vbox guest add. dustin2128 Linux - Desktop 1 07-01-2009 05:42 AM
How to add subtitles with DVDstyler? colucix Linux - Software 0 02-19-2007 06:55 AM
Trying to add DVD subtitles with spumux davidjmcc86 Linux - Desktop 3 11-10-2006 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration