Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#2001 | Link |
Registered User
Join Date: May 2009
Location: Belgium
Posts: 1,761
|
Hi,
I'm quite confused with a pattern to replace, I can't target 3 suspension points following a new line and followed by another character. I want to add a space after these 3 points, thus only when they begin the line (I have another reg ex when they are preceeded by a space). For instance, I'd like this ; Code:
1 00:02:37,309 --> 00:02:39,516 Hello... 2 00:02:39,687 --> 00:02:42,641 ...hi ...you. Code:
1 00:02:37,309 --> 00:02:39,516 Hello... 2 00:02:39,687 --> 00:02:42,641 ... hi ...you. Code:
(\n)(\.{3})(\w) Code:
$1$2 $3 ![]() |
![]() |
![]() |
![]() |
#2002 | Link |
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 428
|
Slow down my friend. You're telling regexp to find a word boundary.
Try this instead: Code:
(\n)(\.{3})([^\s]) Code:
(\n)(\.{3})([\S]) Code:
^(\.{3})([\S]) Last edited by markfilipak; 10th April 2025 at 16:50. |
![]() |
![]() |
![]() |
#2009 | Link |
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 428
|
Waveshapes in waveforms are lagging
"The Ghost and Mrs. Muir" [1947] DVD, UPC 024543071426 (2023)
I've written about this in the past two days. As it turns out, the real problem is that the audio is out of sync. The movie's running time is 102 minutes. By the 30 minute mark, the audio lags by about 200ms and placing subtitle cues begins to get difficult. By the end, the audio lags by about 600ms. The fault is not with SE. The fault is with Mill Creek Entertainment, the folks who made the DVD. Perhaps my experience, documented here, will help other SE users. FOLLOW-UP: Below is how I fixed the movie MP4. I - sped up the dialog audio (-map "[a]") by a factor of 1.00005 (found by trail and error) and - mixed in the sped up dialog (-c:a:0 ac3) and - added the two audio comment streams (-map 0:a:4 -map 0:a:5, -c:a:1 copy -c:a:2 copy) and - deleted closed captions using the following script: Code:
set _SOURCE_="c:\The Ghost and Mrs. Muir\copy_b.mp4" : copy_b is the concatenated VOBs made via copy /b then transcoded to AVC using my special sauce set _CHAPTERS_="c:\The Ghost and Mrs. Muir\chapters.txt" set _TARGET_="c:\The Ghost and Mrs. Muir [1947].mp4" set _STRETCH_AUDIO_=-filter_complex "[0:a]atempo=1.00005[a]" set _DELETE_CC_=-bsf:v "filter_units=remove_types=6" ffmpeg^ -i %_SOURCE_%^ -i %_CHAPTERS_%^ %_STRETCH_AUDIO_%^ -map 0:v -map "[a]" -map 0:a:4 -map 0:a:5 -map_metadata 1^ %_DELETE_CC_%^ -c:v copy -c:a:0 ac3 -c:a:1 copy -c:a:2 copy^ -dn^ %_TARGET_% Last edited by markfilipak; 11th April 2025 at 17:09. |
![]() |
![]() |
![]() |
#2011 | Link | |
Registered User
Join Date: Jan 2025
Posts: 54
|
Quote:
And progressive sync problems are a real pain. The copy I got is 720p, with sub's, and it's all good, despite it being B&W, and a little grainy, it's good.
__________________
Main Systems:- Threadripper 7970X on Asus Pro WS TRX50-Sage WiFi Ryzen 9 9950X3D on MSI Carbon X670E Ryzen 9 7950X on Gigabyte Aorus Elite B650 Intel 13900KF on MSI Tomahawk B660 |
|
![]() |
![]() |
![]() |
#2012 | Link | ||
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 428
|
What waveforms shows doesn't make sense
This should be useful for anyone experiencing audio out of sync.
Quote:
Quote:
Code:
From ffprobe -show_streams Before stretching: duration=6265.248021 seconds = 1:44:25.248021 After stretching: duration=6265.595708 seconds = 1:44:25.595708 Amount of stretching: 6265.595708/6265.248021 ==> atempo=1.00005 In the case of the DVD above, audio was early relative to video. Don't let that confuse the issue. Regardless how well audio syncs with video, sound and a picture of the sound should always be identical. If a sound is early, then a picture of the sound should also be early. When SE waveforms draws pictures of sounds (audio), it must be using improper methods, methods derived from video timing. Last edited by markfilipak; 11th April 2025 at 19:14. |
||
![]() |
![]() |
![]() |
#2013 | Link |
Registered User
Join Date: May 2021
Posts: 17
|
is there anyway we can use https://github.com/tesseract-ocr/tessdata_best
|
![]() |
![]() |
![]() |
#2014 | Link |
Registered User
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 428
|
Integate keyboard and mouse
Below are suggestions for integrating keyboard and mouse operations so to speed editing in the waveform panel.
INTERVAL is an internal process. REWORK is suggestions shown to users after INTERVAL completes after displaying REWORK flags. ALOOP, EDCUES, and MOVINTERVAL are user functions and will be of most interest to readers. INTERVAL process: An automatic 'waveform' process that is run when SE knows where utterance_A ends and utterance_B starts. This is called by EDCUES (below), not directly by users. Let out_pad = 1000ms, in_pad = 300ms -- they can be changed of course, as can the 100ms shot change encroachment value. "gap" is the minimal subtitle gap set by users. IF (X-gap)>=1300ms Code:
utterance_A<--------------X-------------->utterance_B // (X-gap)>1300ms utterance_A<----------->| |<--->utterance_B // result 1000ms 300ms utterance_A<----------X---------->utterance_B // (X-gap)=1300ms utterance_A<----------->|gap|<--->utterance_B // result 1000ms 300ms Code:
utterance_A<-------X------->utterance_B // (X-gap)>600ms utterance_A |gap|<--->utterance_B // result 300ms utterance_A<------X------>utterance_B // (X-gap)=600ms utterance_A<--->|gap|<--->utterance_B // result 300ms 300ms Code:
utterance_A<----X---->utterance_B // X>0 utterance_A |gap|<--->utterance_B // result X/2 utterance_A utterance_B // X=0 utteran|gap|utterance_B // result IF a shot change is within the out_pad: Move the out_cue to the shot change, then move the in_cue to out_cue+gap or in_cue-300ms, whichever is later. IF a shot change is within the gap, do nothing. IF a shot change is within the in_pad: Move the in_cue to the shot change, then move the out_cue to out_cue+1000ms or in_cue-gap, whichever is earlier. IF utterance_B begins less than 100ms before a shot change: Move the in_cue to the shot change, and flag the interval "REWORK". REWORK recommendations: 1, If utterance_A and utterance_B have the same speaker, merge the subtitles, then split them somewhere else. 2, Consider merging the subtitles as a 2-speaker dialog subtitle. 3, Do nothing, retain the current in- and out-cues. ALOOP user function: A user 'waveform' function for arbitrary audio looping. THE_KEY is a label for the key that has been assigned to invoke this function. Press and hold THE_KEY, click point_A, click point_B. (The audio continuously loops.) Drag either point any number of times. (The audio loop responds to the new loop.) Release THE_KEY. (The audio stops.) Point_A and point_B can be _any_ two points. EDCUES user function: A user 'waveform' function for setting cues. THE_KEY is a label for the key that has been assigned to invoke this function. Press and hold THE_KEY, click an existing out_cue, click an existing in_cue. (The audio begins to loop continuously.) Drag out_cue to the left while audio loops until you hear the end of utterance_A. Drop out_cue at the end of utterance_A. Drag in_cue to the right while audio loops until you hear the start of utterance_B. Drop in_cue at the start of utterance_B. (The audio continues looping.) Repeat drag-n-drop as needed, adjusting their positions if needed, while holding THE_KEY. Release THE_KEY. (The audio stops). SE now knows where utterance_A ends and utterance_B starts and automatically runs the INTERVAL process. Repeating EDCUES on the same cues or any other pair of cues is allowed at any time without restriction. MOVINTERVAL user function: A user 'waveform' function for moving both in- and out-cues simultaneously. THE_KEY is a label for the key that has been assigned to invoke this function. Press and hold THE_KEY. Click on an interval between subtitles. Drag-n-drop the interval. (Both out-cue and in-cue have been moved.) Release THE_KEY. FOCUS: Abandon the current focus strategies. Toggle the focus between text and waveform via a single control: The "Tab" key for example. SPACE: Instead of the user setting the number of pixels in a space, could you prompt the user to identify the center of a space during training and then simply measure it yourself? |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|