If you would like to extract a portion of a video without re-encoding, consider using FFMPEG. The following example illustrates a command to extract a video from the 24th minute line and for 4 minutes 8 seconds, keeping all audio tracks.
ffmpeg -I input.mpg -c copy -ss 00:24:00.000 -t 00:04:08.000 -map 0:v -map 0:a output.mpg
Here is another use case for FFMPEG. In some projects, after you mixed and matched video and audio streams from different files, the resultant file may not have the default audio stream as desired. You can use the following command to set the default audio stream while you are mixing the video/audio streams.
ffmpeg -i movie.mkv -i audio.dts -map 0:v:0 -map 1:a:0 -map 0:a:0 -c copy -disposition:a:0 default -disposition:a:1 none movie_combined.mkv
Very often you would like to change the not-so-standard resolution of a video to some more common formats, e.g. 4:3 or 16:9. You can try using the following FFMPEG command to achieve this.
ffmpeg -i video_1920.mp4 -vf scale=640:480,setdar=4:3 video_640x480.mp4 -hide_banner
This is another example of using FFMPEG to manipulate video and audio files. In this case, one would like to replace the second audio stream in a video file by another audio file.
Here is the command you may want to try:
ffmpeg -i video.mkv -i audio.mp3 -map 0:v -map 0:a:0 -map 1:a -codec copy output.mkv
There is yet another common use of FFMPEG, i.e. adding a new audio track to an existing file which can be a video-only file or a video file already with an audio track. A use case will be adding a second audio track to a file already with video and sound. The following is an example of the command to add audio.dts audio track to an existing mkv file:
ffmpeg -i input.mkv -i audio.dts -map 0 -map 1 -c copy output.mkv
With Windows 10 we built the most secure Windows ever, by hardening the platform itself and by developing Windows Defender Advanced Threat Protection (ATP) – a unified endpoint security platform that helps stop breaches. This means that for the first time we’ve built threat and exploit protection, and Endpoint Detection & Response right into the operating system, powered by the cloud. We hear from our customers security is one of the biggest motivators for their move to Windows 10. Meanwhile, we know that while in their transition, some may have a mix of Windows 10 and Windows 7 devices in their environments. We want to help our customers achieve the best security possible on their way to Windows 10 ahead of the end of support for Windows 7 in January 2020. (…….. read the whole story)
Due to various reasons, the audio and video tracks sometimes may become out-of-sync in a video clip, i.e. there are some delay between the tracks affecting the overall viewing experience. Use the following as examples to fix the issue.
CASE 1: Audio happens before video (aka “need to delay audio stream 1”):
ffmpeg -i clip.mp4 -itsoffset 0.150 -i clip.mp4 -vcodec copy -acodec copy -map 0:0 -map 1:1 output.mp4
The “itsoffset” in the above example is placed before file 1 (remember that linux counts from 0, so 0 is the first and 1 is the second), so when the mapping happens, it says “Take the video of file 0 and the audio of file 1, leave the video of file 0 alone and apply the offset to the audio of file 1 and merge them into a new output file”. The delay is only .15 seconds.
CASE 2: Video happens before audio (aka “need to delay video stream 0”):
ffmpeg -i clip.mp4 -itsoffset 0.150 -i clip.mp4 -vcodec copy -acodec copy -map 0:1 -map 1:0 output.mp4
The “itsoffset” in the above example is placed before file 1. When the mapping happens, it says “Take the audio of file 0 and the video of file 1, leave the audio of file 0 alone and apply the offset to the video of file 1 and merge them into a new output file”. The delay is only .15 seconds.
Very often videos shot by smart phones do not carry a proper orientation indicator as intended due to various reasons. In order to rotate these videos without re-encoding, try the following command.
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4
To flash the firmware of Scishion V88 TV Box and V88 mini TV Box, both use Rockchip RK3229, there are basically two main methods. The first one is to prepare a microSD card with the desired firmware using a utility such that when the TV Box starts from a recovery mode, it will boot from the microSD card. Another method is to connect the TV Box to a computer and flash the firmware from the connected computer. Details follow.
First of all, locate the desired version of firmware that you want to apply to the TV Box. Many versions can be found in the web without much difficulty. Then install the USB driver designed for Android devices with Rocketchip. Open Android Tool and point to the firmware just downloaded. Without connecting to the AC power, use a pin to poke and hold the reset button; connect a male-to-male USB cable from the computer to the TV box while the reset button is being pushed and held. Android Tool should then recognize the TV Box and start the upgrading process.
Note that there is only one USB port on the TV Box that will work. For V88 TV Box, this is the one at the back of the unit. For V88 mini TV Box, this is the third USB port closest to the back. A sound should be played if the computer recognizes a device is being connected to it. (Click here to download the necessary tools mentioned in this post and a version of firmware based on Android 5.1)
Many video file formats allow you to have multiple sound tracks (e.g. karaoke videos) where the first audio track is treated as the default by many audio-visual editing applications. Many of those can only handle one audio track which is the first one. If you want to switch the audio tracks, you can use FFMPEG without re-encoding the media. The following example is the command to switch the two audio tracks in a video file:
ffmpeg -i input -map 0:v:0 -map 0:a:1 -map 0:a:0 -c copy output