1 (edited by masterpdon 04-03-2025 16:55:30)

Topic: Transcoding seems broken for split video files after recent update.

I often split large videos into 10 minute chunks before transcoding each and merging them back together, because electricity is unstable in my country and I don't want to start again from 0% after my PC loses power at 87%. This has worked well so far, until the last update.

It seems transcoding no longer works for split files, particularly the second segment and upwards as it seems to work fine on the first segment.  I have 12 segments of videos and before the update, I had the first 10 already transcoded. Today, I tried to transcode the 11th and got the error. Tried with the 10th, and 2nd, and also got the error. But transcoding the 1st works fine.

I use FFMPEG to split the videos using the params

-c copy -map 0 -segment_time 10:00 -copyts -avoid_negative_ts make_non_negative -f segment -reset_timestamps 1

.

Below is the logs for one of the segments I already transcoded earlier, throwing the error.

04:38:40.342: ===== Starting mpv ======
04:38:40.342: Command line: C:\Program Files (x86)\SVP 4\mpv64\mpv.exe D:/Mufasa The Lion King (2024) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Mufasa.The.Lion.King.2024_SplitVideos/Mufasa.The.Lion.King.2024010.mkv --o=D:/Mufasa The Lion King (2024) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Mufasa.The.Lion.King.2024_SplitVideos/Mufasa.The.Lion.King.2024010.SVP.temporary.mkv --no-audio --no-sub --no-sub-auto --input-ipc-server=mpvencodepipe --input-media-keys=no --no-msg-color --video-crop=0x0+0+0 --vf=vapoursynth:[C:\Users\Peter Egunjobi\AppData\Roaming\SVP4\scripts\ffff.py]:4:7 --of=matroska --ovc=hevc_nvenc --ovcopts=b=77059334,preset=slow,rc=vbr,maxrate=100177134,bufsize=154118668,time_base=1000/60000,threads=7
04:38:40.389: ● Video --vid=1 (hevc 3840x2080 24 fps) [default]
04:38:40.389: ○ Audio --aid=1 (aac 6ch 48000 Hz) [default]
04:38:40.389: ○ Subs --sid=1 --slang=eng 'SDH' (subrip) [default]
04:38:42.755: [autoconvert] Converting yuv420p10 -> p010
04:38:42.905: VO: [lavc] 3840x2080 => 3855x2080 p010
04:38:42.905: [vo/lavc] Opening encoder: NVIDIA NVENC hevc encoder [hevc_nvenc]
04:38:43.289: [encode] Opening output file: D:/Mufasa The Lion King (2024) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Mufasa.The.Lion.King.2024_SplitVideos/Mufasa.The.Lion.King.2024010.SVP.temporary.mkv
04:38:43.289: [encode] Opening muxer: Matroska [matroska]
04:38:43.403: V: 00:00:00 / 00:10:01 (0%) {1.8min 0.0MB}
04:38:44.712: [ffmpeg] matroska: pts (50) < dts (67) in stream 0
04:38:44.712: [encode] Writing packet failed.
04:38:46.063: Exiting... (Interrupted by error)
04:38:46.187: (!!!) Intermediate file may be broken: D:\Mufasa The Lion King (2024) [2160p] [4K] [WEB] [5.1] [YTS.MX]\Mufasa.The.Lion.King.2024_SplitVideos\Mufasa.The.Lion.King.2024010.SVP.temporary.mkv

And here's the log for the first segment (which doesn't throw error) if needed. Note that I didn't finish the transcoding.

06:39:18.757: ===== Starting mpv ======
06:39:18.757: Command line: C:\Program Files (x86)\SVP 4\mpv64\mpv.exe D:/Mufasa The Lion King (2024) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Mufasa.The.Lion.King.2024_SplitVideos/Mufasa.The.Lion.King.2024000.mkv --o=D:/Mufasa The Lion King (2024) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Mufasa.The.Lion.King.2024_SplitVideos/Mufasa.The.Lion.King.2024000.SVP.temporary.mkv --no-audio --no-sub --no-sub-auto --input-ipc-server=mpvencodepipe --input-media-keys=no --no-msg-color --video-crop=0x0+0+0 --vf=vapoursynth:[C:\Users\Peter Egunjobi\AppData\Roaming\SVP4\scripts\ffff.py]:4:7 --of=matroska --ovc=hevc_nvenc --ovcopts=b=77059334,preset=slow,rc=vbr,maxrate=100177134,bufsize=154118668,time_base=1000/60000,threads=7
06:39:18.815: ● Video --vid=1 (hevc 3840x2080 24 fps) [default]
06:39:18.815: ○ Audio --aid=1 (aac 6ch 48000 Hz) [default]
06:39:18.815: ○ Subs --sid=1 --slang=eng 'SDH' (subrip) [default]
06:39:21.111: [autoconvert] Converting yuv420p10 -> p010
06:39:21.175: VO: [lavc] 3840x2080 => 3855x2080 p010
06:39:21.175: [vo/lavc] Opening encoder: NVIDIA NVENC hevc encoder [hevc_nvenc]
06:39:21.566: [encode] Opening output file: D:/Mufasa The Lion King (2024) [2160p] [4K] [WEB] [5.1] [YTS.MX]/Mufasa.The.Lion.King.2024_SplitVideos/Mufasa.The.Lion.King.2024000.SVP.temporary.mkv
06:39:21.566: [encode] Opening muxer: Matroska [matroska]
06:39:21.754: V: 00:00:00 / 00:10:02 (0%) {6.4min 0.0MB}
06:40:02.846: -- PAUSED --
06:57:11.727: -- RESUMED --
06:57:11.748: V: 00:00:06 / 00:10:02 (1%) {2549.0min 0.4fps 3957.6MB}
06:57:13.675: -- PAUSED --
06:57:32.821: -- RESUMED --
06:58:12.053: V: 00:00:13 / 00:10:02 (2%) {694.5min 0.7fps 4335.1MB}
06:58:19.410: -- PAUSED --

Edit: Seems to only affect mkv files.

Re: Transcoding seems broken for split video files after recent update.

In the meantime, I'd like to revert to the previous version but I can't find anywhere I can do that.

Re: Transcoding seems broken for split video files after recent update.

masterpdon wrote:

In the meantime, I'd like to revert to the previous version but I can't find anywhere I can do that.

I think chainik can help you with that , but for future updates a good advice its copy the entire SVP folder as a backup.

Re: Transcoding seems broken for split video files after recent update.

previous mpv build: https://www.svp-team.com/files/repo/ful … 69mpv64.7z

Re: Transcoding seems broken for split video files after recent update.

Drakko01 wrote:
masterpdon wrote:

In the meantime, I'd like to revert to the previous version but I can't find anywhere I can do that.

I think chainik can help you with that , but for future updates a good advice its copy the entire SVP folder as a backup.

Noted.

Re: Transcoding seems broken for split video files after recent update.

I'm still getting the error with this.

Re: Transcoding seems broken for split video files after recent update.

04:38:44.712: [ffmpeg] matroska: pts (50) < dts (67) in stream 0
04:38:44.712: [encode] Writing packet failed.
04:38:46.063: Exiting... (Interrupted by error)

This error again or another one?
Write here error message please?

06:39:18.757: Command line: C:\Program Files (x86)\SVP 4\mpv64\mpv.exe

Check you are using the proper mpv from this folder.

Re: Transcoding seems broken for split video files after recent update.

Yes, the same error again.

01:06:35.376: V: 00:00:00 / 00:09:59 (0%) {1.4min 0.0MB}
01:06:36.119: [ffmpeg] matroska: pts (100) < dts (200) in stream 0
01:06:36.120: [encode] Writing packet failed.
01:06:36.739: Exiting... (Interrupted by error)
01:06:36.839: (!!!) Intermediate file may be broken:......

I dropped the files chainik sent into C:\Program Files (x86)\SVP 4\mpv64.

Is no one else able to reproduce this? I guess this is not a general problem like I thought.

Re: Transcoding seems broken for split video files after recent update.

I'm pretty sure that this ffmpeg's pts check was always like this...
but you can share the file the used to work with some earlier version

10 (edited by masterpdon 09-03-2025 09:59:42)

Re: Transcoding seems broken for split video files after recent update.

I've transcoded several 4k mkv videos successfully, but I always delete the split segments once the transcoding and merging is done. I still have the segments for the current video, but they're quite large. The smallest segment that I successfully transcoded is 313MB. Let me know if you need that.

___________________________________________

Hey, I just tried something right after typing that. I switched Encoder - Basic to Encoder - Advanced, then I switched from MKV to As source, then I tried transcoding one of the segments that threw an error and...... no errors! It's currently at 2% now.

I've always used Encoder - Basic for transcoding, and I don't remember ever switching from MKV to As source or vice versa in Advanced.

So why is the ffmpeg check not happening for As source? Anyway, I'm happy to have a workaround now. Are there any consequences of using As source instead of MKV? One thing I've noticed is that the fps seems to have dropped from the usual 10-ish to 5.5.
_________

Edit: Switching from MKV to As source is not required. Switching from Encoder - Basic to Encoder - Advanced was enough to make it work. And changing from preset=slow to preset=fast increased the fps to 8.1. Anyway, this seems to be a parameters issue, right?
Edit: I was able to recreate the issue in Encoder - Advanced using the Default H.265/HEVC / NVENC preset, which is what I use in Basic. But changing preset=slow to preset=fast in this preset did not produce the error.