New answers tagged

0

Most videos use codecs which perform temporal compression, so a specified cutpoint may rely on frames before (and after) that cutpoint to be correctly decoded. So, when you use ffmpeg to trim videos and use copy mode, ffmpeg has to include all frames before and after the trimmed segment which are needed to decode the segment correctly. So, you have two ...


0

Assuming your editor can rotate videos, use ffmpeg -i "recording6.mp4" -vf "transpose=1" -vcodec dnxhd -r 60 -b:v 36M "recording6.mov" This will rotate the video, so the 1080x1920 video becomes 1920x1080.


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


2

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 ...


0

End up using filters as this answer guides >> http://video.stackexchange.com/a/15479/10894 ffmpeg.StartInfo.Arguments = "/c ffmpeg.exe -i C:\\Users\\mtst\\Desktop\\Clips\\h\\a1.mp4 -i C:\\Users\\mtst\\Desktop\\Clips\\h\\a2.mp4 -i C:\\Users\\mtst\\Desktop\\Clips\\h\\a3.mp4 -filter_complex \"[0:v]setpts=PTS-STARTPTS[v0]; [0:a]asetpts=PTS-STARTPTS[a0]; ...


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


0

Regular ffmpeg won't do this. You'll need a combination of two tools to carry this out. #1 Use ffmpeg from direct264, a modded version of an old ffmpeg build with a custom filter to modify H264 bitstreams. This build is crippled in most other ways, so rename it or don't put it in your path. ffmpeg -i in.mp4 -vcodec copy -acodec copy -vbsf ...


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 ...


0

In the search of a better answer a possible way could be: ffmpeg -i video.mkv -c copy video_fixed.mkv However I'm pretty sure there are some extra options that can make the result even better..


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 ...


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 ...


0

To get filters, you can use photoshop for that. iMovie can do all of the effects that you were talking about, and iMovie has a pretty nice collection of filters too. Hope that helps!



Top 50 recent answers are included