FFmpeg: Difference between revisions
From Leo's Notes
This page was last edited on 9 December 2015, at 22:01.
No edit summary |
m highlight template |
||
| Line 1: | Line 1: | ||
== Merging mp4 and m4a == | == Merging mp4 and m4a == | ||
Using | Using {{code|ffmpeg}} you can combine the two together: | ||
command: ffmpeg -i video.mp4 -i audio.m4a -acodec copy -vcodec copy output.mp4 | command: ffmpeg -i video.mp4 -i audio.m4a -acodec copy -vcodec copy output.mp4 | ||
== Extracting a video section == | == Extracting a video section == | ||
To extract a video section: | To extract a video section: | ||
{{highlight|lang= | {{highlight|lang=terminal|code= | ||
ffmpeg -i input.mp4 -ss 00:00:15 -t 00:00:10 -async 1 output.mp4 | # ffmpeg -i input.mp4 -ss 00:00:15 -t 00:00:10 -async 1 output.mp4 | ||
}} | }} | ||
| Line 19: | Line 19: | ||
== Issues == | == Issues == | ||
Copying DASH video (via | Copying DASH video (via {{code|-vcodec copy}}) using versions older than 0.10 will result in an empty file because it is unable to read the video contents. | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:LinuxUtilities]] | [[Category:LinuxUtilities]] | ||
{{Navbox Linux}} | {{Navbox Linux}} | ||
Revision as of 22:01, 9 December 2015
Merging mp4 and m4a
Using ffmpeg you can combine the two together:
command: ffmpeg -i video.mp4 -i audio.m4a -acodec copy -vcodec copy output.mp4
Extracting a video section
To extract a video section:
# ffmpeg -i input.mp4 -ss 00:00:15 -t 00:00:10 -async 1 output.mp4
Where:
| -ss | The start time in HH:MM:SS |
|---|---|
| -t | The length of the video in HH:MM:SS |
Issues
Copying DASH video (via -vcodec copy) using versions older than 0.10 will result in an empty file because it is unable to read the video contents.