VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Hello,

    I'd like to build a five-second MP4 file from a JPG that I can prepend to an existing MP4 video ("main.file.mp4'") that was encoded thusly:

    Code:
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'main.file.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf58.12.100
      Duration: 00:16:53.46, start: 0.000000, bitrate: 2430 kb/s
    
        Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x404 [SAR 254:255 DAR 3048:1717], 2295 kb/s, 2
    5 fps, 25 tbr, 12800 tbn, 50 tbc (default)
        Metadata:
          handler_name    : VideoHandler
    
        Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
        Metadata:
          handler_name    : SoundHandler
    To avoid re-encoding the MP4 video, I need to make sure the "picture MP4" is encoded the same way to keep eg. MP4 Joiner happy. What would be the right ffmpeg switches?

    Thank you.
    Last edited by yetanotherlogin; 8th Oct 2018 at 18:00.
    Quote Quote  
  2. Code:
    ffmpeg -r 25 -i INPUT.png -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -vf scale=720:404,format=yuv420p -c:v libx264 -profile:v high -x264opts stitchable=1:sar=254/255 -b:v 2M -c:a aac -b:a 128k -t 00:00:05 OUTPUT.mp4
    Quote Quote  
  3. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Thanks. It didn't work; I tried tweaking it but still got an empty, 40KB file.

    Since I need this ASAP, I'll just add the JPG + MP4 to a new project, and re-encode.

    Thanks anyway.
    Quote Quote  
  4. forgot -loop 1

    Code:
    ffmpeg -loop 1 -r 25 -i INPUT.jpg -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -vf scale=720:404,format=yuv420p -c:v libx264 -profile:v high -x264opts stitchable=1:sar=254/255 -b:v 2M -c:a aac -b:a 128k -t 00:00:05 OUTPUT.mp4
    Quote Quote  
  5. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Great, thank you.
    Quote Quote  



Similar Threads

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