Hot answers tagged

3

Use the concat demuxer instead: Create a text file of the following format file 'C:\source.mp4' inpoint 0 duration 1 file 'C:\source.mp4' inpoint 3 duration 1 file 'C:\source.mp4' inpoint 6 duration 1 file 'C:\source.mp4' inpoint 9 duration 1 Then run ffmpeg -f concat -i file.txt -map 0:v -map 0:a? -vcodec h264 -acodec aac -pix_fmt yuv420p -strict -2 ...


3

Update: The PTS entries of the input and output for the command below are identical in version N-79630-g9ac154d. Looks like the file is falsely flagged as VFR. But this single-step command below works for the sample video. Use ffmpeg -i input.mp4 -vf "crop='if(gte(iw,ih),ih,iw):if(gte(ih,iw),iw,ih)', scale=640x640" \ -an -c:v libx264 -profile:v high ...


2

If parts of the file reside on physically bad sectors, or for whatever reason, the OS cannot serve the whole file to FFmpeg, then naturally FFmpeg can't do anything about that. You should get a utility which can ignore those portions and write the salvageable parts to a new file, like ddrescue. Now, if the file protocol is not the cause of errors, you can ...


2

This is possible for MP4, with a caveat. The command below will generate a fragmented MP4, which you can view in a browser while the conversion is taking place. However, only the fragments completely encoded at the time of launching the file, will be viewable. To view fragments encoded after that point, you'll have to reload the file/page. ffmpeg -i input ...


2

To overlay a half-sized version of a video in the center of an image, use ffmpeg -loop 1 -i image -i video -filter_complex "[1]scale=iw/2:-1[ovrl]; [0][ovrl]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[v]" -map "[v]" -map 1:a -c:v libx264 -c:a copy output.mp4 To frame the video: ffmpeg -loop 1 -i image -i video loop 1 ...


1

Try with the movie filter instead ffmpeg -loop 1 -i image.jpg -filter_complex \ "movie=video.mov:loop=999,setpts=N/(FRAME_RATE*TB)[1v]; \ [0:v][1v]overlay=x=main_w*0.44:y=main_h*0.33[out]" \ -map [out] -t 00:00:15 out.mp4


1

You can also use qtfaststart -l fileName which outputs something more human readable like : $ qtfaststart -l myFile.mp4 ftyp (32 bytes) free (8 bytes) mdat (283805466 bytes) moov (3541465 bytes) The Python qtfaststart can be installed using this command: sudo pip install qtfaststart The qtfaststart sources are here



Only top voted, non community-wiki answers of a minimum length are eligible