VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 23 of 23
Thread
  1. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    I have four MPV files. They're four quarters of a football game. Three are 704x576 and mux together perfectly. One is 352x576 and won't co-operate.

    How can I scale it vertically to match everything else (which it already does on playback anyway, presumably due to an aspect ratio flag or something) while keeping it compatible with the other three?
    Quote Quote  
  2. That one has to be re-encoded to match if you want to append them

    If it's interlaced, you'd need to double rate deinterlace, scale, re-interlace

    Encode using the same settings as the other files, then append
    Quote Quote  
  3. Since the smaller clip only requires resizing horizontally it doesn't need to be deinterlaced before scaling.

    Another possibility is remux the videos into TS files, then just append the TS files. Resolution changes are allowed in TS files. Not all players will handle the changes properly though.
    Quote Quote  
  4. Originally Posted by jagabo View Post
    Since the smaller clip only requires resizing horizontally it doesn't need to be deinterlaced before scaling.
    Yes, sorry my bad
    Quote Quote  
  5. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Probably my bad actually, I got it wrong in the OP.

    However, none are my files originally and I'm not sure what settings were used, so I'm not sure how to go about the re-encoding step. I'd rather not re-encode the other three if that's avoidable.
    Quote Quote  
  6. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Here's the MediaInfo for one of the files I'm trying to match to:
    Code:
    Format                                   : MPEG Video
    Format version                           : Version 2
    Format profile                           : Main@Main
    Format settings, BVOP                    : Yes
    Format settings, Matrix                  : Custom
    Format settings, GOP                     : M=3, N=12
    Format settings, picture structure       : Frame
    Duration                                 : 31 min 55 s
    Bit rate mode                            : Variable
    Bit rate                                 : 4 362 kb/s
    Maximum bit rate                         : 9 555 kb/s
    Width                                    : 704 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 4:3
    Frame rate                               : 25.000 FPS
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Interlaced
    Scan order                               : Top Field First
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 0.430
    Time code of first frame                 : 00:00:00:00
    GOP, Open/Closed                         : Open
    GOP, Open/Closed of first frame          : Closed
    Stream size                              : 996 MiB (100%)
    Color primaries                          : BT.601 PAL
    Transfer characteristics                 : BT.470 System B, BT.470 System G
    Matrix coefficients                      : BT.601
    Quote Quote  
  7. So just resize the one video and encode it with an MPEG 2 encoder (HCEnc?) with similar properties.
    Quote Quote  
  8. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    What do I do if I'm trying to mux files together with MKVToolnix and it tells me the codec's private data is mismatched? Apparently they have lengths 48 and 48, which are actually the same thing but I don't know what they're measuring the length of. Again, would rather keep re-encoding to a minimum.

    This is a separate group of files to the above.
    Quote Quote  
  9. I would try demuxing to elementary streams (m2v) with DgIndex. They try muxing those.
    Quote Quote  
  10. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    tsMuxer did the trick, but now I've got a different file in which tsMuxer doesn't recognise any streams:
    Code:
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (isom/iso2/avc1/mp41)
    File size                                : 521 MiB
    Duration                                 : 33 min 36 s
    Overall bit rate                         : 2 167 kb/s
    Encoded date                             : UTC 2019-08-12 12:30:42
    Tagged date                              : UTC 2019-08-12 12:30:42
    Writing application                      : HandBrake 1.2.0 2018121700
    
    Video
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : Main@L3.1
    Format settings, CABAC                   : Yes
    Format settings, ReFrames                : 4 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 33 min 36 s
    Bit rate                                 : 2 000 kb/s
    Width                                    : 720 pixels
    Height                                   : 576 pixels
    Display aspect ratio                     : 1.734
    Original display aspect ratio            : 1.733
    Frame rate mode                          : Constant
    Frame rate                               : 25.000 FPS
    Standard                                 : PAL
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.193
    Stream size                              : 481 MiB (92%)
    Writing library                          : x264 core 157 r2935 545de2f
    Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=9 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=2000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=14000 / vbv_bufsize=14000 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00
    Encoded date                             : UTC 2019-08-12 12:30:42
    Tagged date                              : UTC 2019-08-12 12:30:42
    Color range                              : Limited
    Color primaries                          : BT.601 PAL
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.601
    
    Audio
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 33 min 35 s
    Bit rate mode                            : Constant
    Bit rate                                 : 161 kb/s
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 kHz
    Frame rate                               : 46.875 FPS (1024 spf)
    Compression mode                         : Lossy
    Stream size                              : 38.6 MiB (7%)
    Title                                    : Stereo
    Language                                 : English
    Default                                  : Yes
    Alternate group                          : 1
    Encoded date                             : UTC 2019-08-12 12:30:42
    Tagged date                              : UTC 2019-08-12 12:30:42
    Quote Quote  
  11. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Bump.
    Quote Quote  
  12. It looks like a normal MP4 file to me. Tsmuxer should work.
    Quote Quote  
  13. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    I just get this error:
    ---------------------------
    Unsupported format
    ---------------------------
    Some tracks not recognized. This tracks was ignored. File name: "file.mp4"
    ---------------------------
    OK
    ---------------------------
    Quote Quote  
  14. Does the file name have diacritical marks? Some programs have trouble with that.
    Quote Quote  
  15. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Nope. Even tried renaming it "1.mp4", no dice.
    Quote Quote  
  16. You can try ffmpeg, mp4box, mkvmerge . You have to convert it to mpeg2 (m2v), probably the audio too if you want to join to the others, or is this something completely different now ?
    Quote Quote  
  17. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    This is separate from the MPEG2 files. They're all MP4, they just won't mux together correctly because the codec's private data doesn't match or whatever it is. It works without error, there's just a warning, but playback is corrupted.

    How would I demux with ffmpeg?
    Quote Quote  
  18. Try the ffmpeg concat demuxer method
    https://trac.ffmpeg.org/wiki/Concatenate#demuxer

    Are they all done with handbrake with that weird aspect ratio ? or are there other different parameters ? or one or more different? You can try resetting some of the metadata values that don't match with a bitstream filter

    https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmetadata

    Display aspect ratio : 1.734
    Original display aspect ratio : 1.733
    Quote Quote  
  19. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    The aspect ratio is identical on all four files. As is everything else except Stream Size.

    The concat demuxer does exactly the same thing as mkvtoolnix does. First quarter plays through just fine followed by three quarters of garbled junk.
    Last edited by koberulz; 25th Nov 2019 at 19:39.
    Quote Quote  
  20. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    Bump.
    Quote Quote  
  21. Did you try remuxing the "bad" mp4 file? Then using that new file in TSMuxer?
    Quote Quote  
  22. Everything I say is false koberulz's Avatar
    Join Date
    Oct 2006
    Location
    Australia
    Search Comp PM
    What do you mean by remuxing the bad file?
    Quote Quote  
  23. Since there's something about the MP4 file that TSMuxer doesn't like, you should try creating a new MP4 from it. Maybe that will allow TSMuxer to read the new file.

    Code:
    ffmpeg -i input.mp4 -codec copy new.mp4
    Quote Quote  



Similar Threads