添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
玩足球的包子  ·  How to trim a video ...·  4 小时前    · 
幸福的书签  ·  How to Rotate Videos ...·  4 小时前    · 
爱旅游的啤酒  ·  Gstreamer pipeline ...·  1 周前    · 
瘦瘦的柚子  ·  OpenCV frames to ...·  1 周前    · 
慷慨大方的薯片  ·  How to send a POST ...·  3 月前    · 
火爆的薯片  ·  Getting started with ...·  7 月前    · 
文雅的小蝌蚪  ·  asp.net - Identity 3 ...·  11 月前    · 

Hi Reena,

FFmpeg provides two parameters for trimming the video. -ss option allows you to seek video at a particular position it takes value in HH:MM: SS strong text format or in absolute seconds. -t options allow you to read a specified number of seconds from the video which also takes value in the same format as -ss . So with the combination of both -ss and -t you can trim a video.

For mapping metadata, you can use the -map_metadata parameter provided by FFmpeg. This parameter with 0 strong text as its value will copy all the metadata from the source to the target video file. If you have only metadata types in your source video file then you have to map them individually.

Don’t forget to read about SAR and DAR metadata in FFmpeg

This will help you to understand more about this concept.

Reena, you can use this command:
ffmpeg -i source.mp4 -ss 0 -t 40 -map 0:v -map 0:a -map_metadata 0 target.mp4I hope this will work for you!

Please go through this thread for more help: How to trim video using FFmpeg

You can map metadata for a particular stream using the -map_metadata option with an index of the stream from which you want to copy the metadata. For example, if you want to copy metadata from only a video stream then you can use the following command

ffmpeg -i source.mp4 -map 0:v -map 0:a -map_metadata:s:v 0:s:v -c copy target.mp4

For more please visit this thread: How to trim videos with both ffmpeg and ffprobe?