Decorative image frame

Dream Maker

黄花仍在,朱颜未衰,正好忘怀

Dream Maker

在线传输之阅后即焚

在线文件传输是个老生常谈的问题(怎么感觉最近这句话用了好多次),方法也特别的多,当然不外乎以下几个方面:

  • 社交软件传输,小文件体验好,大文件存在速度不够、大小限制等问题
  • 局域网传输,以手机上面对面快传为代表,速度快,但存在局限性,即只能面对面
  • 网盘分享传输,不受文件大小限制,但存在上传容易下载难

以上三种方式各有优劣,也有各自适用的场景,不过假设需要发送一个大文件给一个不在身边的朋友,这三种方法似乎都不太可取,这就要引出今天的主角了,也就是两个临时在线文件传输的网站。

(后面还有一丢丢~)

阅读全文...

Windows美化那点事

Windows在个人计算机领域可谓是一家独大,广泛用于各行各业以及各种生活工作场景中,然而这么多年来,微软巨硬在系统UI方面真是一言难尽,可以说已经被隔壁MAC甩出去几条街了。
 
虽然自从Windows10推出后,微软也开始逐步调整设计,不过进度并不令人满意,除却千呼万唤始出来浅色模式,并无太多亮点,总体风格依旧是那么“巨硬”的直来直去,也不知啥时候才能体验到20H1概念视频的新UI。
 
前面说了这么多,当然是为了引出今天的主题,也就是老生常谈的Windows美化,那么也不多废话了,一起来看看Windows美化的那点事~
 
前排提示

  • 本文所述主要面向Windows10平台,所以win7用户们该升级啦,XP用户…咱就不强求了(ˉ▽ ̄~) ~~
  • 还有还有,未经授权不可以转载哦~
阅读全文...

2019年度应用清单

应用软件作为操作系统不可缺少的一部分,优秀的软件可以极大的提高我们的工作效率和使用体验。在面对各类五花八门的应用软件时,每个人可能都有自己的选择,当然,也可能会眼花缭乱,不知如何挑选。

那么,受GitHub项目Awesome Windows以及Windows绝赞应用奔跑中的奶酪启发,本文也将针对Windows10平台,列举一份我个人的年度最佳应用清单,希望有所帮助。

阅读全文...

GitHub上那些免费好用的软件

作为全球最大的 开源代码托管平台 同性交友社区,Github上拥有许多优秀、实用的开源项目,同时也拥有许多优质的免费软件,那么这个贴子就专门实用向的进行一些收集与推荐,主要分为以下几个方面:

  • 桌面端,包括但不限于Windows、Linux等
  • 移动端,主要是Android
  • 其他,一些其他方面的项目

更新记录

  • 2019.8.24    新增XQuickEnergy、PureNeteaseCloudMusic、AD-hosts ; 改正了两个错误链接
阅读全文...

Discover the Six FFmpeg Commands You Can’t Live Without

@Author:Jan Oze

FFMPEG is a free command-line utility that serves as the engine for most of the largest cloud encoding farms in the world, public and private. But it also performs many simple and essential tasks that crop up in a studio or encoding facility, particularly if you do performance or benchmark testing. In this article, I’ll show you how to perform six of these tasks.
 
 

1、Getting Started


To get started, you can download FFmpeg for free from FFmpeg.org/download.html, with packages available for Windows, Mac, and multiple Linux flavors including Ubuntu, Debian, Fedora, and Red Hat Enterprise Linux. Though batch command structure and operation is different for each platform, the FFmpeg command syntax is very similar for all.

Here’s the basic FFmpeg command line structure:

ffmpeg -i input.mp4 output.mp4

Here’s an explanation for the commands:

Ffmpeg

This calls the program; add drive and folder information for ffmpeg.exe if it’s not in your path.
 

-i

This identifies the input file.
 

input.mp4`

This is the input file. FFmpeg can input most container formats natively, including MP4, .ts, MOV, AVI, Y4M, MKV, and many others.
 

output.mp4

This is the output file. No switch necessary; just the file name.
 

Note that unless you identify an audio or video codec via switches, FFmpeg will use the default codecs for each container format as well as reasonable encoding parameters. For the MP4 extension, if you input a 1080p file, FFmpeg will encode using the H.264 video codec at about 9 to 10 Mbps, the AAC audio codec at around 130 Kbps, a keyframe interval of 250 frames, the High profile, and the medium x264 preset. All of these are customizable, of course, but if all you’re trying to do is to create a video file you can play from a hard drive, the command above will suffice.

Note that you can download all commands and the input test file used in this tutorial. (Note that the download will begin automatically when you click this link.) The video is excerpted from a test video provided by Harmonic, Inc. (harmonic inc.com).
 
 

2、Changing Container Formats Without Re-Encoding


Say you’re working with an application that only accepts MOV files and your source file is in an MP4 container (or vice versa). You could input the file into Adobe Premiere Pro and output as needed, but Premiere Pro can’t do that without re-encoding. This is easily done in FFmpeg with this command string:

ffmpeg -i input.mp4 -c:v copy -c:a copy output.mov

The new commands here are as follows:

-c:v copy

Video codec, copy. This tells FFmpeg to copy the compressed video stream into the new file without re-encoding.
 

-c:a copy

Audio codec, copy. This tells FFmpeg to copy the compressed audio stream into the new file without re-encoding.

A similar scenario might involve files in the MPEG-2 container format with a .ts extension. Here you may have to add one switch to handle the MPEG-2/4 ADTS header from the transport stream file.
 

ffmpeg -i input.ts -bsf:a aac_adtstoasc -c:v copy -c:a copy outputfromts.mp4

The added switch is as follows:

-bsf:a aac_adtstoasc

manages the ADTS conversion.

This particular conversion saved about 2 days of encoding when I had to convert about 100 .ts files into MP4 files for testing. The aac_ adtstoasc switch may not be necessary with more recent versions of FFmpeg, which may insert the switch automatically. You’ll know you need it if the conversion crashes or the audio doesn’t play normally in the converted file. Or, you can just leave it in.
 
 

3、Extracting a Section of a File Without Re-Encoding


Say you have a file and want to eliminate the first 30 seconds, or simply grab a 2-minute excerpt from the middle. Again, you could bring the file into Adobe Premiere Pro and edit what you want, but that would involve another rendering and encoding cycle. You can do this quickly and simply in FFmpeg using the command shown below.

The Harmonic test file is about 12 seconds long. This command seeks to 5 seconds into the file and excerpts the next 3 seconds without re-encoding.

ffmpeg -ss 00:00:05 -i input.mp4 -t 00:00:03 -c:v copy -c:a copy excerpt.mp4

-ss 00:00:05

Seeks to 5 seconds into the file.
 

-t 00:00:05

Extracts this duration of the file. If you leave this switch off, FFmpeg will include from the seek point to the end of the file in the extracted file.

Note that FFmpeg seems to work around keyframes in the file so the results are typically not frame-accurate. This doesn’t matter in most instances, but if you absolutely need a specific duration or specific frames included or excluded from your excerpted file, this technique probably won’t work. In these cases, you’re better off using your video editor.

If you want to extract only the video in the file and not the audio, add the -an switch. To extract audio only, add the -vn switch. Note that the MP4 container can hold audio-only files, so you don’t need to change container formats when producing audio-only files from MP4 sources.
 
 

4、Converting to a Raw Format


Some file analysis tools only input raw YUV or Y4M files, so you’ll have to convert your encoded files to YUV for input. In addition, when working with newer codecs like AV1, most tools can’t input the encoded file natively; again, you’ll have to convert to YUV or Y4M.

What’s the difference between YUV and Y4M? Both are uncompressed formats, but the YUV file header doesn’t contain resolution, frame rate, or other file-related information. To input a YUV file into a program, you’ll typically need to specify one or more of these parameters. In contrast, Y4M files contain this data, simplifying input.

For example, to input a YUV file like ConstructionField.yuv into the Moscow State University Video Quality Measurement Tool, you have to specify resolution and color information as shown at the top of Figure 1. With a Y4M file, this data is in the file header, so you can skip this step, both in the user interface and in the batch command string. Basically, if the tool you’re working with can accept Y4M files, use that format; if not, use YUV.

Figure 1. Inputting a YUV file into the Moscow State University Video Quality Measurement Tool forces you to specify resolution and other file- related data. Y4M files contain this in the header and input normally

Converting to either format is simple using this command:

ffmpeg -i input.mp4 -pix_fmt yuv420p -vsync 1 output.y4m

To produce a YUV file, simply use that extension. Here’s an explanation for the new commands:
 

pix_fmt yuv420p

This sets the file format, and YUV420p is the most commonly used format for 8-bit files. If you’re working with 10-bit formats, check out this conversation on Stack Exchange.
 

-vsync 1

This tells FFmpeg to preserve the audio/video sync between the input and output files. I’m not 100% sure it’s necessary in every instance, but long ago it cured a sync issue for me, and I’ve left it in ever since.
 
 

5、Scaling Compressed Files When Converting to YUV/Y4M


This is a very common use case when computing objective quality metrics on files compressed at lower resolutions than the original. For example, imagine you wanted to compute the VMAF rating on a 720p file encoded from a 1080p file. With most tools, you’ll have to scale the encoded file back to 1080p so you’ll have a pixel-by-pixel match with the source file.

To do this, use the same basic command as shown above, adding two new switches.

ffmpeg -i input.mp4 -s 1920x1080 -sws_flags lanczos -pix_fmt yuv420p -vsync 1 output.y4m

Here’s an explanation for the new commands:

-s 1920x1080

This tells FFmpeg to scale back to 1080p.
 

-sws_flags lanczos

This tells FFmpeg to use the Lanczos method of scaling

I use this approach because it is the primary scaling technique used by NVIDIA when scaling video from lower to higher resolutions, and because when performing quality measurements, I’m trying to predict video quality as viewed by someone watching on their computer or on a smart TV. Though there are higher-quality scaling methods, they’re probably too slow for use on most display devices, so I stick to Lanczos.

That’s it. If you’ve never worked in the command line, you’ll definitely find yourself at a disadvantage, but an hour or two invested in learning basic command line will get you up-to-speed. If you frequently experiment with encoding and quality metrics, you’ll find the command line and FFmpeg absolutely essential, and that the combination vastly simplifies and accelerates your testing and analysis workflows.

[This article appears in the June 2019 issue of Streaming Media Magazine as “Six FFmpeg Commands You Can’t Live Without.”]


参考格式:
[1]Jan Ozer. Six FFmpeg Commands You Can’t Live Without[J]. Streaming Media Magazine,2019.

知网链接:点此查看

原文链接:点此查看