Changing resolution of a video using FFMPEG

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

Posted in FFmpeg, Tips & Tricks

Replacing an Audio Stream using FFMPEG

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

Posted in FFmpeg, Tips & Tricks

Add a new audio track to an existing file

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

Posted in FFmpeg, Tips & Tricks

Announcing: Windows Defender ATP support for Windows 7 and Windows 8.1

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)

Posted in Technology News

Correcting for audio/video sync issues

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.

Posted in FFmpeg, Tips & Tricks

Rotate a Video without Loss of Quality

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

Posted in FFmpeg, Tips & Tricks

Flashing Firmware on Scishion V88 TV Box

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)

Posted in Tips & Tricks

Swap the audio tracks without re-encoding

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

Posted in FFmpeg, Tips & Tricks

TeamViewer Won’t Start

If you experience problems starting TeamViewer in Windows, one the possible causes may be that the communication stack WINSOCK has been corrupted. Uninstalling and reinstalling TeamViewer, tweaking the Firewall settings and rolling back to previous software version will not resolve the problem. A simple command may do the trick. Open and run the Command Prompt (CMD) under administrator privilege, and enter the following command:

“netsh winsock reset”

Restart the computer and TeamViewer may very well be working again.

Posted in Tips & Tricks

VMware Bridged Network

If you use Bridged Network in VMware Workstation Player and experience network problems after software upgrade (either VMware or Windows), resetting the network configuration to its default settings usually resolves the problems. Since there is no network configuration tool in Workstation Player, an alternate way to achieve the same results is to shutdown the host machine and re-configures its network adapters.

Posted in Tips & Tricks