Code for YUV video stream processing. This code extends code from the MJPEG tools and requires the mjpeg libraries. If you have difficulty compiling these contact me, mjpeg0 at silicontrip dot org.
You will need the mjpeg libraries to compile the yuv tools. information on the mjpeg libraries and download.
The Libav tools require the libavcodec library which is part of the ffmpeg tools
Produces an ASCII file suitable for plotting in gnuplot of the bitrate per frame. Also includes a rolling average algorithm that helps smooth out differences between I frame, P frame and B frames. Constant bitrate is not so constant. Requires about 50 frames rolling average window to get an idea of the average bitrate.
using a post processing tool such as octave to average the graph may be useful
Tested the EDL mode of this program. Discovered what appears to be a bug in the libav library in which frames are unexpectedly dropped. I have attempted to work around the bug, however it appears to be filetype specific. Currently m2v files work accurately. Use this with the updated yuvdiag tool to stamp your video for EDL file creation. Or use a frame accurate video player.
This is a very simple generic anything to yuv tool, using the libav library from ffmpeg. It supports any video file that libav supports (which includes WMV3s now!!!) it can be used to replace the -vo yuv4mpeg option of mplayer or the -f yuv4mpegpipe option of ffmpeg. The tool can also override yuv header values, in the case of incorrect aspect ratio or interlacing etc. And will perform simple chroma subsampling conversion, if the source file is not in the desired chroma subsampling mode.
This release now includes an EDL file parser, for joining or editing files. This is a first working version is not optimised and may contain bugs. I hope to have more testing over the next few months. See sample EDL file below.
Now uses sws_scaler for chroma resampling rather than the deprecated img_convert, So will compile with the newer version of FFMPEG. Also have provision for decode_audio3 and decode_video2 which has appeared in the latest ffmpeg snapshot.
I use this regularily for file conversions, so I hope the code is quite mature, with a thorough set of options and help. Any bugs should be picked up quickly.
As I do want this to be a one program fits all for yuv video conversion any bugs or issues you have with the software I would like to hear about so I can make this the best software.
libav2yuv strangefile.avi | y4m-yuvfilter | ffmpeg -f yuv4mpegpipe -i - -vcodec whatever wantedfile.avi
[num] [duration] [srcIn] [srcOut] [recIn] [recOut] /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_01.mpg VA C 0:0:0:0 0:4:9:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_02.mpg VA C 0:0:0:0 0:3:39:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_03.mpg VA C 0:0:0:0 0:2:38:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_04.mpg VA C 0:0:0:0 0:3:9:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_05.mpg VA C 0:0:0:0 0:4:39:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_06.mpg VA C 0:0:0:0 0:4:9:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_07.mpg VA C 0:0:0:0 0:2:9:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_08.mpg VA C 0:0:0:0 0:3:9:0 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_09.mpg VA C 0:0:0:0 0:3:38:15 /Users/d332027/Movies/TheFaceOfTheEnemy/the_face_of_the_enemy_10.mpg VA C 0:0:0:0 0:5:46:0
The fields are:
This is a very simple avi/mov/mpg demuxer and muxer.
The demuxer works quite well, however the muxing part still has bugs and has not correctly produced a working file. This is still a work in progress.
this is a utility library. It doesn't do anything itself
Converts full swing levels to broadcast swing for file which have been incorrectly labelled.
Performs clipping, scaling or detection of out of range Luma values (16-235)
This was my first paid video filter job, to add a static image overlay to a video file.
This filter handles PNGs with alpha chanels (and any other image format that libavcodec can read). The image can be positioned and scaled. And also has an interval on and off.
The filter uses the arguments:
image_name[:X:Y[:W:H[:on_time:off_time]]] or config_name.cfg (the .cfg is required)
The config file is a quick way to store frequently used settings. The config file consists of:
filename mywatermark.png x 640 y 400 w 64 h 16 ontime 5 offtime 55
The interval uses the source video's DTS value to calculate if the watermark is shown or not. This may produce unexpected results if the source video has timecode breaks, or if part of the video is skipped using the ffmpeg command line option -ss. ontime and offtime must both be specified for interval display to work. The default values for ontime and offtime are -1 meaning do not use interval display, the watermark remains visible for the entire duration of the video.