Avidemux não recorta vídeos MPEG-TS capturados com TotalMedia 3.5

Started by Raniere, December 23, 2022, 10:32:30 PM

Previous topic - Next topic

Raniere

Hello.
My name is Raniere, I'm from Brazil and I have some videos captured from open TV through the digital TV signal. The program used for the capture is TotalMedia 3.5.
This program generates .mpg files that seem to me to have a good compression ratio and good image quality. The files also have more than one (four) audio tracks and CC subtitles.

I would like to cut parts, like commercials, from the videos and keep the rest without re-encoding. It turns out that Avidemux cannot do this with these videos. Generating a zero byte size output file.

I would like to know if anyone can help solve this problem?

Attached is a text file with information about a video, generated by Mediainfo v20.08.

Raniere

Sorry, I forgot to translate the title into English. :-\
If the moderator wants or can correct it, feel free.

Title: Avidemux does not crop (cut) MPEG-TS videos captured with TotalMedia 3.5

eumagga0x2a

If the issue persists with the latest available nightly builds (please delete the *.idx2 index file created by an older Avidemux version first), please provide a sample video (a short one, if possible) via WeTransfer, Mega, Dropbox or Google Drive.

The title in Portuguese is not an issue, but the translation of "recorta" as "crop" is wrong, it should be either "cut" or "trim". We are speaking about saving parts of a video in copy mode. Cropping means removing outer areas of the picture which mandates re-encoding of the video stream 8)

Raniere

I already tried using one of the nightly builds. The most recent version in which I tried to cut the video was avidemux_2.8.2 r221127_win64.exe, as I had already read here on the forum that this could be an option to try.

Here is a one-minute video:
https://drive.google.com/file/d/1ychP1Olu-pWBZkB1Lq_GbMNXyKGPpauO/view?usp=share_link

Thanks for the correction. I see now that it was a mistake. Cut looks better. :) Thanks for the help with the word.

Yes, I am aware that there may be recoding when cutting a video. But I also know that there is the possibility of cutting video without all of it being recoded.

Raniere

Quote from: Raniere on December 23, 2022, 10:32:30 PMI would like to cut parts, like commercials, from the videos and keep the rest without re-encoding. It turns out that Avidemux cannot do this with these videos. Generating a zero byte size output file.
Sometimes it creates an output file that has only the audio, cuted correctly, but no video.

eumagga0x2a

Thank you for the sample. The direct reason for the failure to save in copy mode is DTS (decode timestamps) in the file being ahead of PTS (presentation timestamps) by a huge amount. DTS may not be higher than PTS.

Will try to figure out a way to handle such broken streams.

Raniere

When I play these videos using TotalMedia 3.5, trying to view the CC subtitle, I see that there is a very large desynchronization between the audio and the CC subtitle. This out-of-sync occurs in recorded video files, but I don't see the same issue when viewing the live stream.

Is this problem of lack of sync also related to what you are talking about?

eumagga0x2a

This appears plausible. ffplay keeps sync, probably by discarding broken timestamps. mpv gets completely derailed by them. You might want to try different means of capturing DVB to find out whether it is TotalMedia software or the broadcaster messing up timestamps.

Regarding Avidemux, the changeset [editor] Handle broken videos with DTS being uniformly delayed past PTS and some DTS missing should enable it to deal with streams with broken timestamps in the way they are broken in your sample. Please try a future nightly build.

Raniere

Quote from: eumagga0x2a on December 25, 2022, 11:15:07 PMPlease try a future nightly build.
Yes, of course, I will try.
And then I come back to report what happens.

Raniere

Quote from: eumagga0x2a on December 25, 2022, 11:15:07 PMPlease try a future nightly build.

Hello eumagga0x2a.
I tested the nightly builds versions "avidemux_2.8.2 r230111_win64.exe" and "avidemux_r230111_win64Qt5_149.zip" and I see that now they can cut end append videos generated by TotalMedia 3.5 without loss of quality (copy mode) and keeping all the audio tracks. That's very good!  :)

However, I see that the file generated after the cut loses the CC subtitle. Is there any way to keep the subtitles?

The video sample I prepared for you has subtitle (link above), but if you need I can prepare another sample with subtitle.

eumagga0x2a

Quote from: Raniere on January 17, 2023, 05:47:59 AMI see that the file generated after the cut loses the CC subtitle. Is there any way to keep the subtitles?

If they were EIA-608 closed captions, then yes, because such captions are stored inside the H.264 video stream (as SEI NAL untis). Unfortunately, in this case closed captions are supplied as a separate track while Avidemux supports only video and audio tracks. There is no infrastructure for subtitle tracks in Avidemux, it would be a major effort to create one.

Raniere

Quote from: eumagga0x2a on January 17, 2023, 11:10:17 PMIf they were EIA-608 closed captions, then yes, because such captions are stored inside the H.264 video stream (as SEI NAL untis).
Can Avidemux currently handle EIA-608 closed captions?

How exactly is a subtitle stored within a video? Could you point me to some material so I can learn about it?

Quote from: eumagga0x2a on January 17, 2023, 11:10:17 PMUnfortunately, in this case closed captions are supplied as a separate track while Avidemux supports only video and audio tracks. There is no infrastructure for subtitle tracks in Avidemux, it would be a major effort to create one.
It is a pity. :'(  Being able to keep the subtitles when cut videos would be a really nice feature. I believe it would make Avidemux really better than it already is.