VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    I have an interim process where I need to join an audio and video (704x368) file together and change the DAR to 2.35:1 with mp4box but none of the dozens of tries has worked correctly. The main script I have been working from is:

    Code:
    "mp4box.exe" -add "%%~ni.264#video:par 1=191:235" -add "%%~ni.m4a#audio"  "%%~niNEW.mp4"
    and

    Code:
    MP4Box ^
    -add "%%~ni.264#1:fps=23.976" ^
    -add "%%~ni.m4a#2" ^
    -par 1=64:45 ^
    -new "%%~niNEW.mp4"
    Changing the PAR numbers gives sometimes the correct video but mediainfo shows a huge height number or else it is unplayable afterward. I'm sure its something simple like I can't read the MP4 guide but if anyone knows a script or information that explains the format of MP4Box better (such as does the colon Par work as well as the -Par), I would appreciate help.

    Thank You
    Quote Quote  
  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    As setting the par can get complicated, I use a handy calculator to give the desired command: http://tools.rodrigopolo.com/mp4box_aspect_fix/
    which generates -par "1=8901646138474496:7246483442976463" (close to 1228:1000) for your given parameters.
    Quote Quote  
  3. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    See this is the problem. I tried that page and I get from this:

    Code:
    MP4Box ^
    -add "%%~ni.264#1:fps=23.976" ^
    -add "%%~ni.m4a#1" ^
    -par 1="8901646138474496:7246483442976463" ^
    -new "%%~niNEW.mp4"
    a CMD screen with last lines as:
    AVC-H264 import - frame size 704 x 368 at 23.976 FPS
    AVC Import results: 62 samples - Slices: 1 I 29 P 32 B - 1 SEI - 1 IDR
    Stream uses forward prediction - stream CTS offset: 2 frames
    IsoMedia import - track ID 1 - Audio (SR 48000 - 2 channels)
    Saving trimNEW.mp4: 0.500 secs Interleaving
    a video that

    a mediainfo that says:
    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 2 s 585 ms
    Bit rate : 228 kb/s
    Maximum bit rate : 442 kb/s
    Width : 704 pixels
    Height : 368 pixels
    Display aspect ratio : 1.913
    Frame rate mode : Constant
    Frame rate : 23.976 (24000/1001) FPS
    Bits/(Pixel*Frame) : 0.037
    Stream size : 71.9 KiB (53%)
    Encoded date : UTC 2018-01-28 08:13:39
    Tagged date : UTC 2018-01-28 08:13:39
    Yet it is unplayable with a frozen player and Windows says this for height:
    Image
    [Attachment 44521 - Click to enlarge]
    Quote Quote  
  4. Explorer Case's Avatar
    Join Date
    Feb 2004
    Location
    Middle Earth
    Search Comp PM
    Code:
    MP4Box -add ni.264#video -add ni.aac#audio -par 1=12284091:10000000 -new OUTPUT.MP4
    works for me [sample]. 8901646138474496:7246483442976463 is probably too long numbers for my MP4box, as that errors with: Assertion failed: (strlen(argv[i+1])+1 <= sizeof(szTK)), function mp4boxMain, file main.c, line 2619. Abort trap: 6. So I simplified a bit to 8 digits.
    Quote Quote  
  5. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    ok I have it working now but i need to cut on a non-I frame up to the next I frame and convert this segment with an I frame at the start frame. This works and all codec parameters are the same except it is CFR. I joined it to the original VFR with concat just to test and the new resulting video is 6.091 FPS instead of 23.976.

    Frame rate mode : Variable
    Frame rate : 6.091 FPS
    Minimum frame rate : 0.047 FPS
    Maximum frame rate : 23.976 FPS
    Any way to make ffmpeg convert to h264 with VFR?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!