save from TV recordings fails with "Error -22 ("Invalid argument"

Started by ConniKoburg, January 17, 2025, 07:04:30 PM

Previous topic - Next topic

ConniKoburg

Hi,
I am using Avidemux for several years meanwhile to cut movies out of TV recordings (ts-stream). Since several months recordings from certain german HD programs (BR, SWR) stop when saving with an error "video is incomplete.. Error -22 ("invalid argument")". I found out that this happens after a certain length ~15 minutes and it does not relate to (erroneous) positions in the video! As long as the snippets are beyond a certain duration. I can cut and reassamble the complete movie. So the video stream seems OK, but something has changed in the transport stream characteristics or in Avidemux. The latter is less probable as older versions (2.7) show the same issue but worked well before. This is the related section from the log:

[adm_lavLogCallback] 18:45:27-911 [lavc] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 47034000 >= 47034000
[muxerFFmpeg::saveLoop] Error -22 (Invalid argument) writing audio packet
[muxerFFmpeg::saveLoop] 18:54:24-319 [FF] Wrote 47023 frames, nb audio streams 4
[muxerFFmpeg::saveLoop] 18:54:24-319 [FF] Found 0 missing PTS / 47023 total frames
[MP4] Closing

Who is able to find and fix the issue? I can provide ts files but 3Gbytes is the minimal size needed to run into the problem.

eumagga0x2a

Quote from: ConniKoburg on January 17, 2025, 07:04:30 PMSince several months recordings from certain german HD programs (BR, SWR)

Transmitted over satellite? Cable? Terrestrial (DVB-T2)?

Does the issue persist with r241212 Avidemux 2.8.2 nightly build from here (no matter ZIP- or installer-packaged)?

If it does, please provide a sample via WeTransfer (2 GiB limit, no email required despite the site trying to suggest the opposite), Mega, Dropbox or Google Drive. If necessary, you may split the sample in content-agnostic way with a tool equivalent to split from the coreutils package on Linux in sequentially named fragments. I can easily concatenate them later.

eumagga0x2a

Quote from: ConniKoburg on January 17, 2025, 07:04:30 PM[adm_lavLogCallback] 18:45:27-911 [lavc] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 47034000 >= 47034000
[muxerFFmpeg::saveLoop] Error -22 (Invalid argument) writing audio packet

I should have added that the errors writing audio packets (here on the second line) are ignored and this one is irrelevant to the problem. Saving the video fails because of a decode timestamp (dts) collision in the video stream (the first line).

Jan Gruuthuse

I had this occuring sometimes on German FTA Sat TV channels.
Check you reception signal on these channels
Switch to the equivallent channel.
Like
BR Switching between North and Sud
RBB switch between Berlin / Brandenburg
SWR switch to SR
could be something within the streams

Check you reception signal between horizontal vertical transponders (snr or db)
and the quallity of the qurrent stream (AGC 100% and BER 0).
your dish or LNB maybe not alligned anymore due to the recent storms

passing a faulty recorded stream through MKVToolNix may sometimes help to recover the video, some artefacts may appear in the video (pixellation)

Jan Gruuthuse

there is a new sattelite on (19.2°E): Astra 1P
could not be a bad idea to rescan this position