Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th May 2020, 02:05   #1  |  Link
Kyaneos
Registered User
 
Join Date: Nov 2005
Posts: 33
Encode video with the same properties of another video

Hello!

I need to encode a video (video 1) that has the same properties of another video (video 2) so that I can join both with mkvtoolnix.

This is the mediainfo of video 2:

Code:
Vídeo
ID                                       : 2
Formato                                  : AVC
Formato/Info                             : Advanced Video Codec
Formato del perfil                       : High@L4
Ajustes del formato                      : CABAC / 4 Ref Frames
Ajustes del formato, CABAC               : Sí
Ajustes del formato, RefFrames           : 4 fotogramas
ID códec                                 : V_MPEG4/ISO/AVC
Duración                                 : 32 s 32 ms
Tipo de tasa de bits                     : Constante
Tasa de bits                             : 7 993 kb/s
Tasa de bits nominal                     : 10 000 kb/s
Ancho                                    : 1 920 píxeles
Alto                                     : 816 píxeles
Relación de aspecto                      : 2,35:1
Modo velocidad fotogramas                : Constante
Velocidad de fotogramas                  : 23,976 (24000/1001) FPS
Espacio de color                         : YUV
Submuestreo croma                        : 4:2:0
Profundidad bits                         : 8 bits
Tipo barrido                             : Progresivo
Bits/(píxel*fotograma)                   : 0.213
Tamaño de pista                          : 30,5 MiB (93%)
Default                                  : Sí
Forced                                   : No
Rango de color                           : Limited
Colores primarios                        : BT.709
Características transferencia            : BT.709
Coeficientes matriz                      : BT.709
A sample from the video 2:

https://mega.nz/file/GRhkmADD#IXyIq2...Sqpzt-5twe6mFM

I have tried different options to encode video 1 in x264, trying to make them the same as the video 2, but when trying to join them mkvtoolnix gives error ("the formats do not match")

Any ideas?, my main objective is not to recode the video 2.

Thanks in advance!
Kyaneos is offline   Reply With Quote
Old 24th May 2020, 07:11   #2  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by Kyaneos View Post
I have tried different options to encode video 1 in x264, trying to make them the same as the video 2, but when trying to join them mkvtoolnix gives error ("the formats do not match")
Take a closer look at the error message. It should tell you which tracks it tried to append. The message "formats do not match" is not about two H.264 tracks with different settings but e.g. you trying to append a video track to an audio track. Fix your command line (see mkvmerge doc about --append-to option or use the GUI). Use mkvmerge -i "file.mkv" to see TrackIDs as used by mkvmerge, not MediaInfo.
sneaker_ger is offline   Reply With Quote
Old 24th May 2020, 15:14   #3  |  Link
Kyaneos
Registered User
 
Join Date: Nov 2005
Posts: 33
Quote:
Originally Posted by sneaker_ger View Post
Take a closer look at the error message. It should tell you which tracks it tried to append. The message "formats do not match" is not about two H.264 tracks with different settings but e.g. you trying to append a video track to an audio track. Fix your command line (see mkvmerge doc about --append-to option or use the GUI). Use mkvmerge -i "file.mkv" to see TrackIDs as used by mkvmerge, not MediaInfo.
Thank you very much, now it works!

One last question, the video 2 has a DAR of 959:408, what fraction do I have to use in the --sar parameter of the encoding of video 1 to get the same DAR of video 2?

Remember that the resolution of both videos is 1920x816.

Thanks!
Kyaneos is offline   Reply With Quote
Old 24th May 2020, 15:23   #4  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Your sample has SAR of 799:800.
sneaker_ger is offline   Reply With Quote
Old 8th July 2020, 22:56   #5  |  Link
Kyaneos
Registered User
 
Join Date: Nov 2005
Posts: 33
Quote:
Originally Posted by Kyaneos View Post
Thank you very much, now it works!

One last question, the video 2 has a DAR of 959:408, what fraction do I have to use in the --sar parameter of the encoding of video 1 to get the same DAR of video 2?

Remember that the resolution of both videos is 1920x816.

Thanks!
I thought it worked because mkvtoolnix finished the job but checking the resulting video there are color issues (constant changes).

Looking at the mkvtoolnix log I found this:

--- Warnings emitted by job Multiplexing to file...
The track number 0 from the file 'Part 2.mkv' can probably not be appended correctly to the track number 0 from the file 'Part 1.mkv': The codec's private data does not match (lengths: 61 and 44). Please make sure that the resulting file plays correctly the whole time. The author of this program will probably not give support for playback issues with the resulting file. "

Does anyone know how I could fix it?
Kyaneos is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.