[Bug Report] Long Movies with edits won't transcode beyond edit
hello. I have many long Movies that don't finish trancoding and that means that after the first Chapter they just don't continue on the scene scrubber and also in preview generation. They also won't transcode any markers after the first chapter.
I found out that these files have edits. MP4box lists: "Track has 1 edits: track duration is 00:40:31.731" and that is exactly where the transcode ends on for these files. The file is much longer though and that is only the first chapter. Also there are no other edits on this file. I found out I am able to just:
MP4Box -raw 1 "input.mp4" -out video.h264 MP4Box -raw 2 "input.mp4" -out audio.aac MP4Box -add video.h264 -add audio.aac "output_remuxed_no_edits.mp4" .
When I did this, the file has no more edits, and transcodes normally / fully. But this is extremly tedious to do in batch. Is there a way to pass stash to ignore these edits for transcodes? I found this flag for the mp4 demuxer in ffmpeg: "-ignore_editlist 1" . But when I pass that in "FFmpeg Transcode Input Args" , the log in stash just throws errors. 😦 Does anyone know how i could pass this to stash?
the input args is formatted weirdly, you need to split it up over multiple lines
-ignore_editlist
1
Thank you for the input / answer... I have input it like you said in multiple lines. Now the log shows no error but the transcode still ignores everything after the edit. It will never transcode after the edit. I have also tried the following flag without success:
-advanced_editlist 0
Also I get the following error for the file in the log:
"2025-05-18 11:34:13 Error
Error generating phash: generating sprite screenshot: decoding image: image: unknown format"
The file is a 720p - mp4 container.
Still scrubber and transcode gets generated correctly up till the end of the first chapter of the editlist. Then it just breaks. I cant scrub further. Opening the file with vlc or another player plays the file just fine.
Also the syntax between mp4box and ffmpeg is different, is there any way that you can replicate it with ffmepg?
ffmpeg -i source.mp4 -c:v copy -c:a copy output.mp4 should not do any encoding and just run at disk speed
this is the output. The resulting file too stops right after the edit. The resulting file also is only 1/5 in size as it is only half an hour of a 3 hour movie. passing an "-ignore_editlist 1" before -i will transcode the whole movie correctly though. but stash somehow does not interpret the command? I mean why does it work with ffmpeg directly but not with the same command in stash??
Can I add the "ignore_editlist 1" somewhere else in stash? Maybe rewriting a file?
D:\Transcoding>ffmpeg -i definatelynotprn.mp4 -c:v copy -c:a copy output.mp4 ffmpeg version 2025-05-15-git-12b853530a-full_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers built with gcc 15.1.0 (Rev4, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 60. 2.100 / 60. 2.100 libavcodec 62. 3.101 / 62. 3.101 libavformat 62. 0.102 / 62. 0.102 libavdevice 62. 0.100 / 62. 0.100 libavfilter 11. 0.100 / 11. 0.100 libswscale 9. 0.100 / 9. 0.100 libswresample 6. 0.100 / 6. 0.100 [mov,mp4,m4a,3gp,3g2,mj2 @ 000001efbdb8f280] st: 0 edit list: 1 Missing key frame while searching for timestamp: 120 [mov,mp4,m4a,3gp,3g2,mj2 @ 000001efbdb8f280] st: 0 edit list 1 Cannot find an index entry before timestamp: 120. Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'definatelynotprn.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isom creation_time : 2014-02-22T12:03:04.000000Z Duration: 03:00:44.74, start: 0.000000, bitrate: 5172 kb/s Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 5016 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 151 kb/s (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Output #0, mp4, to 'output.mp4': Metadata: major_brand : isom minor_version : 1 compatible_brands: isom encoder : Lavf62.0.102 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 5016 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : VideoHandler vendor_id : [0][0][0][0] Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 151 kb/s (default) Metadata: creation_time : 1970-01-01T00:00:00.000000Z handler_name : SoundHandler vendor_id : [0][0][0][0] Press [q] to stop, [?] for help [out#0/mp4 @ 000001efbdf70740] video:1222190KiB audio:201198KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.252974% frame=59647 fps=4819 q=-1.0 Lsize= 1426989KiB time=00:33:10.15 bitrate=5873.9kbits/s speed= 161x elapsed=0:00:12.37
Then you have to make sure it add it to transcode (not live) INPUT arguments, not output
they also don't apply on generate, only on generate -> transcode. The alternative is to add a wrapper to ffmpeg but that might be a bit more involved
I already tried it on transcode INPUT and it did not work. I tried alot of flags actually. All didn't work. The weird thing is that even the Preview Timeline under the seekbar shows only the first chapter stretched over the whole 3 hour runtime of the movie. The preview picture that shows when hovering over the seekbar is also wrong.
This affects many multi hour movies with chapters. So a reencode of the one problematic file is not a soloution.
So I need to pass these "-ignore_editlist 1" to the preview generation somehow...
I already tried it on transcode INPUT and it did not work.
If it's not working with transcodes that's a different problem. Setting it there will only apply to transcodes, not generate, not anything else
So I need to pass these "-ignore_editlist 1" to the preview generation somehow...
yes, wrapper is usually the way people go around it
Thank you for pointing out that is not caused / fixable with transcode parameters.
If you mean wrapper, what exactly do you mean? The scene scrubber in galleryview, the scene scrubber and preview all get wrong preview images. how can I tell these scripts that run to generate these to use "-ignore_editlist 1" ?
I get that this is not normal that files have such weird editlists. But is it expected behaviour for stash to look at these editlists for anything? Wouldn't it be better to default to "-ignore_editlist 1" ?
Is there a sample mp4 file available somewhere with this editlist concept that I can use to test?