Chuyện của sys

DevOps Blog

How to add subtitle and concat video file in a line with ffmpeg? May 22, 2014

I have 3 videos : 1387432825.avi, 1387435884.avi, 1387436066.avi and 3 subtitles for videos: part1.ass, part2.ass, part3.ass I try to add subtitle to each videos with commands:

ffmpeg -i 1387432825.avi -vf 'ass=part1.ass' -preset ultrafast -y part1.mp4
ffmpeg -i 1387435884.avi -vf 'ass=part2.ass' -preset ultrafast -y part2.mp4
ffmpeg -i 1387436066.avi -vf 'ass=part3.ass' -preset ultrafast -y part3.mp4

Then, I concat 3 output with commands:

ffmpeg -i part1.mp4 -i part2.mp4 -i part3.mp4 -filter_complex 'concat=n=3' -preset ultrafast -y total.mp4

Finally, I have total.mp4 with subtiles!!! But I have 4 commands for 3 video files. I want to do it with 1 command. Any help?

P/S: I try to using this command:

ffmpeg  -i 1387432825.avi -i 1387435884.avi -i 1387436066.avi -filter_complex 'concat=n=3[join];[join]ass=total.ass' -preset ultrafast -y final.mp4

But I think it’s not good for my works.

Answer:

ffmpeg -threads 0 -i 1387432825.avi -i 1387436066.avi -i 1387435884.avi -filter_complex 'ass=part1.ass[1];ass=part2.ass[2];ass=part3.ass[3];[1][2][3]concat=n=3' -preset ultrafast -y final.mp4
1 Comment on How to add subtitle and concat video file in a line with ffmpeg?
Categories: Uncategorized

The Best of Bằng Kiều

https://www.youtube.com/watch?v=hacFtb9uvdI

Time to relax with his songs.

No Comments on The Best of Bằng Kiều
Categories: Uncategorized

Progress OpenEdge 32bit -Error -1012 when connecting to 64-bit Oracle database

Error Message:

ORACLE error -1012 see “ORACLE Error Messages and Codes Manual”. (1252) 
Unable to load shared library. (14945)

Cause:

Since Progress/OpenEdge is 32-bit, the 64-bit OCIW32.DLL/OCI.DLL cannot be loaded.

The Oracle 64-bit RDBMS installation is shipped with a 64-bit version of the Oracle Client Interface (OCI) libraries.
The 32-bit version of these libraries are not shipped with this release of Oracle.

Fix:

Install a 32-bit version of the Oracle client libraries.

The 32-bit ORACLE client directory, which contains the 32-bit OCIW32.DLL/OCI.DLL files, will be specified before the %ORACLE_HOME%\bin directory, where the 64-bit OCIW32.DLL and OCI.DLL are located, in the PATH environment variable.

The ORACLE_HOME environment variable needs also to be added and should point to the 64-bit Oracle installation (for example: C:\oracle\product\10.2.0\db_1).

 

No Comments on Progress OpenEdge 32bit -Error -1012 when connecting to 64-bit Oracle database
Categories: Uncategorized

Using FFprobe to analyze a Video November 28, 2013

FFprobe is a simple multimedia streams analyzer with a command-line interface based on the FFmpeg project libraries.
It may be used to print informations about the format and header of a multimedia file or stream, the multimedia streams and each single packet or frame.
FFprobe may be used both as a standalone application or in combination with a textual filter, which is supposed to perform more sophisticated elaboration (e.g. statistics elaboration or plotting).
OPTIONS
Main options
-h Show help and exit.
-version
Show version and exit.
-L Show license and exit.
-formats
Show available formats, codecs, protocols, …
-pretty
Show every single value using an adequate unit of measure and using
more eye-ball parsable prefixes.
-k Keep going even in case of error, always returns 0.
-read_packets
Read packets info.
-read_frames
Read frames info.
-show_files
Show file info, that is the informations relative to the container.
-show_frames
Show frames info, implies the option -read_frames and
-read_packets.
-show_streams
Show streams info, that is the informations relative to the
monomedia streams contained in the header.
-show_tags
Show tags info: actually are supported only the track, title,
author, copyright, comment, album, year, and genre tags.
-v number
Set the logging verbosity level.
Example:
nhanpt-rad@nhanptrad-G31T-M7:~$ ffprobe -show_streams Nhan.avi
avprobe version 0.8.8-4:0.8.8-0ubuntu0.12.04.1, Copyright (c) 2007-2013 the Libav developers
built on Oct 22 2013 12:35:42 with gcc 4.6.3
Input #0, avi, from ‘Nhan.avi’:
Duration: 00:00:26.75, start: 0.000000, bitrate: 2322 kb/s
Stream #0.0: Video: mjpeg, yuvj422p, 640×480, 13.04 tbr, 13.04 tbn, 13.04 tbc
[STREAM]
index=0
codec_name=mjpeg
codec_long_name=MJPEG (Motion JPEG)
codec_type=video
codec_time_base=250/3261
codec_tag_string=MJPG
codec_tag=0x47504a4d
width=640
height=480
has_b_frames=0
pix_fmt=yuvj422p
level=-99
r_frame_rate=3261/250
avg_frame_rate=0/0
time_base=250/3261
start_time=0.000000
duration=26.755596
nb_frames=349
[/STREAM]

No Comments on Using FFprobe to analyze a Video
Categories: Uncategorized