VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member
    Join Date: Jul 2014
    Location: United States
    Search Comp PM
    Why hello everyone!

    I'm new here and happy to join the forums! ^^
    I'm no stranger however to this site as I've known it for sometime but I don't know how long haha.

    Anywho i'm not here to just introduce myself, I actually need some help from one of the experts
    on identifying/analyzing the codec's private data of a intro of an cartoon.

    I have an entire season of a cartoon called The Amazing World of Gumball and plan on appending
    a intro to them all as some don't have it!

    So I used Avidemux to cut and mux a video out without encode and plan on appending
    a very short black screen video to the end of the intro so it doesn't abrupt go to the episode.

    I'm basically making a short fade-in for the intro.
    Now the major problem is that i'm having trouble trying to re-encode the black screen video
    to match the intro's because whenever I try to append the black screen video to the intro through
    mkvmerge, I get an error saying that the video's codec data doesn't match and the output plays a glitched
    up ending.

    Now I learned rather recently on how to fix this problem and make a video re-encode and match
    an un-encoded video. But...the problem is that intro does not contain any encoder settings at all! (that x264 usually writes
    when a video is encoded in it in the metadata)

    Here's the intro's mediainfo to explain what I mean:

    General
    Unique ID : 130605485362995387275886836694030546413 (0x6241B396908403B5FF1221A8B8C4F5ED)
    Complete name : C:\Users\NwiiKYAmm\Desktop\Gumball Season 2 Intro\Intro v2 Original.mkv
    Format : Matroska
    Format version : Version 4 / Version 2
    File size : 21.5 MiB
    Duration : 20s 240ms
    Overall bit rate : 8 913 Kbps
    Writing application : Lavf55.37.102
    Writing library : Lavf55.37.102

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 4 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 20s 240ms
    Width : 1 920 pixels
    Height : 1 080 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Constant
    Frame rate : 25.000 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Default : Yes
    Forced : No
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : A_AAC
    Duration : 20s 240ms
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Default : Yes
    Forced : No
    As you can see, they're no x264 encoder settings so I don't know how to encode another video
    to match and append it.

    All these days of trying to analyse and figure out what the video is encoding in, I was only able to find
    out these three things of it:

    It has no weight p or weight b and it has no deblocking.
    That is all I know and couldn't find out anything else about the video.

    Yeah...i'm stuck and on the verge of giving up and I don't want to re-encode the intro
    as that would break compatibility with all the episodes I want to append it to.

    Can anybody help in analyzing what the intro's codec data settings consist of?
    Like what it's Trellis is, or bframes, or something?

    If you can't do that, then you can guys try to experiment and encode basically
    any video to append close to successfully to the video without it coming out all glitchy?

    Here's the link to the intro along with a copy of the intro to be used as a test
    to try to re-encode it to match and append both videos correctly.

    http://up.ht/TTYRe8

    I hope you don't mind this at all and if you do, sorry.

    Really I tried everything including ffmpeg (command line), x264 command line, and other stuff.
    Just can't figure out a way to encode and match the codec settings of one video to match the original
    intro I made.

    Thanks and i'll reply if you need anything else!
    Quote Quote  
  2. I'm not an expert on this. If I need to re-encode a section of video for some reason I generally save myself a lot of hassle and just re-encode it all, which no doubt isn't practical in your case.

    The MediaInfo example you posted, was that cut from the very beginning of the video? I ask because when you split a video, if the original encoder settings had been written they're usually not re-written to all the split pieces. The cut section might need to be from the very beginning of the video to retain the encoder settings.

    Not all encoders write the settings and I assume it's possible the x264 encoder wasn't used originally, so matching settings might be fairly impossible.

    Someone posted in this thread saying VideoRedo successfully appended video MKVMergeGUI wouldn't. I'd still be keen to know how it does it if it can, but it appears you can download a trial version so it might be worth shot.
    Last edited by hello_hello; 10th Jul 2014 at 05:20. Reason: spelling
    Quote Quote  
  3. Member
    Join Date: Jul 2014
    Location: United States
    Search Comp PM
    Well actually the mediainfo I got from the video is just from the video's intro!

    Also yes the encoder settings were indeed missing from the original episode as well
    even before splitting it. It's basically (besides the overall bitrate which doesn't matter since it
    appends to all the episodes) the same as the original video I had before splitting it.

    Yeah...you may be right in that the video originally was never encoded in
    x264 in the first place and it may be very impossible/hard to re-encode and match
    another video to it without those settings, but I believe there's a way to do it.

    I just need enough info to try to encode and append the video
    to the original intro! I believe there's a way someone can use some media tool
    to analyse and output the info of the original intro's codec data settings or something along those lines.

    I'm patient though and don't mind if it takes a while hehe!

    ...Hmm, interseting. I never heard of VideoReDo until now and see that it is compatible with H264 (from reading
    the newest update release notes), i'll be sure to give the trial a try and see how it works!

    Maybe it can re-encode the video and append it to the original video
    or something along those lines. I'll report back how it goes. =)

    Thanks Hello_Hello for the link to the thread and program as well!
    I really appreciate the help hehe!
    Quote Quote  
  4. Member
    Join Date: Jul 2014
    Location: United States
    Search Comp PM
    I have tried out VideoRedo and figure out how to join/append video files together!
    Yup and I tested by appending the original intro with another, differently encoded intro
    to see how they both append together and...well it worked!

    Surprisingly it was very quick and the videos were appended together successfully
    in just mere seconds and played back well which is great!

    Though the problem is that when I use mkvmerge to see if the original
    intro appends to the combined videos I made in Videoredo, it didn't work at all.

    So I used Videoredo again to append basically the same original intro video together
    which I did in seconds indeed! I did this in hopes of reading the log file to see if VideoRedo
    can give me info on the video of the same thing without changing it at all and it did!

    I'll get to that in a bit but for now, I joined the same original intros together and
    I was in hope that mkvmerge can append...the same original intro to the combined
    intro. Basically i'm re-appending the original intro a third time to the joined intros I made in VideoRedo.

    From the looks of the time it took to join the videos, I thought appending the intro a third time
    wouldn't cause any incompatible at all. But to my surprise, instead of the video appending without any problem it instead showed that the codec's private data is incompatible with the same intro that it is!

    I played the output file thinking that codec's private data may be different but still compatible
    with the intro...and I was wrong. The appended intro came out glitchy and grey like as if it's not
    compatible with the same intros I joined in VideoRedo.

    So that means that I can't use VideoRedo to append the intro to all the episodes without
    having to go through using VideoRedo itself and joining them in there.

    I would like to but...I rather not as I would like to use MKVmerge to correctly
    append the intros all the videos without using a trial program that'll expire in a few days.
    Alright I hope I didn't confuse any of y'all too much and if I did, then just know that I just
    joined the same intro that don't contain the x264 settings in Video Redo.

    After joining, I use the joined file to append the original, unjoined intro with it in MKVmerge
    to see if it joins okay/well without any problems and it didn't. That is all.

    I'm now gonna post some interesting info that VideoRedo read from the original intro
    when I opened it. This is taken from the log file and contains some interesting info that could
    help in encoding a video to match it...I think!

    Here you go and see ya!

    2014-07-10 02:33:43 H.264, Starting stream open for: C:\Users\NwiiKYAmm\Desktop\Gumball Season 2 Intro\Intro v2 Original (Don't re-encode).mkv
    2014-07-10 02:33:43 H.264, Doing an IDR frame at cut end.
    2014-07-10 02:33:43 H.264 encoder info: Creating MainConcept (Consumer) H.264/AVC video encoder ...
    2014-07-10 02:33:43 H.264 encoder info: Version: 8.7.0.28412
    2014-07-10 02:33:43 H.264 encoder info: Platform: Windows 32bit
    2014-07-10 02:33:43 H.264 Encoder error: C043:H.264 Validation Error: bit rate value does not match HRD model. Should be 4689920.
    2014-07-10 02:33:43 H.264 Encoder error: C001:H.264 Validation Check: 1 error(s) found.
    2014-07-10 02:33:43 H264 encoder, Unable to initialize videoEncoder
    2014-07-10 02:33:43 H.264 encoder settings:
    bit_rate : 4689920
    bit_rate_buffer_size : 737280
    bit_rate_mode : 2
    cb_offset : -2
    chroma_format : 2
    cpb_size_scale : 10
    def_horizontal_size : 1920
    def_vertical_size : 1080
    enable_inter_8x8 : 1
    enable_inter_big : 1
    enable_intra_8x8 : 1
    enable_intra_big : 1
    entropy_coding_mode : 1
    frame_rate : 25.000000
    hrd_maintain : 1
    idr_frequency : 1
    idr_interval : 24
    level_id : 40
    log2_max_frame_num : 5
    log2_max_poc : 7
    max_bit_rate : 4689984
    max_l0_active : 4
    max_l1_active : 4
    max_quant : 51
    num_reference_frames : 4
    pic_order_present_flag : 1
    profile_id : 3
    quant_mode : 2
    rd_optimization : 1
    reordering_delay : 3
    sar_height : 1
    sar_width : 1
    search_range : 63
    stream_type : 2
    use_b_slices : 1
    vbv_buffer_fullness : 368640
    vbv_buffer_fullness_trg: 737280
    vbv_buffer_units : 1
    video_format : 5
    video_type : 5
    vui_presentation : 155
    write_au_delimiters : 1
    write_pic_par_set : 1
    write_seq_par_set : 1

    2014-07-10 02:33:43 H.264 encoder info: Creating MainConcept (Consumer) H.264/AVC video encoder ...
    2014-07-10 02:33:43 H.264 encoder info: Version: 8.7.0.28412
    Quote Quote  
  5. That's way too much appending for me when I'm this tired. I couldn't keep up!

    Thanks for posting the info but I'm not sure I fully understand the log file in respect to what VideoRedo is doing in order to make the videos appendable. Did it re-encode anything or did it simply join the two?

    I only vaguely understand it but I think the "codec private data" tells the decoder how the video needs to be decoded and if it doesn't match the next appended segment can be decoded incorrectly. Maybe someone else will know more about what VideoRedo does.

    I know it's not free but I might give the trial version a spin myself at some stage to see if I can understand what it's doing better. Just out of curiosity.
    Quote Quote  
  6. Member
    Join Date: Jul 2014
    Location: United States
    Search Comp PM
    I'm tired too as it's 6:49 AM EDT here and i'll be going to bed momentarily...

    But yeah, a lot of appending has taken place hehe!
    Hope I didn't confuse you too much in explaining it all.

    Anywho about what VideoRedo did, I believe it...did join the videos but
    re-encode the videos in some sort of unique way.

    From checking the options, it has an "Intelligent recode" which was used in the joining
    of the videos and which is most likely why it was very quick when appending the videos
    as it likely changed a few parameters in the videos to make them compatible.

    Now if only it didn't had to change too much of the original intro and it
    could of been used in appending the black screen video. (and append it to
    all the episodes without using VideoRedo!)

    Oh well that ends well, also you may be correct on the private data part
    about the player decoding the appended video wrongly because of incorrect data.
    I just hope to reverse-analyse the original intro and use something like x264 to encode
    another video to match the intro correctly. (Along with containing the x264 encoder settings!)

    Thanks for helping and stay awesome hello_hello!
    I really appreciate the help hehe and goodnight/morning to ya too! =)

    Still i'll await any other help or knowledge on the intro's codec settings!
    Yup!
    Quote Quote  
  7. Member
    Join Date: May 2014
    Location: Tennessee, US
    Search Comp PM
    You have given no format or encoding info about your episodes. You don't say what you want for final output. Would it be BluRay? Mediainfo for your two intro samples suggests to me that it would not be BluRay compliant. The BD standard at 1920x1080 25fps calls for interlaced video, not progressive, and audio would be AC3 or PCM. So I assume that what you want for output is avchd, not regulation BluRay ??

    x264 is an encoder, not a codec. You also appear to be using MainConcept which is also an encoder, not a codec. The codec in common with these encoders is h264, not x264.

    The BluRay standards with which I'm most familiar and always use are outlined here: http://forum.doom9.org/showthread.php?t=154533. It also appears that your two sample intros have different GOP size limits. Strict BluRay and AVCHD video is limited to 2-second max GOP's. Your re-encoded sample has one of its GOP's at 250 frames. Not certain, but that might be one of the problems.

    Can't say much more. Lots of info posted here, but still not enough.
    Last edited by LMotlow; 10th Jul 2014 at 09:19.
    -ann's brother
    Quote Quote  
  8. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    You can try tsmuxer (then remux with mkvmerge)

    Or

    Encode the intro with different --sps-id . Use elementary stream. Demux original video & dos join the elementary streams . Join the audio separately using normal methods then mux audio & video . It doesn't matter that encoding settings are different , according to one of the main x264 developers (and I tested it out on several videos, surprisingly it works)

    see this thread for more info, near the end
    http://forum.videohelp.com/threads/365630-MKVMerge-Delay-with-Blackness
    Quote Quote  
  9. Member
    Join Date: Jul 2014
    Location: United States
    Search Comp PM
    In reply to LMotlow, I apologize for not giving much info out.

    Yes x264 is an encoder and h264 is the codec and indeed the two sample intros are different for
    a reason as the original intro has not been encoded differently but the intro test version has been.

    I only put the intro test in there so any of y'all can have another video to use and re-encode
    to see if you can match it with the original...yeah.

    Also all the episodes that I have are encoded the same way as the original intro and can be appended
    to them all as I tested myself. I just want to append a short black screen video to the end of the original intro
    but don't know how the video is encoded!

    Yeah and also i'm not trying to make the videos Blu-ray compliant as I'm not making a blu-ray disc hehe.
    I have all the episodes in mkv format and trying to add the intro to the ones that don't have them without
    having to re-encode the original intro. (As that would break compatibility.)

    Yup, I just want to output a video that's compatible with the intro so I can append it and append
    it to all the episodes without a intro. =)

    Again sorry for not explaining some things a bit further and also I didn't choose the Main Concept
    encoder as that was what VideoRedo used...but thanks for telling me that it's an encoder hehe.

    Hmm...GOP size...interesting. That's one thing to fix in making the videos compatible with the original intro!
    How can I change the GOP size in say...Handbrake through the x264 additional settings?
    If I can't do it in there then what can I use to change the GOP?

    Feel free to tell me if you can!
    ...Oh yeah, the re-encoded one is 250 frames so I wonder...what's the original GOP size is?
    That would be nice to know as well! That is all, thanks for kindly replying and see ya!

    Continue to be awesome as well.
    Quote Quote  
  10. Member
    Join Date: Jul 2014
    Location: United States
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Hello and cool, I see what kind of tool you're linking me to and it sure
    can be useful hehe!

    I would like to use it but...I still would like to try and figure out how
    to properly encode another video to append correctly to the original intro.

    However I will use this tool as a last resort if there's no way else to figure out
    a way to append a encoded video with the original intro. Basically when there's
    nothing else that we can do...

    Anywho thanks for posting the link to tsMuxer and the thread you mention as well
    about using Elementary Stream, sps-id and dos copy! I found and it's interesting to say
    the least hehe.

    Thanks for your kind help as well and see ya as well poisondeathray! =D
    Quote Quote  
  11. Member
    Join Date: Jul 2014
    Location: United States
    Search Comp PM
    Ah...decisions, decisions, decisions.

    Hello y'all, it's been sometime since I last posted on here
    and working on my video as i'm basically in blockade due to
    the unknown codec data of the Gumball intro, the original I cutted.

    Seeing as how no one has posted anything beyond the suggestions above
    nor me figuring out a way of encoding a video to match the original intro as I don't
    know anything besides what's known and posted above...

    I've decided to...give up and use the VideoRedo program as suggested by hello_hello.
    It's basically the best option since it barely re-encodes the video as it uses smart-encoding to change
    some video data being super quick and easy with barely-to-non quality drop at all.

    Yup!
    Still I have to say...thank you all for helping me on this problem i've been dealing with
    on the video, I really appreciate it a ton.

    This may be the last message i'll post on this thread so i'm just gonna say that it was
    nice posting and meeting some of y'all. This won't be the last of me coming here as
    I may come for something else on help in the future hehe.

    Actually...I wouldn't mind if any of you all have any other info to give on the intro
    and figuring out how to encode a video to match and append sucessfully to it.
    Though that is if you want to do it and I may certainly reply if you do post about it hehe!

    Besides that though, thanks for your kind help and suggestions!
    Good day/night to y'all and never stop being awesome as well! ^^
    Quote Quote