-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segment lengths wrong! #998
Comments
does it work in 3.39.0 if you use the exact same video and project file? could be related to ffmpeg being upgraded to 4.4.1 |
Mikael,
Whatever the previous version was, it exhibited the same results. The
current version I'm trying to use is
3.42.0. I deleted the project files each time. I overwrote the previous
version, so I'm not sure what
the version number was? But I had only downloaded it a couple weeks
prior to the 3.42 version
I'm currently working on modifying an ffmpeg bash script that does what
I want with good results so far.
I have not completed it fully just yet.
…On 2/12/2022 4:25 AM, Mikael Finstad wrote:
does it work in 3.39.0 if you use the exact same video and project
file? could be related to ffmpeg being upgraded to 4.4.1
—
Reply to this email directly, view it on GitHub
<#998 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQ5CXGZ7I7DUPDY6TG3VUTU2YRRNANCNFSM5MYYHPNQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Oh, I thought you said that it got worse after upgrading. Nevermind then! another thing u can try is to selectively disable the audio track or subtitle track to see if it’s one of those causing the problem |
The original mp4 video file is around 2gb (I think that is too large to share). I had actually tried it on a couple different videos with roughly the same results, and the one I referred to when submitting the issue report did go from 1h 30m (not 1m 30s) to 9h 30m. The first segment length was correct, but the remaining 2 were off. The original videos were recorded using the latest version of playon home. My bash script using ffmpeg doesn't have this issue, so I've been using that instead. |
Oh i see. Does your bash script use Btw how do you know if the first segment is correct and the two others are 6hr and 3hr if the output file is not playable after the first segment? |
The bash script is using the -c copy option and i also added the copy option for the subtitles. I can share the script with you a little later. It's still not quite completed. Send me a reminder if I forget within the next day! As for knowing the segment lengths, I had also saved the individual segments that I kept. |
Here is the script, you'll have to save it out to it's own file. Note that I have not tested the last line. I've modified the original script listed at the top quite alot. Note that I am currently running the script using bash included in GOM (Gnu on Windows), started from an command prompt as administrator (not sure it matters): #!/bin/bash
# Author: http://crunchbang.org/forums/viewtopic.php?id=38748#p414992
# m4bronto
# Chapter #0:0: start 0.000000, end 1290.013333
# first _ _ start _ end
while [ $# -gt 0 ]; do
ffmpeg -i "$1" 2> tmp.txt
# we'll just initialize a counter variable and increment it to prefix each chapter title
$COUNT = 1
while read -r first _ _ start _ end; do
if [[ $first = Chapter ]]; then
read # discard line with Metadata:
read _ _ chapter
let "COUNT = COUNT + 1"
#ffmpeg -vsync 2 -i "$1" -ss "${start%?}" -to "$end" -vn -ar 44100 -ac 2 -ab 128 -f mp4 "$chapter.mp4" </dev/null
# this is looking pretty good now. Need to add a couple things:
# for the first chapter, need to skip at least 6 seconds at the beginning
# also skip the last 6 seconds of the last chapter (strip out the playon info
ffmpeg -i "$1" -ss "${start%?}" -to "$end" -c copy -scodec copy "$COUNT$chapter.mp4" </dev/null
fi
done <tmp.txt
echo $COUNT
rm tmp.txt
shift
done
# Now create the mylist.txt file:
for f in *Video*.mp4; do echo "file '$f'" >> mylist.txt; done |
That didn't turn out well! I'll have to attach it |
Thanks! I took the liberty of editing your comment and added the quotes to make it properly formatted! One last thing I wonder if you tried in LosslessCut: Did you try to toggle from "keyframe cut" to "normal cut" mode? because it controls whether |
I think I tried it both ways, but I'm not sure?
…On 2/12/2022 11:04 AM, Mikael Finstad wrote:
I took the liberty of editing your comment and added the quotes to
make it properly formatted!
One last thing I wonder if you tried in LosslessCut: Did you try to
toggle from "keyframe cut" to "normal cut" mode? because it controls
whether |-ss| is placed before |-i| or after it. I can see in your
script that it's after |-i|, so maybe that was what makes the difference.
—
Reply to this email directly, view it on GitHub
<#998 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQ5CXCLTU7EJ6O6DRHXK43U22AJVANCNFSM5MYYHPNQ>.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
did you try to disable all tracks except video/audio inside losslesscut before exporting? |
I updated your program a couple days ago, no further updates needed. I did the update because before, I was using it to remove advertising, and the merged video came out longer or the same length and the fps was changed from the original. The difference was only about 15 minutes added, but it also messed up the subtitle timing. In this update, it's totally messed up! My 1:30 video with ads came out to 9:30 minutes after stripping the ads. The first segment timing appears to be correct at 10:06 minutes, but the second segment came out to 3:14:22 and the 3rd segment at 6:07:25! I wasn't even able to play the merged video past the first segment! I have tried a couple different options, this last run I disabled Shift timestamps (avoid_negative_ts), but the first attempt I had set it to auto. It does seem to be preserving the framerate now on all the segments (29.97 fps) but the results are still not good. Maybe I am doing something wrong? There doesn't seem to be much in the way of instructions for what I want to do? Help! And Thanks! Version is 3.42.0
The program asked me to include this:
No error
The text was updated successfully, but these errors were encountered: