Hello everyone.
As the title said, I'm looking for some way to automatically embed .SRT subs in their respective Video files.
The subtitles files are already in my possession, and I've named them properly (same name of video files).
What I used to do is to insert them one by one using Subler, it works, but sometimes happens that I have many files and it's really annoying.
Is there any OSX software which can help me out?
Thank in advance for your advice!
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 13 of 13
			
		- 
	
- 
	SublerCLI can do this with some shell scripting 
 download SublerCLI from the same place as Subler
 put it in /usr/local/bin
 
 the attached file "subadder.command" is a shell script that will take a folder of mp4 and srt movies and combine them (if they have the same name)
 open the .command file in a text editor to see what it is doing...
 and if it won't run for you do this....
 open a terminal window
 type chmod +x
 then a space
 then drag the .command file in and now it will run for you.
 TEST ON A NON IMPORTANT FILE FIRST and then if you're happy..go for it on the rest!
 cheers
 jamie
- 
	Fascinating! 
 
 It works! I wasn't aware about this alternative version of subler which can runs commands.
 Did you make this command? It's very impressive.
 
 The only thing I've noticed is that the subtitles "meta" which are embedded have an unspecified language; also every files end to have as meta name: MY_SUBS.
 
 Although this, it was REALLY HELPFUL!
 
 Many thanks!
- 
	yep i wrote the command. 
 if you open the .command with textedit (set to plain text) and edit the line that starts with
 SublerCLI
 
 there are settings in there that were just guesses on my part so the -metadata "Name:MY_SUBS" can be changed there (or just deleted)
 and also the -language i guessed as eng for english (for me) but i'm unsure of what quicktime/ps3 etc is expecting in that bit!
 when you've done just save the file (and make sure it doesn't get .txt at the end)
 just play around and post back here so i learn something!
 cheers
 jamie
- 
	Well, I think you can only teach mejust play around and post back here so i learn something! 
 
 Anyway... after experimenting for a while I came up with this:
 
 Since my files are .m4v and I use to embed both Italian and English subtitles I've edited a couple of things...Code:#! /bin/sh echo drag folder with video and srt files in echo for each language the subs MUST have the following pre-extensions: !! echo ENGLISH: .en example mysubs.en.srt echo ITALIAN: .it example mysubs.it.srt read thefolder cd "$thefolder" for i in *.m4v and for i in *.mp4 do subname=`basename "$i"|rev|cut -c 5-|rev` SublerCLI -source "$subname.en".srt -language English -dest "$i" | subname=`basename "$i"|rev|cut -c 5-|rev` SublerCLI -source "$subname.it".srt -language Italian -dest "$i" done clear echo all done. Your subs are in the video files 
 I personally tried it and it works, but again... if everyone wants to give it a try please test first on non-important files.
 
 Also, can you please explain me this part of the code?
 
 Thank you very much! I really appreciate!Code:subname=`basename "$i"|rev|cut -c 5-|rev` 
- 
	subname=`basename "$i"|rev|cut -c 5-|rev` 
 
 is a way of getting the name of the movie but without the ".suffix" at the end
 ie
 thingy.avi
 becomes
 thingy
 
 it basically does this
 subname is the name of our "variable" whaere we want to store the information we want
 then the ` means "the result of everything inside the ` signs
 basename "$i" this gets the name of the file from the full path ie /users/me/folder1/myfilm.avi gives just myfilm.avi
 then the | means do the next thing as well
 rev reverses the string so myfilm.avi is iva.mlifym
 cut -c 5- means cut from the 5th character so that gives mlifym
 rev reverses it again to myfilm
 
 there is a much shorter way of doing it involving {...} type things but i can never remember it whereas the step by step approach has stuck in my head!
 
 you shouldn't need the second subname=`basename "$i"|rev|cut -c 5-|rev`
 line because once it is "set" it doesn't become "unset" until YOU reset it or the program quits.
 
 great hacking on the code I'll have that back thankyou very much!
 all the best
 jamie
- 
	hey guys, I found this thread very useful. I was wondering what I would need to adjust in the code to get this to work with h264 mov files. 
 
 I'm not much a programmer, but I was able to get the code to work with a folder of 50 mp4 files. I tried it on a batch of mov files and it didn't work. I thought changing everything in the code that said "mp4" to "mov" would do it, but there must be something else going on that I don't see.
 
 any help would be appreciated.
 
 Thanks!
- 
	Does the MOV container actually allow for embedded subtitle streams? 
 
 If so, the subtitles may need to be converted to a different format, and/or muxed into the video in a different way. (Naturally, I haven't done much work with MOVs at all, so... yeah. )
						If cameras add ten pounds, why would people want to eat them? )
						If cameras add ten pounds, why would people want to eat them?
- 
	yeah they do allow the SRT files to be embedded. I can add them 1 at a time and it works. Just wasn't able to get the script to work for batches. 
- 
	Hi pal. I'm not sure but I think it's just a matter of substitute the extension inside the script: 
 
 Will becomeCode:for i in *.m4v and for i in *.mp4 
 
 orCode:for i in *.m4v and for i in *.MOV 
 
 Be sure to test it out before batch your important files. Let me know!Code:for i in *.MOV and for i in *.mp4   
- 
	Happy new year to you buddy. I'm glad you've found this thread useful. If this could help you further, I figured out that now this is also possible through the GUI. 
 
 Be sure to have both MP4s and SRTs files in the same directory and with the same name; you can even append the initial of the subtitle language: e.g. .it; .en; .sp and so.
 Then simply open the Subler queue, drag the MP4s you wish to add the subtitles to, tweak your scraper preferences and start.
 
 Now you should have all your queued files with embedded subs.
- 
	Hello i need to embed srt files into 1000 videos. I have all the videos and individual srt files 
 
 Can any one suggest me a batch program that does this in window operating system.
 
 This thread talked about MAC operating. I am looking for windows 7. operating system
 
 Regards
 Kamalakar
Similar Threads
- 
  Is it possible to embed subtitles on to MKV & MP4 files using Virtualdub?By Sulli in forum Newbie / General discussionsReplies: 2Last Post: 9th Oct 2012, 11:50
- 
  How to change fast container of many files (from avi to mp4)?By wacus in forum Newbie / General discussionsReplies: 3Last Post: 30th Jul 2012, 17:32
- 
  need to put content of FLV container into MP4 containerBy arraboy in forum Newbie / General discussionsReplies: 3Last Post: 29th Jun 2012, 20:52
- 
  Can flac or .ass files be muxed into a MP4 container?By Cyber Akuma in forum Newbie / General discussionsReplies: 5Last Post: 29th Oct 2010, 15:47
- 
  embed srt into mkvBy Soixante in forum Video ConversionReplies: 3Last Post: 16th Oct 2010, 05:00


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			

 Quote
 Quote 
			