News:

--

Main Menu

Can't append file with same codec

Started by BillBaldwin2, November 12, 2021, 06:28:11 PM

Previous topic - Next topic

BillBaldwin2

I have two videos--A and B--both taken with the same camera and settings. I can open A in Avidemux, append B, and save the result in Copy mode and it plays with no problem. But I want to add a logo to B (and only B). So I open B in Avidemux 2.7 64-bit, use the Add logo feature to add a logo and save it with Video Output Mpeg4 AVC (x264). The new video, B-logo, plays fine. Now I open A in Avidemux. I choose Append (Ctrl-A) and append B-logo. I leave Video Output set to Copy and try to Save AplusB-logo. Avidemux tells me: "Codec or codec settings across a cut point do not match. Playback of the video saved in copy mode may stop at this point. Do you want to continue anyway?" I select Yes, but as predicted, the video goes wonky at the point where B-logo was supposed to kick in.

I have checked the properties of both A, B, and B-logo in VLC. They all say "Codec: H264 - MPEG-4 AVC (part 10) (avc1)". I don't know what every part of that means, but it would seem all the videos have the same codec and I shouldn't be getting that warning that codec settings don't match.

What am I missing? And is there a way to save B with a logo and tell Avidemux to use the exact same settings as the original file when saving? It is possible to append B-logo to A and re-encode the whole thing using Mpeg4 AVC (x264). But I would prefer to avoid this. I don't want to lose quality on A, which is long and large, just to make it work with B-logo.

szlldm

"Codec or codec settings across a cut point do not match. Playback of the video saved in copy mode may stop at this point. Do you want to continue anyway?"
This message clearly explain, that the two video have different codec (or codec settings). You can not use copy mode in this case (only when both video have perfectly the same codec and codec settings).
The only possible solution is to append the original A and B, apply the logo only to the B part (change the filter to partial), then re-encode it into a single video.

BillBaldwin2

Quote from: szlldm on November 12, 2021, 06:46:18 PM"Codec or codec settings across a cut point do not match. Playback of the video saved in copy mode may stop at this point. Do you want to continue anyway?"
This message clearly explain, that the two video have different codec (or codec settings). You can not use copy mode in this case (only when both video have perfectly the same codec and codec settings).
The only possible solution is to append the original A and B, apply the logo only to the B part (change the filter to partial), then re-encode it into a single video.

Thank you, but I feel that you may not have read my original post where I address all these issues.

1. The videos DO have the same codec and codec settings according to VLC. How would I determine what Avidemux thinks those settings are and where they differ?

2. Avidemux does not appear to give me a way to save the video with a logo using what it thinks are the same codec and settings. How would I do that?

3. I do not WANT to "re-encode it into a single video" because video A is VERY large and long. I do not want to lose quality via re-encode (to say nothing of waiting half an hour for the re-encode to finish) just to append a very brief video B with a logo.

szlldm

1. No, it is not true. The codec may be the same ("Codec: H264 - MPEG-4 AVC (part 10) (avc1)"), but not the settings (for example bitrate, and many more parameters).

3. You cant do this unfortunately without re-encode. Maybe you can try to config the encoder to the exact same parameters, but it probably wont work.

szlldm

For example all of these should match (an example:)
Encoding settings: cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1,00:0,00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=4500 / ratetol=1,0 / qcomp=0,60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20,0 / qblur=0,5 / vbv_maxrate=62500 / vbv_bufsize=62500 / nal_hrd=none / filler=0 / ip_ratio=1,40 / aq=1:1,00

BillBaldwin2

Quote from: szlldm on November 12, 2021, 07:01:14 PM1. No, it is not true. The codec may be the same ("Codec: H264 - MPEG-4 AVC (part 10) (avc1)"), but not the settings (for example bitrate, and many more parameters).

3. You cant do this unfortunately without re-encode. Maybe you can try to config the encoder to the exact same parameters, but it probably wont work.

Thanks. I was afraid of that, but I appreciate the reply. Yeah, I've fiddled with the parameters trying to get them to match up; but as you predicted, I did not have success. I appreciate your next message with the detailed list of all the parameters to check.

eumagga0x2a

Alt+Return while a video is loaded opens the Properties dialog which shows the first 64 bytes of so-called codec extradata (full extradata is printed to admlog.txt in %localappdata%\avidemux\). For an append operation to produce a playable video when saved in copy mode, the extradata of both videos must match perfectly, from the first to the last byte.