Comments (9)
the glob *.mp4
expands to a single file movie.mp4
(i fixed my first comment)
ValueError
is just noise, the actual error is UnknownFPSError
let me focus on
expected:
- show a warning, continue to process other subtitle files
when syncing multiple subs, one broken sub should not stop the whole process
from ffsubsync.
Hmm... for this command:
ffs --overwrite-input *.mp4 -i *.srt *.sub
I don't think ffsubsync is smart enough to figure out the correspondence between references and inputs if multiple references are specified like that. I think the best you can hope for with the current code is syncing multiple inputs against a single reference -- anything fancier requires a wrapper around ffsubsync at the moment.
Regarding the pysubs2 error, can you file an issue against that repo? Contributors there would probably be better equipped get a fix out.
from ffsubsync.
@milahu I tried pushing a fix for this but haven't had a chance to properly test it -- would you be willing to try this out since you have an example where syncing should continue if something fails when trying to sync multiple?
To test, you would need to install from master, which you can do by running the following:
pip install git+https://github.com/smacke/ffsubsync@master
from ffsubsync.
7fd1885 (ffsubsync.nix) still stops at pysubs2.exceptions.UnknownFPSError
cat >bad.sub <<EOF
{2}{3}hello world
EOF
cat >good.sub <<EOF
{1}{1}25
{2}{3}hello world
EOF
# generate audio
espeak -w audio.wav "hello world"
# generate empty video, mux with audio
ffmpeg -t 3 -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero -i audio.wav -y video.mp4
md5sum good.sub
# 5964c0de6c837c24876fb4785023df06 good.sub
ffs --overwrite-input video.mp4 -i bad.sub good.sub
md5sum good.sub
# 5964c0de6c837c24876fb4785023df06 good.sub
# -> no change
from ffsubsync.
Sorry for the very late response -- got very busy at work.
For the example you sent, it looks like we're only running it on one case -- what happens if we run on multiple case where, if run individually, the first fails but subsequent ones succeed?
from ffsubsync.
it looks like we're only running it on one case
what? there are two input subs: bad.sub
and good.sub
ffs --overwrite-input video.mp4 -i bad.sub good.sub
https://github.com/milahu/ffsubsync-stops-processing-multiple-files
from ffsubsync.
Ah I forgot how my own tool works (i.e. forgot that --overwrite-input
lets you pass multiple "to be synced" files). OK thanks for this; will try to take another look soon, hopefully before 3 more months go by :)
from ffsubsync.
Hi @milahu I increased the broadness of the tolerable exceptions we catch in 1c64c03 -- I suspect if you try with this commit hash, hopefully the issue should be fixed.
from ffsubsync.
better : )
now my next case is failing
# pysubs2.exceptions.UnknownFPSError: Framerate was not specified and cannot be read from the MicroDVD file.
sub_files=(bad.sub good.sub)
expected: this should fail *early* because all input files have an unsupported output format
this case fails as expected
# NotImplementedError: unsupported output format: sub
# fixme: the input file should not be processed at all
sub_files=(good.sub)
from ffsubsync.
Related Issues (20)
- Is ffsubsync support auto adjust subtitle duration HOT 1
- A better VAD than webrtc HOT 2
- Python 3.9+ compatibility: upstream dependency contains outdated dependency HOT 1
- Framerate was not specified and cannot be read from the MicroDVD file error when used on a .sub file
- Broken submodule HOT 1
- OpenAi Multilanguage speech to text "whisper" HOT 1
- If there is some sort of api or a way to send arguments directly I will create a GUI for Mac/Linux/Windows for users HOT 3
- cchardet no longer updated HOT 7
- ChildProcessError: [Errno 10] No child processes HOT 4
- OSS License compatibility question HOT 1
- output subtitles still out of sync HOT 3
- Suppressing output because offset 8.49 was less than suppression threshold 0.5 ? HOT 3
- ffsubsync skips first 5 subtitles lines even though they seem properly formatted
- Cant install in Ubuntu 23.04 HOT 1
- Switch to click for argument parsing
- --apply-offset-seconds not applying set argument of 107 seconds HOT 1
- Broken link: test-data
- [Feature Request] Add an option to extract serialize/reference data as subtitle file
- [Feature Request] Add option to specify ffmpeg exe path HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffsubsync.