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:
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?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
Thank you.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 5 of 5
Thread
-
Last edited by yetanotherlogin; 8th Oct 2018 at 18:00.
-
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
-
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. -
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
Similar Threads
-
[SOLVED] [ffmpeg] How to compress MP4 file further?
By yetanotherlogin in forum EditingReplies: 4Last Post: 26th May 2016, 04:14 -
Mp4 Playback Choppy In Firefox Since Downloading New Build of ffmpeg
By Bruce Wayne in forum Software PlayingReplies: 10Last Post: 11th Apr 2016, 18:33 -
MPG2Cut2 to FFMPEG MP4 vs FFMPEG MPG2 to MP4 AviDemux
By RedPenguin in forum Video ConversionReplies: 4Last Post: 29th Apr 2015, 13:16 -
FFMPEG: how to get uncompressed audio in a MP4 file?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 15th Feb 2015, 10:37 -
Cover (jpg) in mp4 file???
By the_partyman in forum Video ConversionReplies: 4Last Post: 10th May 2014, 12:19