The video has Swedish subtitles burned in (white).
The english .srt subs (yellow).
Been using ffmpeg delogo filter over the Swedish subs, but it is distracting.
If I could tell the filter to use the timing from the .srt file it might be less distracting on playback - trouble I don't even know if it's possible.
Code:ffmpeg -i 1.avi -vf delogo=x=199:y=295:w=269:h=54 -c:a aac -b:a 192k "%~dpn1.delogo.mkv"
[Attachment 79352 - Click to enlarge]
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 26 of 26
Thread
-
-
Wouldn't it suit better instead to create PGS subtitles with black backgrounds that you'd position over the Swedish subs? Hell of a job, I know. But it can be done.
-
This is for an 800x450 TV show - Hard coded subs are blurred out. An srt file is in the same folder as the final blurred video.
Crop and overlay figures will need to be changed if the DAR of your videos differ.
The figures in the overlay should be the same as the last 2 figures in the crop. i.e. 100:380
Code:ffmpeg -i "video.mp4" -filter_complex "[0:v]crop=600:80:100:380,boxblur=6[fg]; [0:v][fg]overlay=100:380[v]" -map "[v]" -map 0:1 -c:a copy -y "blurredVideo.mp4"
crop=600:80:100:380 = a box 600 wide, 80 high - 100 pixels in from the left, 380 pixels down from the top
overlay=100:380 = the overlay is positioned over the box.
It will take time to get your head around the figures. -
Sorry about the late reply.
@Ennio, the black background idea is good, except that the Swedish subs and the English subs differ in the number of characters used.So placing the English srt line over the corresponding Swedish line, doesn't cover it up.
@pcspeak, that's a good idea too.
I spent two days trying to figure out, when I used Virtualdub to place a black logo obscuring the Swedish subs, why the output audio was way out of sync.
Turned out my source avi used packed bitstream and I used ffmpeg to fix that.
Now the placement of the srt file over the logo is too low and I cannot figure how to move them into the black box.
In the interim I will try your blur option.
[Attachment 79410 - Click to enlarge] -
Doing this will add a new line containing a space, after the text. moving the text up one line.
Code:5 00:01:46,910 --> 00:01:48,950 This is a fun way to go.<br> <br> 6 00:01:49,350 --> 00:01:51,350 Not as much fun as the other way.<br> <br>
Also, with two lines of text, or more, there may be problems.
EDIT: I worked out how to do it with my text editor (NoteTab Light)
find 2 consecutive carriage return\new line;
\r\n\r\n
replace with;
<br> <br>\r\n\r\n
Probably don't need the space. Just <br><br>
I tested this viewing with MPC-HCLast edited by pcspeak; 27th May 2024 at 17:53. Reason: Update
-
This show is it "Rebus"? The actor looks like the guy who played "Rebus". You can get "Rebus" episodes from The Knowledge Network in Canada and also you can get them from UKTVPlay. Perhaps you could download better quality videos than you have now. I will have to check and see if the Knowledge Network has subtitles that you can turn on if you need them.
-
It's an improvement over my initial effort that's for sure.
Now if I could move the srt file on top of the original it would be even better.
Can't figure out how to move it.Aegisub supposedly can do it with ass files except the instructions baffle me. -
@pcspeak
Will look at that (there are 700 lines of text) and there are multiple lines in places (see my previous post #7). -
It is only 720 x 404 maximum resolution for Rebus on The Knowledge Network and no subtitles. I will go and check the specs for the show on UKTVPlay. You might want to check out "Pie In The Sky" as it is another UK Mystery show on UKTVPlay.
I checked UKTVPlay and got the specs for an episode of "Rebus". It is 1024x576 video resolution at 1791 Kbps. It also has English subs that you can select to turn on they would not be hard coded.
The actor who played "Rebus" can also be seen in "Irvin Welsh's Crime" playing a Police Captain. There are some characters in that show you may need subtitles for because of their thick accent and they get a lot of words out in short order.Last edited by Tom Saurus; 27th May 2024 at 19:04. Reason: Additional Information
-
@pcspeak
I downloaded NoteTab Light and opened a .srt file, but I don't see those \r\n\r\n or br
[Attachment 79418 - Click to enlarge] -
The problem with using srt subtitles like this is that the original SRT spec doesn't address things like positioning, size, etc. The programmers of some players have added extensions but they apply only to that player. So you need to figure out what will work with the player you are using. But as soon as you switch players, or try to use the player built into your smart TV they may not work.
https://en.wikipedia.org/wiki/.srt -
@jagabo
Thank you.I resolved the issue for now by using Subtitle Edit to load the video and the .srt file and changed format to ass.
File >Open File -load the .srt file
Format>ASS
Edit>Select all
R/C on the line listing and select ASSA Tools>Select Position
New screen opens; verify that 'Apply to' is all selected lines (my case 782 lines)
Drag the displayed line to new position and (all selected lines will be changed) click OK.
Save the new ass file, and test with video.
I loaded the video and ass files into my WDTV and the results were quite good. -
I'm glad to see you switched to ass subtitles. It makes life easier.
The \r\n\r\n characters are control characters. One can't see them with NoteTab, or most basic editors, but they are there, and can be modified. -
-
@sambat
A demo on the altering of \r\n\r\n using NoteTab.
clip0006.avi
Not my best creation. :-)
Cheers. -
@pcspeak
No I can't get my head arround the method.
What I did stumble on is putting a dot or period after each dialog line will move the line up the screen.
The period is unobtrusive and seems simple, except that there are 700 plus lines and I can't figure a way to automate it.
I either need a way using your 'notepad' or Notepad++ or Renamer or Subtitle Edit or.....
1
00:01:00,482 --> 00:01:02,871
This machine's been tampered with!
.
2
00:01:03,842 --> 00:01:06,402
17B was black coffee.
.
3
00:01:06,562 --> 00:01:09,520
Now it's... It's tea.
.
4
00:01:09,682 --> 00:01:14,198
If you're whinging' you must be bored.
Here's something to occupy you. -
OK. Try this.
Download this tiny program. http://findandreplace.io/download It's a 133k zip.
Unzip and put fnr.exe in the folder with the srt file.
In the following 1 line batch file change the srt file name to match yours, then run it.
add-line-breaks.cmd
Code:fnr.exe --cl --dir "%CD%" --fileMask "My Video.srt" --useEscapeChars --find "\n\n" --replace "<br><br>\n\n"
-
I don't see any differences in the output srt file or on video playback.
C:\Users\Superuser\Desktop\fnr>fnr.exe --cl --dir "%CD%" --fileMask "1.srt" --useEscapeChars --find "\n\n" --replace "<b
r><br>\n\n"
C:\Users\Superuser\Desktop\fnr>
====================================
Stats
Files:
- Total: 1
- Binary: 0 (skipped)
- With Matches: 0
- Without Matches: 1
- Failed to Open: 0
- Failed to Write: 0
Matches:
- Found: 0
- Replaced: 0
Duration: 0.04 secs
==================================== -
I found a small 'Gotcha!" in my batch file.
It depends how each line of your srt file is terminated.
I have NoteTab Light terminating lines with just \n, and saving the file with the encoding UTF-8
Try this.
Code:fnr.exe --cl --dir "%CD%" --fileMask "1.srt" --useEscapeChars --find "\r\n\r\n" --replace "<br><br>\r\n\r\n"
Code:D:\am2>fnr.exe --cl --dir "%CD%" --fileMask "1.srt" --useEscapeChars --find "\r\n\r\n" --replace "<br><br>\r\n\r\n" D:\am2> File: .\1.srt Matches: 51 Replaced: Yes ==================================== Stats Files: - Total: 1 - Binary: 0 (skipped) - With Matches: 1 - Without Matches: 0 - Failed to Open: 0 - Failed to Write: 0 Matches: - Found: 51 - Replaced: 51 Duration: 0.027 secs ====================================
-
The program detects the subs and adds <BR><BR> to the end of each line but the behaviour is the same as before (not scrolling the line up).
BTW I can't access the online help file for fnr, can't connect to the server "findandreplace.codeplex.com"
Code:C:\Users\Superuser\Desktop\fnr>fnr.exe --cl --dir "%CD%" --fileMask "1.srt" --useEscapeChars --find "\r\n\r\n" --replace "<br><br>\r\n\r\n" C:\Users\Superuser\Desktop\fnr> File: .\1.srt Matches: 783 Replaced: Yes ==================================== Stats Files: - Total: 1 - Binary: 0 (skipped) - With Matches: 1 - Without Matches: 0 - Failed to Open: 0 - Failed to Write: 0 Matches: - Found: 783 - Replaced: 783 Duration: 0.05 secs ====================================
Code:00:01:00,482 --> 00:01:02,871<br><br> This machine's been tampered with!<br><br> 2 00:01:03,842 --> 00:01:06,402 17B was black coffee.<br><br> 3 00:01:06,562 --> 00:01:09,520 Now it's... It's tea.<br><br> 4 00:01:09,682 --> 00:01:14,198 If you're whinging' you must be bored. Here's something to occupy you.<br><br> 5 00:01:15,202 --> 00:01:17,796 Under-age kids at Peggy Vernon's?<br><br>
-
Moved to http://findandreplace.io/overview
-
I'm having no problems here. (Win10 Laptop -> HDMI -> Sony 4k TV)
Maybe put in the full stop you were testing with.
<br>.<br>
or even just a space.
<br> <br>
This is the default.
Code:7 00:00:27,193 --> 00:00:30,321 SEE RIGHT THROUGH THEM
Code:7 00:00:27,193 --> 00:00:30,321 SEE RIGHT THROUGH THEM<br>.<br>.<br>.<br>
Try another player? -
You can't rely on HMTL tags like <br> to work in SRT files. HTML tags are not part of the SRT standard so support is spotty. Here's another trick that works in some players: put a character with the hex value 0x90 in the SRT file (where you're putting <br> now).
-
@jagabo
You're absolutely right. Your 0x90 shows up as \r\n in my editor.
Maybe for sambat do a find "\r\n\r\n" replace "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
Just kiddin'. (sort of)
@sambat
I have been using MPC-HC to play all my videos for many years. All subtitles are srt.
Some symbols (e.g. ♪ ♫ ® ©) are weird when subtitles are converted to srt files. No biggie.Last edited by pcspeak; 30th May 2024 at 18:13. Reason: grammatical error
-
Thank-you guys, but this is giving me brain bleed.
I used this command to print periods after the dialog line and it works, however to save me from slashing my wrists, I'll use subtitle Edit and covert to ass files.
Again a tip of the hat to everyone!
fnr.exe --cl --dir "%CD%" --fileMask "1.srt" --useEscapeChars --find "\r\n\r\n" --replace "<br> . <br> . <br>\r\n\r\n"
Similar Threads
-
MPC - disable english subtitles when the audio is english
By Senai in forum SubtitleReplies: 1Last Post: 13th Apr 2022, 15:27 -
VirtualDub2 - Display video pane on a secondary display?
By simple in forum Video ConversionReplies: 0Last Post: 17th Sep 2021, 12:54 -
FFmpeg - Only Copy English Subs
By agon024 in forum Video ConversionReplies: 4Last Post: 15th Jun 2021, 19:06 -
Merging english translation sub into english sub?
By bizzybody in forum SubtitleReplies: 0Last Post: 18th Feb 2021, 03:45 -
Convert 29.97fps subs to 23.976fps subs in MKV file?
By zapp7 in forum SubtitleReplies: 3Last Post: 18th Jun 2020, 09:03