Sunteți pe pagina 1din 22

Introduction

FIRST AND FOREMOST... I am not a programmer by trade but I alter no original files. Instead I create new files
with text added to tell what they are. Just the same, practice good procedures and
USE ONLY COPIES OF YOU FILES
USE ONLY COPIES OF YOU FILES
USE ONLY COPIES OF YOU FILES
FLV Media Utility was originally built with the FLV portion only for correcting most of the downloaded FDLV's
that refuse to seek, play fully, re encode etc. These are usually caused by Meta Data that has been corrupted
or removed, leaving only the coding with frames of audio and/or video. MOST of the time simply removing
and replacing the Meta Data fixes this or, at least, leaves the video in a state that allows it to be fully
converted correctly to the same or different format.
It has grown since then into a Main Form that will:
1. Check integrity of FLV videos
2. Remove Meta Data
3. Replace Meta Data
4. Perform Media Info on the video for most needed information with Media Info CLI
(https://mediaarea.net/en/MediaInfo/Download/Windows)
5. Extract Audio
6. Extract Video
7. Shift Audio/Video to resync (Can visually compare audio to video) See Picture later in Play Tab
8. Rename Videos with Media Info in name
9. Find old video names left coded into the video
10. Player using your main viewer for videos
11. Built in Windows Media Player
12. Embed the date/time from the image. Not the Windows file data but the data from the camera
13. Add a subtitle track to an MP4 or MKV OR Hardcode subtitles into a video (SRT/ASS at the moment)

The program is currently in 3 versions:


1. The version to the left with FLV and Video Editor.
The FLV Only will not have the CLI Form and Editor Buttons at the top
2. FLV Only (Without Video Editor)
3. Video Editor Only (Also with limited Image editor)
The Complete program uses, in addition to the above Media Info:
DGIndex/DGDecode http://www.videohelp.com/software/DGMPGDec
EXIFTool
http://www.sno.phy.queensu.ca/~phil/exiftool/
FFMpeg
http://ffmpeg.zeranoe.com/builds/
FFMpeg Fiilters ->
TransAll, MPASource, FFMS,
FFPlay ->
Part of FFMpeg
FLVMeta
http://www.flvmeta.com/
YAMDI
http://yamdi.sourceforge.net/
TSRemux
http://www.videohelp.com/software/TsRemux
Dos Scripts
written to perform repeated tasks such as embedding Date and time in images
I have included these with permission from these Great Authors who are a lot more talented than I at
programming. All my program does is utilize these Great Utilities and calls them as it is needs them. This
makes it possible to add updated/better utilities when if and when they are suited.
IMPORTANT: It also stops before execution to allow the scripts and ffmpeg strings to be viewed as a possible
teaching aid for those not familiar with AVISynth and FFMpeg.
Also
The 'M' 'P' 'T' and 'C buttons under 'Close this Form' are shortcuts to:
'M' ->
Media Info Form Display
'P' ->
Play. Same as 'Play It' button on Play Tab
'T' ->
Brings up the Transformation forms for creating a video from Images W/WO Tansitions
'C'
Crop picture with cursor

Main Form
The FLV Main Form is utilized by dragging and dropping or selecting the common file buttons/dropdowns to
load video into 'Files List box'. Clicking this file name Once will put it in the 'Working List' box and can be
selected to highlight the file you wish in the working list to highlight it there. (Double click the file list box for
speed), Check 'Remove Meta' and click fix. Then highlight the YAM file created in the Working List box, check
'Replace Meta' and click Fix again. The YAMNEW file can now be checked to see if it is fixed or needs further
work.
For those interested, the first field output is the byte count where the errors occurred if you weish to use a
Hex editor such as 'HxD' http://mh-nexus.de/en/hxd/

Clicking the MEDIA INFO button will bring up another form to choose which information
you would like. After selecting, click Media Info button again will display the information
in a few seconds in the Console Box:

The above script is shown using MediaInfo CLI and a template.txt file in the programs folder.
Utilizing the Selection box is also used to rename videos with the pertinent Media Info information using
several options:

Finds embedded names sometimes left in renamed FLV videos. Removing and Replacing will remove these old
names also. Clicking 'Find Embedded Names' will check all files in the list and display results:

There is a built in Media Player that comes to the front when button to play is clicked and moves to back when
stop is played. Pause will leave the window open to the current frame playing. THIS IS A MEDIA PLAYER SO
MOST FORMATS SHOULD PLAY NOT JUST FLV. Clicking default Player will play the file in your PC's default
player and any format your player plays will play because it calls your PC's player.

CLI Form Button calls the form where you can check the ouput
of FFMpeg, etc. before clicking 'Execute'
This is an advanced form where Programs, Command lines,
etc. can be entered in top textbox and executed by clicking
execute button.

TABBED FORM EDITOR


Configuration Tab
NOTES:
Any video can be drag and dropped onto tabs 1 or 4 empty areas as well as tab 1 video 1 and video 2 boxes
and most other video/image boxes..

Before using the editor, set the configuration tab settings as shown below.

PLAY TAB

Most of the controls are self explanatory. Video1 and Video2 are Drag/Drop as well as searchable. The other
fields fill in as needed by the program and when a new video is entered in Video1 Box. The checkboxes on
right are as follows:
1.
2.
3.
4.

View with Directshow


View with FFMpeg
View with player only
Autocrop view

5. View Indexed

6. Compare videos

Will display the following:

Views with the Directshow codec


Views with the more accurate FFAudioSource and FFVideoSource
Views with your default player only. No On Screen Display of data, etc.
This will show the the correct settings to use for cropping off Pillar
Bars/Letterboxes.
This is used after creating a D2V video of MPG. Follow message box Messages

Stacks 2 videos input into Video1 and Video 2 such as audio display and Video
Display to compare. A feature to compare quality of created to quality of
original will be added later

7. Set DirectShow Rate


8. Show AVS Output

9. Debug Mode

This will append the setting of video to the FFFMpeg/AVISynth string when they
cannot determine the frame rate
Normally, if you drag an AVS file to the Video1 box, it will give information and
display the actual video listed in the AVS file. If you wish to actually see your AVS
played in your AVS capable player, check this box.
Only used for programming output.
Used during compare of program created audio display (Delay/Index Tab):

EXTRACT/EDIT TAB
This is a very busy tab but allows most changes to be made without selecting multiple tabs back and forth.
The colors are gaudy because I have no sense of style but allows for taking in at first glance. You can make
most changes here to a vidoe including changing formats (FLV->MP4, etc.). It uses FFMpeg and pauses at the
intermediate Media Info Form to Peruse the string or make changes if you are familiar and comfortable.
From here, when you are ready, simply click 'Execute
Button'. The output will display in the simulated
COMMAND window below the input box in case of
errors.
There are several repetitive functions on this form but
they may or may not work and will be removed along
with their code as soon as I have a chance.
(Sync Correction, Remove Meta, etc.)
An important function here is the kill all runaway
application button. Many times FFMpeg will cause tons
of errors to roll and eventually hang. Since Windows has
launched DOS and turned it loose to continue on it's own
program, it has limited control over this. This button will kill all the COMMAND programs used in the Utility.

Close the Command Line Utility Form to completely reset these errors.

EXTRACT/EDIT TAB
MAIN FEATURES
ENCODER SETTINGS
Encoder settings are pretty much self
explanatory. The frame rate sets itself when the
video is loaded and can be changed if you wish
another setting. All other settings are set as
shown but may be changed to suit what your
needs are. The video quality will be intitially CRF
And set to 22 for AVC/H.264 quality and will
change to Q quality of 2 for other codecs.
Start/Stop Time is used to cut out portions of a
video as shown during On Screen Display during
Conversion or during Preview (FFPLAY). If stop is
left all 0's then the video will run to the end of
the file. Clicking a box causes the numbers to all
be selected to make it easier to edit and the
cursor will immediately move to the next box so
all you have to do is type '012414033' for 1 hr, 24
minutes, 14.033 seconds

SUBTITLE
Subtitles dropped in top box will build program usage in lower box. Right now, SRT and ASS(SSA) subtiles are
allowed. Subs after resize checkbox is used if you have subtitles added to a small video and THEN resize the
video which will also resize the subtitles where they may be too large and gaudy.

This can also be used to resize a video that includes Letterbox bars that subtitles can be
entered into leaving the screen clear

ACTIVATE CURSOR
The 4 boxes are as follows:
Upper Left -> Total relative position of cursor on your PC's display
Lower Left -> Left click sets this to 0,0 of the upper left corner of the video file
Upper Right -> Upper right corner of area to be cropped, relative to Upper right corner of video
Lower Right -> Amount to be subtracted from original video size.
This sounds complicated but is only explained for those who need to know. To use, I have purposely slowed
the response to cursor movement so even those with fast/slow computers can use easily.
1.
2.
3.
4.

Check activate cursor box


Move cursor to upper left corner of video
Wait
Left click and Hold until Delogo x, y change to 0,0
( Upper right, Lower Left will also show 0, 0)

5. Move cursor to upper left of logo to be blurred


6. Wait
7. Left Click and hold until Delogo1 X, Y change to new settings but before they change to 0,0 again. There is
about 1-2 seconds delay between each. This is the number
of pixels away from upper left of video.

8. Move cursor to lower right of logo


9. Wait
10. Right click and hold until DeLogo1 Width, Height change.
This will also uncheck the Activate cursor checkbox

To set 2nd LOGO click Delogo2 box and repeat above. Delogo2 x, y, width, height will set. This Delogo process
will occur before any other changes to video occur so these must be gotten from a player that is actual size of
the video. The preview cannot be used unless all setting are correct since wrong setting may cause Pillar bars
to display that are not part of the video. When in doubt check 'Show Delogo' which will put a Green box
around the Delog'd area. Uncheck this before convertion or the green bow will be in your final product.

VOLUME CHECK
This will run a check of the video volume and display in the command line(MediaInfo) Form such as:
Data: [Parsed_volumedetect_0 @ 04605680] mean_volume: -14.0 dB
Data: [Parsed_volumedetect_0 @ 04605680] max_volume: -0.2 dB
Data: [Parsed_volumedetect_0 @ 04605680] histogram_0db: 85
Data: [Parsed_volumedetect_0 @ 04605680] histogram_1db: 4865
Data: [Parsed_volumedetect_0 @ 04605680] histogram_2db: 20527
There are 85 frames that are at 0 DB and 4865 that are at -1 DB and 20527 that are at -2 DB. Most of the
video is at the mean volume of -14 DB. This means if you raise the volume by say 3-10 DB the following
25480 frame of audio will probably be clipped. ( 85 + 4865 + 20527 = 25480) so raising the level would distort
these frames but since there are 2,644,000 frames in the total video, this may be acceptable.

CROP
Thes setting can be gotten right off the OSD (On Screen Display) during play if Autocrop Checkbox checked.

If the full black area is not completely selected, try setting the Autocrop Threshold higher on Play Tab

Entering these settings in the crop area will cause the 'Auto aspect' to change but clicking the Height, new
and original again will show what aspect you came from and where it went after dropping.

After cropping you can set the aspect to correct this squash effect.

This is a powerful feature built into this for those who suffer from aspect dilemmas . Lets take a common
video from You know Where Tube :

This is obviouly squashed down to add the black bars as well as the logo added. Auto crop shows it should be
cropped x=0, Y=88, New Width=1280, New Height=542.
Entering this into crop area we see the new Aspect is 2.236 which is fine for now, being just a reference.
Clicking the orginal height box displays 1.778, the original aspect. Clicking the New Height will switch to show
2.236 again
Here is an important part of the Keep Aspect and Chg. Aspect check boxes.
Keep aspect will maintain the original 16/9 (1.778) aspect and fit it into whatever you enter into the Encoder
Settings 'End Size' box. It will fill in Pillar bars or Letterbox bars automatically to maintain this image.
The image was originally 16/9 and is now 2.236 after cropping and if we fit it into the 720x480 end size setting
it will add the letterboxes again.
However, if you Check 'Chg. Aspect' and change x, y to the original 16, 9 and then click 480 Height box the
width will change automatically to show 854. The program will stretch/shrink the video to the height set in
'End Size' and if the width is smaller than 854, it will add Pillar bars. If it is larger, it will change the PAR to fit
the 854x480 into the end size 720x480 (anamorphic) but set DAR to 854x480 so it is played correctly.
NOTE: Chg. Aspect will stretch, fit, make anamorphic to fit into 'END SIZE' settings
Since it is a little large, setting the end size to 360x240 will create a video:
Since we also set the Delogo area, the Logo is now
blurred out also.

Notice the Aspect ratio at the cursor


set near the final videos display. It
shows 1.5 (720x480) video size and
the 1.78 (854x480) actual Display
Aspect.

In order to Create or preview, just hit the 'M' in the upper right if the Media Info Form is not visible and hit
excute after clicking Preview or Extract by Time:
The FFMpeg script may be viewed or changed here before
clicking execute

TWEAK, SHARP, BLUR DEBLOCK


The tweak settings are set to the default normal and may be changed in 1/10th up or down to affect the
output of Preview or Extract process. The Sharpen, Blur, and Deblock apply these filters and are adjusted with
the slidebars.

ADD SUBTITLE TRACK (MKV/MP4) tab


This tab can be used to extract or insert an ASS/SRT
subtitle track into and existing video. It can also be used
to convert between the 2. To correctly fill in the Track#
and Existing tracks boxes click List tracks to receive:

The correct entries for the above would be 2 tracks existing (0:0 and 0:1) and you would be adding 0:2, the
next track in line after the video sequence 0:0, 0:1, 0:2, 0:3, 0:4, etc.

DELAY/INDEX tab
Here can be DGIndex and MPG Remux can also be
found as well as creating a visual image of the audio
of a file which will be labeled xxx/yyy/zzzLAVLine.ext
and xxx/yyy/zzzLAVPoint.ext like the 2 below
respectively
Delay Audio/Video copies audio and vVideo without
recoding them but with FFMpeg's itoffset.

LINE

POINTS

MERGE/RESIZE tab
This tab is a quick and easy method used to join
various videos with the same settings together after
extracting them into separate video segments. You
can adjust these, in order, up and down by
highlighting and using the move up/down buttons.
The methods at the bottom are the most common to
join various videos. Some methods will lose subtitles
or fail with subtitles but it was mainly developed for
cutting wanted portions out of a video and then
joining them all together.
The methods also have mouseover comments as
shown to help decide which to use

IMPORTANT: If you are Converting/Resizing, make sure the 'No Conversion' is unchecked. This check mark
automatically adds Listbox1 to Listbox3 so if you are converting, there will be too many entries after
converting.
These are the results of each method and the output. RED is PREFERENCE
FLV ffmpeg=joins OK plays both, length is both
FLV copy /b = 2 complete movies but time says only one and plays one
MKV ffmpeg=joins but includes only first subtitle
MKV copy /b = 2 complete movies but time says only one and plays only one
MP4 ffmpeg = joins but loses DVBsubs and srt subs
MP4 copy /b= 2 complete movies but time says only one and plays one
VOB FFmpeg = multiple errors trying to join and aborts
VOB /b works and carries over the DVD subtitles
3GP ffmpeg=joins/ plays fine Subtitles ??????
3GP copy /b = 2 complete movies but time says only one and plays one
FLAC ffmpeg= Multiple errors during conversion. Fails
FLAC copy /b = 2 complete movies but time says only one and plays one
MPG ffmpeg=joins/ plays fine. Gives correct time and size. Subtitles ??????
MPG copy /b = Seems to play ok but Time and size is given as only one video.
M2V = Same as MPG
M2V /b copy = Same as MPG
ASF ffmpeg=joins OK gives doubke size, double time, plays ok
MKV copy /b = 2 complete movies double size but time is for one video.
To convert/Resize, uncheck No Conversion and select all you wish to convert in the top box. This will add the
files to the middle box (Listbox2) Set the Size, CRF and Pad parameters and click Convert/Resize Button. The
Media info Form will display and show progress as each file is converted. Each converted file will be added to
Listbox3, ready to be joined by Clicking Join when finished in Media Infor Form.
The converted files will automatically be renamed in case you use the same file twice to double its length. Yes
it is, but some may wish to needs this as I have when the audio is twice as long as the video.

NOTE: Joining 2 mp4 videos will result in 'Atoms'


arranged as shown below, one file (MDAT/MOOV) and
2 segments TRAK. This will play fine on most players
and convert to other formats well also.
C:\Users\Bud\Desktop>atomicparsley
"C:\Users\Bud\Desktop\Various test Formats\_J
oined_1.mp4" -T
Atom ftyp @ 0 of size: 32, ends @ 32
Atom free @ 32 of size: 8, ends @ 40
Atom mdat @ 40 of size: 78635300, ends @ 78635340
Atom moov @ 78635340 of size: 654149, ends @
79289489
Atom mvhd @ 78635348 of size: 108, ends @
78635456
Atom trak @ 78635456 of size: 278375, ends @ 78913831
Atom tkhd @ 78635464 of size: 92, ends @ 78635556
Atom edts @ 78635556 of size: 48, ends @ 78635604
Atom elst @ 78635564 of size: 40, ends @ 78635604
Atom mdia @ 78635604 of size: 278227, ends @ 78913831
Removed portion here for demonstration
Atom trak @ 78913831 of size: 375560, ends @ 79289391
Atom tkhd @ 78913839 of size: 92, ends @ 78913931
Atom edts @ 78913931 of size: 36, ends @ 78913967
Atom elst @ 78913939 of size: 28, ends @ 78913967
Atom mdia @ 78913967 of size: 375424, ends @ 79289391
Removed portion here for demonstration
-----------------------------------------------------Total size: 79289489 bytes; 50 atoms total. AtomicParsley version: 0.9.0 (utf16)
Media data: 78635300 bytes; 654189 bytes all other atoms (0.825% atom overhead).
Total free atom space: 8 bytes; 0.000% waste.
------------------------------------------------------

CALC/HISTOGRAM tab
This tab is a calculator in case you need one and displays
several histograms that are handy on the next page.

Classic (Factor)

Color

Luma

Levels

Color 2

Audio Levels

BE CAREFUL OF THIS PAGE! I have limited its use so computers do not run away because it will extract every
image frame if you tell it to so I have limited that to 100. If you need more contact me at
mailto:lavern.laman@gmail.com?subject=Increase in Images.
I have also taken great pains to make sure the images created by a batch file are created in a separate folders
named PROCESSED and IMAGEPROCESSED BUT USE COPIES OF YOUR VIDEOS/IMAGES TO TEST.

The time interval on extract images means time


between frames and yes you can use decimal but
right now the limit is 100 until you have made sure
it works for you. (It works fine for me but I'm
patient while it creates multiple images through
COMMAND batch file.)
The image2Video and Images2Video allow creating
a video with one image thruout or multiple images
set for duration each below. The blank box near
the botom is a drag/drop for audio when you check
'Include Audio'.
If you check 'Embed Date/Time' the Images will be
recreated with the images in a separate folder. You
would then use these to make into a video in a
separate step.

CLARIFICATION EXAMPLE
Using a short ad video, I dropped the video I want extracted into the play tab and set the settingssettings.
I used 5 second interval since this video is 57 seconds long and would create only 11 images. It will remind
you when you when you click extract!

It will create a script to store the images in a folder called ImageFolder in the same folder as your video COPY.

This is ImageFolder's contents

To Embed Date/Time in video, set


the Images2Video checkbox and
'Embed Date/Time' checkbox and
click'Create button.
All the images will be placed in a
folder called PROCESSED noted
above and will be created using
COMMAND script.

You can now use these to create a video with times


embedded in them.

Transform tab

This is an easy page. Drag/Drop Images to the Image boxes and select the transition if you wish. Choose add
audio if needed and click Create button. If you wish to see the transition definition, click 'Show Transitions'
and you will see:
Click an individual item to see a more detailed close
up and its name

PIX EDIT tab


This is simply a utility to adjust pictures that need
rotated, cropped or padded. This one simulates a
landscape photo that needed to be turn to portrait
and padded so it is 4/3 aspect. I simply clicked the
'Pad' checkbox and changed the Pad X parameter
until the 'Auto Aspect' automatically changed to
1.33 (4/3).
At the moment the refresh is not automatic and
needs 'Refresh' button clicked after all changes are
made.
Click Create and a script for an image with the word
NEW added to its name will be created in Media Info
Form. Click 'Execute' after studying the script and
the NEW image will be created.

PLAYER tab
Pause stops the player and Stop emptys the display. You can drag/drop a video to an empty area aound the
Play button also. Then click the 'PLAY' button to start initial view.

ADD LOGO tab


This tab allows adding a Logo (with transparency)
adjustable or part of the image (PNG, BMP).
First Drag/Drop all Video and Image then click Create
AVS.
To view first, Click 'Play' 2nd after AVS created
If all looks correct, Click 'Make Video' and the video plus
logo will be created.
Since it is an AVISynth script it will use the settings on
the Extract/Edit page for Re-Encoding.

QUICK CROP Picture


Cropping an image quick and easy has another simple crop with cursor function. Just click the 'C' in the upper
right corner and you will get a crop form. Open the image you wish to crop and use the cursor to drag a box
around what you wish to keep OR set the coordinates, width and height and click draw. Save this new image
and you are ready to use as custom crop image.

S-ar putea să vă placă și