text:
after effects question about clamp
i have a question base on this video.

i have a problem with this code ! please help me it work's but ! for example i made a shape to use it as a controller for controlling my character head movement ! so i limit it from 0 to 20 and now when i select that shape and i move it with mouse it just moves in 0 to 20 in x but if accidentally i move the mouse a little more (it show me 20 in x ) but when i click on it (in position property that let you to put a value,) it show me a higher number (depends on how much i moved my mouse) ! so when again i want come back to 0 in x by moving my shape there is a problem because first i should comeback from that high number to 20 then i can move to 0 !
you can see in video if i select that yellow head control shape and i move it more than 20 steps in (+) direction and more than 0 in (-) direction in facts behind the code it changes the number more than 20 or 0 so it making a problem ! so if i want back from 20 to 10 or 0 or 7 or ... if behind the code (when you click on number it show you the real number) its like 400 you have back from 400 to 20 then back to 0 or 10 or 7 and ..i send video in my next answer because of limitation  - in all the video just look at the x position number when i move the yellow control

Can you clarify? The code works for me, and if I click and track on the position value it immediately limits the position to 20. The video's code works with y-dimension. You want to use it on x. Make sure you adapt the code accordingly. You should edit the question and post your code and a screenshot.

hi - my qustion is completly right  i made a video to make it more clear ! i told you it works ..yes ! but as you can see in video if i select that yellow head control shape and i move it more than 20 steps in (+) direction and more than 0 in (-) direction in facts behind the code it changes the number more than 20 or 0 so it making a problem ! so if i want back from 20 to 10 or 0 or 7 or ... if behind the code (when you click on number it show you the real number) its like 400 you have back from 400 to 20 then back to 0 or 10 or 7 and ..i send video in my next answer because  of limitation

https://www.youtube.com/watch?v=-5ZwkUgqHpA      in all the video just  look at the x position number when i move the yellow control

Okay, now I understand, the problem is that After Effects keeps remembering the blue value which can be larger than 20 or generally speaking larger than the red value. I'm not sure this can be solved. But I don't know that much about expression. Maybe somebody else has an idea. In the meantime you could edit your question and place the YouTube link in the question text, so it's easier for people to find.

sure thank you :)

@Matt is correct. The keyframed value of a property is always stored, even if an expression sets the actual value to something else.

blackout_duration=14
transition_time=2
dur=$(ffprobe -loglevel error -show_entries format=duration -of default=nk=1:nw=1 "$1.mp3")
echo "Duration $dur"
offset=$(bc -l <<< "$dur"-"$blackout_duration")
ffmpeg -hide_banner -loop 1 -i $1.png -i $1.mp3 -c:v libx264 -preset ultrafast -tune stillimage -pix_fmt yuv420p -shortest -filter_complex "[0:v]fade=type=out:duration=$transition_time:start_time='$offset'[v]" -map "[v]" -map "1:a" $1.mkv


text:
how to Checkbox Control one item twice in after effect?
I have a checkbox for background and its items. , write the script
if(thisComp.layer("Controller ").effect("Checkbox background ")("Checkbox")>0) {100} else {0};

it is working
But when checkbox for another one of the items above that background write the script
if(thisComp.layer("Controller ").effect("Checkbox percents")("Checkbox")>0) {100} else {0};
if(thisComp.layer("Controller ").effect("Checkbox background ")("Checkbox")>0) {100} else {0};

but not working

Expressions are evaluated until they return a value. Your first line will always return a value, and the expression will stop there. Think about what you're telling the property to do:

If the percents checkbox is ticked then you're set to 100 otherwise
you're 0, Okthxbye.
Oh, did I mention also if the background checkbox is ticked
then you're set to 100 otherwise you're 0.

What happens if percents is ticked but background isn't?
What you need to use is boolean logic. So if you want the opacity to be 100 if either checkbox is ticked you'd say: if percents is ticked or background is ticked then 100, otherwise 0. The javascript way of writing this is to use the logical or operator: ||
let percents = thisComp.layer("Controller ").effect("Checkbox percents")("Checkbox");
let bg = thisComp.layer("Controller ").effect("Checkbox background ");
if (percents > 0 || bg > 0) { 100 } else {0}

the two let statements just assign variables to the checkbox values, to keep the logic bit tidy, otherwise it looks like
if(thisComp.layer("Controller ").effect("Checkbox percents")("Checkbox")>0 || thisComp.layer("Controller ").effect("Checkbox background ")("Checkbox")>0) {100} else {0};

Which is a bit hard to read. You could also shorten the last line by omitting the > 0 bit. If something is equal to 0, javascript treats it as false and anything > 0 is automatically truth`. So the last line could be simply:
if (percents || bg) { 100 } else {0}

Now if you wanted the opacity to be 100 only if both the checkboxes were checked then you'd say: I want you to be 100 if percents is checked and background is checked. The javascript notation for a logical and is &&. So now your expression would look like
let percents = thisComp.layer("Controller ").effect("Checkbox percents")("Checkbox");
let bg = thisComp.layer("Controller ").effect("Checkbox background ");
if (percents && bg) { 100 } else {0}

Boolean logic can be more complex, you can use not (or in JS notation !) to return true when something is false, e.g. !(1 == 1) returns false, and you can group things together using brackets to make more complex expressions. E.g.:
if ((! percents) && background){100} else {0}

returns 100 only if percents is not checked and background is checked. Boolean logic can be represented by Truth tables, like this:

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Detect duration of layer
I want to get the time / duration of the layer, when I stretch or lengthen the layer to produce an effect, for example I want the opacity of a layer to go to 0% 5 frames before the end of the layer, and if I lengthen or I cut that layer that those 5 frames are the same at the end of the layer, regardless of the length of the layer

This YouTube tutorial explains how to do this:
After Effects Quick Tip - How to Add Auto Opacity To Layers and Footage

Add an expression to the layer's Opacity property by alt-clicking the stopwatch.
Paste this expression into the box:

fadeDuration = .5;
Math.min(linear(time,inPoint,inPoint + fadeDuration, 0, 100), linear(time,outPoint - fadeDuration,outPoint,100,0))

The layer will now fade in for half a second, and then fade out for half a second based on its in and out points.
If want to specify the length in frames instead of seconds, change the first line of the expression to be this:
fadeDuration = thisComp.frameDuration * 5;

Now the layer will fade in and fade out over a period of 5 frames.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Does anyone know how to control the stroke width of a shape using a control layer?
I recently created the attached graphic in Illustrator for a project and am trying to figure out how to create something similar in After Effects perhaps using a control layer.
The idea is that I want the width of the stroke on each of the lines to be linked to the black/white values of the control layer, which would have my letter W on it in this case.
I've achieved similar results in the past linking the scale of a shape layer with the colour value of a control layer but I can't figure out how to repurpose that technique for this job.
Any advice would be very welcome and appreciated!
R

Interesting question. I wonder if a similar effect could be achieve using a particle generator like form or particular somehow...

I would use the ol' blur-and-threshold trick:

make my lines slightly thicker than they need to be,
precompose my lines and the control layer, and set the opacity of the control layer to say 50%.
Then back in the original comp I would add Gaussian blur to the precomped layers, followed by the threshold effect.
Muck around with the values for both effects and the opacity of the control layer until it's good.


text:
How do I replace one layer with another and take all its specifications
How do I replace one layer with another and take all its specifications(size, scale, position, effects....) in after effects?.

Select the layer you want to replace in the timeline or comp window
Alt/opt-drag the new source from the project window into the comp or timeline window.


text:
Scale texts as the the parent shape layer changes
can anyone take a look at the animation I've made and provide some insights?
Here is what I've got so far.
https://drive.google.com/file/d/1eIdcAp9cK_AaA8UWBx9OKWAXXZWq0F2r/view?usp=sharing
The problem: texts are floating when the cube is rotating.
Current method: I have a cube animation as the background and I added shaper layer and text to each face. For each face, I parent the text to shape layer and use path to adjust the shape as the cube rotating.
Question: is there a better way to scale the text correspondingly as parent shape layer resizing?

If you have the cube animation as a rendered file and can't mess around in the original animation, I would try corner-pins. Simply track the corners by hand by keyframing the four corners of the corner-pin to the corners of each face and apply it to your text layer. You might want to precomp the text first and apply the corner-pin onto the precomp, so you're able to rescale and modify the text alone from inside the precomp.


text:
How to soften the appearance of particles in Particular
I'm doing a Particle system that looks like a Nebulae/BigBang subtle explosion, everything looks perfectly except for the 'grainy looking texture' of the particles.
If for example I add some quick Gaussian Blur, it looks better, but obviously, blurry.
Is there any way to make the 'particle texture' softer somehow and not that 'pixelated'? Like, no showing the 'little dots' but a true 'cloud mass' (not cloudet or striklet, these didn't work properly)
I'm using the basic sphere for particle.

I reckon try a lot more particles and make them much smaller. (But this will take much longer to process). You can feather the spheres too, which might give you the effect you need.


text:
Do you always need to convert videos with a YUV color space for compositing in Blender?
I have a 10 bits .mov file with YUV color space encoded prores 422HQ of some green screen footage. -Do we always need to convert videos with a YUV color space for compositing work?
If I want to convert the footage via ffmpeg to images,I am not sure to which color space and how to convert in a right way videos with chroma subsampling of 422?

Composting in which s/w?

@Gyan Hi, I want to do the composting in blender.

Blender can use YUV video. Almost all compressed video is YUV, there are only one or two RGB codecs, so it makes sense.

@stib thank you for your answer. Regarding videos with more than 8 bits- I read that blender has a problem interpreting in a right way videos with more than 8 bits (Some places in blender, for example, the video editor will interpret 10 bit videos as 8 bit. That's why I want to convert the video to image sequences via FFMPEG. I don't know what is the right command and what is the proper image format that will maintain the highest quality as well as the proper color space and how to convert in a right way videos with chroma subsampling of 422?

@Gyan ,thank you for your answer. Regarding videos with more than 8 bits- I read that blender has a problem interpreting in a right way videos with more than 8 bits (Some places in blender, for example, the video editor will interpret 10 bit videos as 8 bit. That's why I want to convert the video to image sequences via FFMPEG. I don't know what is the right command and what is the proper image format that will maintain the highest quality as well as the proper color space and how to convert in a right way videos with chroma subsampling of 422?

What codec are you using?

@stib I tried to output the video with h.264 codec lossless, with avi or mp4 container and the result is 8 bits video.(pixel format of input video is yuv422p10le).
I came across a similar  question and the workflow described in the comment before the last- where it is suggested
to convert the video to a 16 bit TIFF images, so that's what I'm trying to achieve now, but I don't know the proper command
to convert in the right way a YUV video with subsampling of 422 to image sequence?

Don't use h.264, wrong codec for the job. I'm not sure what codecs Blender supports, but you could try ffv1 or even prores.

Well I tried using ffv1-still 8 bits. There is no option for prores codec in blender as far as I know. I don't think I can output this video with more then 8 bits though. I would just like to learn how to convert the video to image sequence using ffmpeg and maintain the same quality?


text:
What is this sun blocker in film making?
In the making of Django Unchained, I noticed some people running behind the camera team. These people are holding something that looks like a sun blocker.
Video that shows it in use is here.
I haven't been able to confirm that or find out what this actually does.
Can anybody tell me?
Thank you!

Given the angle, I'd say it's a reflector. The line of people on the right are standing with their backs to the sun, it's probably there to bounce a bit of fill light on to their faces, so they're not silhouetted.

Thank you. Could you perhaps take a quick look at the full scene where it's shown in action? I guess this way it can better be estimated: https://youtu.be/e3-VCVLtlBQ?t=635

Looking at that I'd say definitely reflector, but probably for the foreground character near the camera mostly. Once again, the camera is looking into the sun, it's to get a bit of fill light into the shadows.


text:
How to animate text overlays, in iMovie or similar
I agreed to cut edit a video for the team I'm working with at university even though it's not really in my expertise (and I said that, I believe they overestimate me though).
I got sent a video that's supposed to serve as reference and I want to replicate a certain effect for blending in text. (best would be in iMovie but other programs are fine as long as there's a free demo like with Final Cut Pro)
https://i.sstatic.net/MAezj.jpg
Do you know whether there's a simple option for this in any program. I could of course try to do it frame by frame in affinity photo but I'd like something more convenient.

Since you asked for a program...
If you're referring to the title specifically, this can be accomplished is After Effects with relative ease.
You'll simply need to...

create the three text box shapes
the three lines of text
parent-child them together
animate them all with keyframes

If you're referring to the changing of speed effect, this can also be done in After Effects.  You can simply animate the speed with keyframes.


text:
Custom Animated Counter in Adobe After Effects
I'm trying to create a counter that automatically updates to the next value once per second.  I have that part figured out:
string = "7609,7758,7916,8063,8217,8382,8545,8701,8871,9049,9241,9386,9533,9722,9911,10055,10196,10321,10327,10451,10646,10854,11005,11195,11411,11583,11740,11904,12051,12177,12308,12404,12484,12558,12637,12725,12805,12882,12982,13088,13212,13340,13486,13674,13840,";
array = string.split(",")
l=array.length;

sek = Math.floor(time);

if(sek<l){
            array[sek];
}else{
            "End of Data";
}

However, now I'm trying to animate it.  I've made simple counters that count from a starting number to a final number using Slider Control and keyframes, but is there a way to automate it?  The final project is going to have multiple counters going at the same time, with around 750 points of data in total, so automating would save so much time.

It's a little bit unclear what you're asking. When you say "is there a way to automate it", what exactly are you wanting to automate? BTW you could just do array = [7609,7758,7916,8063,8217,8382, … without making it into a string and then splitting it.

To clarify, what I have currently updates the count once per second. What I'd like it to do is to animate the numbers in between 7609 and 7758 and then between 7758 and 7916  rather than just going straight from 7609 to 7758. Rephrased: I'd like to see the integer values in between 7609 and 7758 like 7609 then 7610 then 7611, all the way up to 7758. What I've done in the past is link 2 numbers via the Slide Control and setting keyframes. This counts up like I want it to, however I have to manually set every single keyframe and type in the 2 numbers I want it to start and finish with.

With regards to the array, would this be what you mean?
`array = [7609,7758,7916,8063,8217,8382,8545,8701,8871,9049,9241,9386,9533,9722,9911,10055,10196,10321,10327,10451,10646,10854,11005,11195,11411,11583,11740,11904,12051,12177,12308,12404,12484,12558,12637,12725,12805,12882,12982,13088,13212,13340,13486,13674,13840]
l=array.length;
sek = Math.floor(time);
if(sek<l){
array[sek];
}else{
"End of Data";
}
`

When you get from 7609 to 7758, what happens then? Do you want it to continue to count until it gets to 13840? Maybe explain what you are trying to do, big picture.

This will animate between the values in the array, hitting each value precisely at the second mark though the viewer won't be able to notice because the numbers will be moving too fast.
var dataArr = [7609,7758,7916,8063,8217,8382,8545,8701,8871,9049,9241,9386,9533,9722,9911,10055,10196,10321,10327,10451,10646,10854,11005,11195,11411,11583,11740,11904,12051,12177,12308,12404,12484,12558,12637,12725,12805,12882,12982,13088,13212,13340,13486,13674,13840];
var sek = Math.floor(time);
if (sek < dataArr.length - 1){
   Math.floor(linear(time-sek, dataArr[sek], dataArr[sek+1]));
} else {
    "out of data";
}

For bonus points you can add commas or culture-appropriate separators by replacing the line that starts with Math.floor(linear … with:
Math.floor(linear(time-sek, dataArr[sek], dataArr[sek+1])).toLocaleString("en-AU");

where you replace "en-AU" with your locale, e.g. for Chinese Decimal units use "zh-Hans-CN-u-nu-hanidec" and it will look like: 七,六〇九


text:
Adobe Audition Exporting longer audio track than was originally given
I am trying to clean up the audio from a video I shot. I imported the video into Adobe Audition and used all the tools to clean it up. In Audition, I can see the video in the video window and it all looks good.
Once I'm done, I export it as a .wav file (have tried .mp3 as well) and when I import it into iMovie I can see that iMovie thinks they're the same time length but near the end the audio becomes out of sync and is a full few seconds longer than the original audio even though they're from the exact same source.
The tools I used are:

De-Reverb
DeEsser
Voice enhancer
Noise reduction process

Can anyone help me out with this?
Edit: I tried importing into premier pro and the same thing happened.

What do Audition/Premiere show as the bit-rate of the audio file in the original source video? What do iMovie/Premiere show as the bit-rate of the audio file when imported back in?
Sounds like possibly the source video is indicating an incorrect bit-rate, i.e. actually recorded at 48kHz, but being identified/treated/exported as 44.1kHz in Audition, which ends up giving it a longer run time. The audio pitch should also be slightly lower when imported back to iMovie/Premiere, possibly not enough to easily notice.
I would check the audio properties in the various tools, and see if that's the issue. If you check the full run time of the clip vs how many seconds extra audio, it would be easy enough to calculate if this is the problem. I would create a project in Premiere where you import the original video (with audio), and import the modified audio as well, and line them up in the same sequence - you should be able to check the properties of the two audio tracks, and spot if the edited track is stretched out overall longer than the original, or if it is some other issue. If you play the project, you should be able to hear if the tracks go slowly out of sync, or if it's some other issue such as jumping out of sync at a specific point.
If this isn't the issue, maybe update the question with info on how the video was recorded, any other tools you might have passed it through, and the exact run times of the original video, original audio and edited audio. I've definitely seen this exact issue caused by 48kHz incorrectly processed as 44.1kHz and vice versa, although it's not an issue I've ever had with any of the Adobe products.

Using other adobe products is easier because source files can be changed  between programs, so stretching and editing again is easier.


text:
How to get light swish/trail effect in aftereffects?
Ok Im trying to emulate light path effects in aftereffects like this at this point (the weapon swing): https://youtu.be/6gX-dCaLCo0?t=66
I saw this tutorial, however it only works on windows: https://youtu.be/HxyGDekCGEs
How can I create the light glow/trail effect here in AE?

Trapcode particular is available for Mac, too. What about that tutorial was windows specific? One of my biggest gripes with after effects is that 99% of the time you see something cool done with it, it’s always a third-party plug-in doing the heavy lifting.

One option without using any 3rd party plugins is to track the motion of the object you want to leave a trail, apply that motion to a shape layer, then apply an echo effect to it. Additional effects like glow, and motion blur (all native effects), and playing with transfer modes and opacity will help sell it.


text:
How to create outward spiral motion in Adobe After Effects?
I want to create an outward spiral motion in Adobe AE. So how to do it?
I found an expression script for it here but it creates an inward spiral motion and I want outward spiral. And I am not able to reverse it.
shrink=time+1
radius=1000/shrink
angle=time*200
x=radius*Math.cos(degreesToRadians(angle))
y=radius*Math.sin(degreesToRadians(angle))
//z=0 // no depth
z=time*time // with depth
centre=[640,360,0]
add(centre,[x,y,z])

What exactly I want to do?
I want the images to spiral in a circular image from center to some particular points in the circle. And then they stop spiralling and stay at that point.
And after a while they shift to left with the whole circular image.
Please help.

That script uses the variable shrink, which paradoxically increases with time. Just make it decrease with time, e.g. by replacing the first line with these two:
var endTime =  123; //how long you want it to take, in seconds
shrink = endTime - time;

Or make the radius the product of the time and a constant, rather than dividing the radius by time, by replacing the first two lines with these:
shrink= time;
radius = 100 * time; //this will grow 100 pixels every second, adjust to suit

Or parent the images to a null, rotate it and scale it up. Then to counter the rotation and scale of the null on each image use this expression for rotation
0 - parent.transform.rotation

and for scale:
100 / parent.scale


text:
after effects slider control code help
I'm trying to make a slider that basically can act as a crossfader between a bunch of different layers (so as the slider goes up, it fades through several layers). This is what I've written, and I'm getting the error "Error: SyntaxError: Unexpected Token )" on the first line and I'm having trouble telling where the problem is.
My code:
if(thisComp.layer("Null 1").effect("Slider Control")("Slider") <= 5)
{
    if(thisComp.layer("Null 1").effect("Slider Control")("Slider") <= 2.5)
    {
        out = linear("Null 1").effect("Slider Control")("Slider"), 0, 100, 0, 2.5);
    }
    else
    {
        out = linear("Null 1").effect("Slider Control")("Slider"), 0, 100, 2.5, 5);
        out = 100 - out;
    }
    }
}
else{
    out = 0;
}
out;

Thank you!!

The error message is telling you that you've got a stray bracket, so count your brackets and see if the (s match the )s. Spoiler alert: they don't.
I can see two cases: after each linear function call you have a closing bracket after the "Null 1" string that isn't matched by an opening bracket. And "Null 1" on its own is just treated as a string, not a layer, so that's another problem.
I'm assuming you mean thisComp.layer("Null 1") which is a reference to a layer. So
out = linear("Null 1").effect("Slider Control")("Slider"), 0, 100, 0, 2.5);

should be
out = linear(thisComp.layer("Null 1").effect("Slider Control")("Slider"), 0, 100, 0, 2.5);

I got it working, thank you!

Don't thank me, mash that tick button!


text:
When making an educational video, does citation need to be in the video itself?
I can't seem to find any information on this. If a person is making an essay, or a research paper there are specific rules about citation. Such as, if a specific fact is used in a paraphrased way, a citation has to be listed for where those facts came from. For video making, I haven't seen any information about it. I've found how to cite a video in a paper, but not how to cite a paper in a video or if it's even necessary. Since I'd be making a Youtube video, I could have my sources in the description, maybe even at the end of the video itself, but would I have to cite things as I'm saying them? I don't think so, but I'm also not sure either. To be honest, I've seen educational Youtube videos that don't do this, but a lot of those videos don't even cite their sources either.

The big disadvantage of citations that are part of the video itself is that they can't easily be a link, or even copy-pasted into a search engine like a text citation. So if it's a URL, the viewer will have to pause the video, and type the URL manually. You could use YouTubes "cards" function to add links as pop-up interactive overlays, but I think you are limited to 5 links per video.
I would put my citations in the description, and in case the video gets embedded somewhere else, give them at the end of the video as well, perhaps with a link to a page where they could be found.
There is no set convention that I know of, unlike citations in papers or books. There is a podcast that I listen to that does give citations, but they just tell you how many at the end and send you to their website to read the transcript to find them. I don't think most viewers are expecting them, except for the implicit citation you give when you say something like "in a 2019 study by Dr Stib, it was noted that…" when citing other's research.

Some YouTubers add screenshots or images of the sources (I mean part of the source text) to the video and since you are using YouTube you can add those info buttons which will appear in the top right corner of the video.
I agree that it would look a bit weird if you showed full URL addresses in your video, but video description is great place to “hide” them while still being accessible.
In general, I think it is great idea to citate correctly in video, it’s not required but makes your content more trustworthy. Hope this helps.


text:
poor quality video VHS camcorder: is there a fix?
I recently rescued an old Panasonic M40 VHS camcorder. All the electronics work absolutely fine. I bought a pack of VHS tapes and did a quick video test. The video quality is very bad with wobbly lines moving through it all the time and often changing from black n white to colour. The sound quality is atrocious but I can live with that.
Is there anyone who has experience with these old units that knows of an easy fix? I played with the tracking so it's not that. I doubt it is physically the tape because I bought them brand new. Has anyone got any pointers or knows how to trouble shoot the problem? Or is this a massive waste of time?
I love having this big retro beast to play about with and I know it is gimmicky but so far it's cost me a tenner in tapes and an afternoon of fun. I'm willing to put more time and money (up to a point) into it but have no idea of what to do or where to go so any help will be well received.

Have you tried cleaning the heads? You need a VHS head cleaner tape, I have no idea where you'd find one though. Are the tapes new as in manufactured recently, or new as in manufactured in 1998 and not opened until now?

+1 for cleaning the heads, since you've already checked the tracking. Likely they're dirty, particularly if the unit has been sitting unused with whatever gunk on there oxidising away. I'd try to get cleaning fluid and clean yourself manually with cotton swabs if you can, some head cleaning tapes might be a bit abrasive for something that has been sitting a while. If head cleaning offers no improvement, the heads themselves are still likely the issue, might be easier to find another unit than getting them replaced at this point.

The AV ARTIFACT ATLAS is a good resource for identifying errors in video. It also gives advice on how to fix them.


text:
Make the sound of an audience cheering a custom text
I want to make the sound of a group of people (like an audience) cheering a user defined text.
Is it possible to achieve this easily?
I tried googling, but couldn't find anything.

It's a bit hard to understand what you're asking. Could you re-phrase the question, giving us a little more detail about exactly what you're trying to achieve, what you've tried, and the problem you're having.

You mean generating a audio-file of people cheering a text that you can change at any minute? Either look into neural-network voice-imitation or hire a few people to chant stuff. Personally, I would recommend the latter (artificial voices always sound creepy and off in my opinion).

@stib I have only tried to find some tool online. By I want to make audience cheer a user defined text. I mean to make an audio file that will have a cheer of audience for the text we provide. Florian, I agree, computer generated might not sound good.

OK, I edited the question to make it clearer. Before it sounded like you wanted to know how to make people cheer, like those signs that say "applause" in live studio recordings

@stib thanks. So it's like text to audio but the audio should be a group cheering that text not single person.

If you don't have a lot of people, you could get a few people to do the recording and use multiple takes of them saying the lines, then mix the takes together.

SG word sound on audience on stadium


text:
Uploaded video from IOS and Android devices can't be merged
When I try to concatenate one video from IOS and Another from Android user, the output video doesn't work.
I am using this command:
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output

Please use ffprobe to include information about the format of each file in your list, if they aren't the same merging won't work (you'll need to reencode, causing loss). To make Android videos similar (but possibly still not mergable) go to phone's video settings, "Rear Video Size" and turn on "HEVC" (or turn it off on iPhone). That's probably where the problem lies as the default for each OS is opposite.

All inputs must have the same formats and parameters. Show info for each input as Rob mentioned if you need help conforming them.


text:
Show current play speed in after effects
Is it possible to display the current play speed (eg. X2, X3.5, etc) in a text layer above my footage?
Some of my composition layers plays at normal (X1) speed but others were time remapped or time stretched.

You can do it with expressions on the time remapped layers: create an empty text layer ctrl/cmdalt/optshiftt. Alt-click the Source Text stopwatch, and use an expression like:
var s = thisComp.layer("some layer").timeRemap.speed;
"X" + Math.round(s * 10)/10 //limits the result to one decimal place

The time-stretched layers are more tricky. The stretch property isn't accessible to expressions, but what you can do is use the sourceTime() function. This gets the time of the source footage. If your layers start at the beginning of the source then this expression would work:
var s = thisComp.layer("some layer").sourceTime()/time;
"X" + Math.round(s * 10)/10 //limits the result to one decimal place

if the layer source doesn't start at the beginning of the comp then you'd have to do some extra maths, like subtracting the in-point, or to make it easier you could pre-comp the source layer with the text overlay and make sure the precomp has the source footage starting at the beginning of the comp.


text:
AE Expressions question - why isn't my code working?
I can't figure out why I'm getting the error... Any ideas?! I tried adding "var" at the beginning of the first line, but that didn't work. Not sure what to try now! Help anyone?
Below is my code. The error reads: "object of type Layer found where a number, array or property is needed."
timeOffset=thisComp.layer("Mograph Control").effect("timeOffset(frames)")("Slider")/24;
myIndex=thisComp.layer("DotMaster")-index;

seedRandom=(index, timeless=false);
randomTimeAmount=thisComp.layer("Mograph Control").effect("randomTime(frames)")("Slider")/24;
randomActualAmount=random(-randomTimeAmount, randomTimeAmount);

baseTime+(myIndex*timeOffset)+randomActualAmount;

Typo on line 2. It should be thisComp.layer("DotMaster").index not -index.
Also, while it's valid, the first parameter to the random function on second last line -randomTimeAmount makes me nervous. I'd recommend changing it to 0-randomTimeAmount. It's more explicit, and less prone to accidental typos.


text:
How to defeat the display info overlay on the HDMI output of the Canon XA25 including the status indicator?
How to defeat the display info overlay on the HDMI output of the Canon XA25 including the status indicator.
An IT/AV colleague of mine needs to send the HDMI output of a Canon XA25 for streaming but can not get a completely clear video source void of the display overlay. He was able to shutdown everything else but the status light.
Actually two questions.
1) is it possible?
2) if so, how?
Please advise.

The only thing I can find about it is to set the Output OnScreen Displays to Off in the settings.  If that isn't doing it, then I'm not sure that it is possible.

many thanks for responding. I am giving you a point for trying while waiting for my colleague to verify.

Bad news, my colleague's Canon XA25 was stolen from a locked closet early this week. I will have to suspend this question until he replaces the camera. My apologies.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Tool to transcode Canon PF24 MTS files to native 24p?
Many Canon AVCHD camcorders record 24fps in a format they call PF24, which essentially disguises the 24 fps in a 60i stream by applying 3:2 pulldown.
Unfortunately they do this so well that to my knowledge editors can't detect it automatically and apply the reverse transformation. I have verified that this is true for Sony Vegas Pro 10 on Windows and FCPX on OS X, which treat these files as regular 60i material. When these clips are added to a 24p timeline they get the regular deinterlacing treatment, which looks awful.
Are there any tools (command line preferred) that can take a .MTS file with PF24 material and perform the inverse telecine process to convert to native 24p with minimal quality loss?

The usual tool recommended for this is JES Deinterlacer, which apparently has an adaptive method of finding and removing the 'smear' frames. I haven't used it myself.
The reason this is an issue is that the field cadence used for PF24 is (stupidly, IMO) different from the typical telecine cadence, which is what most 'inverse telecine' algos detect and remove. So applying standard inverse telecine just adds another layer of mess-up to the video.

Thanks for your answer, I will give it a try, though unfortunately it seems this tool does not read .mts files but QuickTime files, which will add an additional step to the process. But if it works well, I guess I'll live with it!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Converting DVD to still images
I have a DVD. Its basically an hour long video that is just a collection of photos that rotate to a new photo every 5 seconds or so. What I am looking for is a program that will convert the entire movie into a collection of jpegs or TIF files. If it converted every frame of the video into an image, that is fine, but preferably I'd like it to detect when the image changes and then capture the image.
I've seen many programs, like VLC that will capture a single image, but I'm looking for something that is more automated. Anyone have any suggestions?

ffmpeg -r 0.25 -i video.mpg -f image2 %05d.png

ffmpeg invoke the program
-r 0.25  force the frame rate of
-i video.mpg  your input file
-f image2 %05d.png  force the format of  the output file
From the ffmpeg site:

FFmpeg is the leading multimedia framework, able to decode, encode,
  transcode, mux, demux, stream, filter and play pretty much anything
  that humans and machines have created. It supports the most obscure
  ancient formats up to the cutting edge. No matter if they were
  designed by some standards committee, the community or a corporation.
  It contains libavcodec, libavutil, libavformat, libavdevice,
  libswscale and libswresample which can be used by applications. As
  well as ffmpeg, ffserver, ffplay and ffprobe which can be used by end
  users for transcoding, streaming and playing

Can you provide a little bit more information, please? :)

There are many programs that will do the job for you. Most media converter programs are capable of doing it. Personally I use Adobe Media Encoder, but if you don't want to spend any money, a free one will work just as well.
I found this one: Video-AVI to GIF/JPG converter
It says that you can specify how many frames per second you want. This means that if it changes picture exactly every 5 seconds, you can set it to capture every 120. frame. You take the fps and multiply it by the number of seconds. 24x5 = 120. Thus, it will capture a frame every 5th second. (Be aware that it can be for example 30 fps if you're using the NTSC standard.)
It should do exactly the job you need to be done!
Leave me a comment if it works for you or not!
EDIT: Do you have the movie in a .AVI file? If you don't, tell me, and I'll explain how you can rip it. (You probably know it already.)

in this context, I interpret 120fps to mean 120 frame captures per second. In the case of 5 second intervals, you want 1/120 fps (1 screen cap for every 120 frames). Note that NTSC DVD is not exactly 24fps, so there will be a time differential which increases as with playback time.

@horatio Yes, you're probably right.


text:
Converting a Adobe Premiere CS6 project to a CS5 one
I run the old CS 5 version of Adobe Premiere but my friend just got the newer CS 6 version.
Now she's handing over a project on to me. So I have to turn her project files into files I can continue working in.
The problem is that Premiere's own built-in conversion process did not quite do it. I ended up with a faulty project where the project window is actually blank, even though the files are clearly there (they show up in the timeline). Also, it is still possible to play back the timeline - it's just that I can't actually do much editing with the project window being as it is.
This leads me to my question: Is there a better and simpler way to do the conversion from a CS 6 file to a CS 5 one yet? Are there any good workarounds I have not thought of (that aren't "render every single track individually and go from there") or anything else I can do?

It seems that I have solved my problem.
All I had to do was to import the CS6 project file into a brand new CS5 project. That did it for me.

Since PrPro project file is an XML document, you can open it up in any script editor (e.g. in Adobe ExtendScript Toolkit) or just text editor, find Version="25" in the fourth row and replace it with Version="24":

<Project ObjectRef="1"/>

<Project ObjectID="1" ClassID="62ad66dd-0dcd-42da-a660-6d8fbde94876" Version="24">

Although in most cases this works just fine and much better than exporting to FCP XML or whatever, bear in mind: no warranty, everything is at your own peril.


text:
Identify H.265 from the OSX Command Line?
Can anyone suggest a way to tell the difference, from the OSX command line, between .mkv files encoded with H.265 from those encoded with H.264?
Plex H.265 streams viewed from some devices (e.g. LG net-enabled TVs) stall frequently, probably due to the lack of H.265 decoding hardware.
I'd rather not have to re-encode all of the MKVs in my video library, so I'd like to be able to process only the H.265 files.

Install mediainfo via homebrew

You can use ffprobe for this
ffprobe file.mkv -show_entries stream=codec_name -select_streams v:0 -of compact=p=0:nk=1 -v 0

For H.265/HEVC, this will print hevc; for H.264, h264 .

Works perfectly!  Thank you Gyan!


text:
Audio Not Playing on Imported Video Files
I a currently editing a video and imported a .avi movie into my After Effects project. I went to check the RAM preview, but there was no sound. I checked the audio preview and there still was no audio. I checked the waveform and it showed a straight lines, showing that there was no audio being produced from the video.
I checked the video to see if there was sound playing and I determined there was. I also have another .avi file in the project and it plays audio with no problem.
Please help! Thanks in advance!
Update: It works for some reason now... but now my characters are talking really fast and the video is going too fast! Help!!!
Fixed it! Thanks for the help!


text:
What does it mean to "check a waveform monitor to make sure that my highlights weren't clipping too much"?
In this article Roger Deakins talks about how he would "check a waveform monitor to make sure that my highlights weren't clipping too much". What does he mean by this?

I think this is off topic here. Waveform monitors are used for videography, histograms are used for photography(typically), and they are not the same thing.

You can read some about the debate on waveform vs histograms here: http://reduser.net/forum/showthread.php?63751-waveform-vs-histogram/page2

A waveform monitor is used for video rather than still images. A modern WM has has many functions, but the one he is referring to is the equivalent of the ability to detect peak signal levels using a still image histogram. Wikipedia - Waveform Monitor

In a single still image you either have never exceeded maximum level (no pixels at max value) or you have in a variable number of cases. While the usual aim is to have no pixels which are "clipping" you can have a small number do so across the while image with limited loss of quality. Too many in one area and you get obvious flat spots.
In a video signal typically 24 frames a second are viewed and the occasional frame with a small percentage of "maxed out" pixels may be aesthetically acceptable (depending on how purist you are). Hence he says "weren't clipping too much" raher than "weren't clipping". ie he wanted to ensure that the signal had not pushed further into highlight clipping than was deemed acceptable.

FWIW- gross highlight clipping is sometimes acceptable or even designed in as part of the intended image in still and in video photography. A favourite example of mine in "video" is in "The Lord of the Rings" scene in Meduseld, "Hall of the kings of Rohan" in the village of Edoras. The hall is very rak and light strems in from a large open doorway. The camera points, as it never normally would, into the light and exposure is for the characters with the light behind them. As the characters cross to and fro the area behind them washes out completely and to a variable extent as the light streams across the floor. The cameraman knew exactly what he was doing - but a waveform monitor would have done him no good at all - by all normal standards the image was junk.


text:
How many GB or TB is 1 hour of raw uncompressed Ultra HD film?
I was looking on wikipedia but couldn't find any definitive answer.
I think it's because it depends on how many bits is the color pallete and frames per second.
Please, could somebody help me make a rough estimate how much GB or TB would be a standard 24fps? or 30fps? (I am not sure which is the standard frame rate for UHD movies) Ultra HD movie (3840x2160) with the length of 1 hour.
I want to know the uncompressed raw size of the movie file after exporting from Adobe Premiere
I am not sure what is the standard 8 or 12 bit or some other? So, I will be thankful for your advice.

There are some storage calculators: AJA DataCalc, Video Space Calculator. Nothing complex, but keep also in mind that actual required storage size will be more than raw disk size due formatting, RAID levels etc.

Thanks but here is http://www.digitalrebellion.com/webapps/video_calc.html only Redcode36 raw which gives me 126 GB. But that is already compressed. BTw. there is I think 42 which is compressed a little less, but still compressed. Any advicce where can I found a calculator that have uncompressed 4K option. On that site is 1080 maximum except redcode.

Try DataCalc: 1 hour/4K/uncompressed/10 bit + 2ch audio = 3,62 TB.

A 'base' value is ~33 GB per minute for 8-bit RGB at 24fps. Multiply by 1.25 for 30fps, and/or by 1.5 for 12 bits/pixel, or 1.25 for 10 bits/px.
3840x2160 = 8294400 pixels per plane
   x 3 for RGB = 24883200 px per frame
     x 24 fps = 597196800 px per sec
       x 60 sec = 3.5831808 x 10^10 px per hour
         x 8 bits per pixel, / 8 bits per byte = 3.6 x 10^10 bytes / hour
So, roughly 33 GB per minute for 8-bit 24 fps

according to this it is 1,6TB and not 33GB http://web.forret.com/tools/video_fps.asp?width=3840&height=2160&fps=24&interlace=on&space=rgb444&depth=12

@Derfder: You selected 12-bits per color channel, rather than 8. You also selected interlaced, which halves it. Though he forgot that there are 3600 seconds in an hour, not 60; that's why his calculations are off. He's computed 33GB per minute.

Heh, this pops up again a year later. And yes, I slipped and computed the per minute size -- multiply by 60 to get the hourly rate.


text:
What are people using to connect SSD drives from a camera to Thunderbolt or Firewire?
We're shooting on a Blackmagic Cinema Camera, and at the moment are using the guts of a little portable drive enclosure as our cradle for transferring to our Macs via Firewire 800. It's got a very guerrilla vibe to it, but it's not exactly what I want to see when I'm transferring irreplaceable footage.
I've looked around, but there doesn't seem to be any purpose built SSD cradle for Firewire 800 or Thunderbolt (our editing machines are being replaced by Thunderbolt-only ones), only USB3. Has anyone got any suggestions?

HighPoint RocketStor RS5212 is a Thunderbolt Dock that will accept two hard drives or SSDs.
I would not use FireWire for SSDs, unless you don't have USB 3.0 and you're on a budget. USB 3.0 is often fast enough to get the maximum out of your SSD, FireWire not.

Firewire 800 is for the older machines that don't have thunderbolt. They're rusted-on mac users here, so no USB 3.0.

Oh well in that case ... :-)

Well, seeing as you are already using Black Magic stuff, you could always use the Black Magic Multi-Dock.  It supports 4 SSDs and Thunderbolt.  The Black Magic HyperDeck Studio Pro is another option.  It has thunderbolt connectivity and accepts two SSDs and can even handle the recording for you as well if you feed a line in to it.

Close, but probably overkill. Maybe the hyperdeck shuttle might be the go, but I'm hoping for something in between Jason's answer and yours.

@stib - I don't think the hyperdeck shuttle connects to a computer.  You'd want the Multi-Dock if you are looking specifically to transfer off SSDs that you recorded to.

I use a seagate thunderbolt adapter.  It works.  It's portable.  It's cheap.

Close, but it's still kinda hacky, it's not that different to what we're using at the moment.


text:
After Effects set keyframe value with slider and expression but interpolation with graph editor
In After Effects, I want to animate an object from a position A = (960, 540), being the center of my 1920x1080 composition, to a position B = (960 - offset, 540) to the left, where offset is a positive number. My composition will be used as Motion Graphics template, so this offset needs to be adjustable with a Slider Control so that users can tweak the amount of movement.
In this question, a method is shown where a slider can be used to interpolate between two positions. However, I want to have the temporal interpolation to be predefined, and it is more complicated than the simple linear or ease interpolation that expressions allow for.
Thus, I want to be able to set the keyframe values with the slider, but I want the keyframe interpolation to be done with the graph editor. How can I make this work?

Use the values of the keyframes as the driver for a linear expression, and scale them with the slider:
const firstKF = thisProperty.key(1); //which KeyFrames to use as the driver
const lastKF = thisProperty.key(2); // NB you could use multiple keyframes with this expression
const initialValue = [960, 540]; // the start pos—could also use [thisComp.width, thisComp.height]/2
const offsetAmt = thisLayer.effect("offset slider")("Slider"); //pickwhip the slider control here
const finalValue = initialValue + [offsetAmt, 0];

linear(value, firstKF, lastKF, initialValue, finalValue)

This will scale the original motion as you've keyframed it to match the motion with the offset applied.


text:
Bad quality encodes to Prores4444 with alpha from ffmpeg
EDIT: This bug has been fixed. If you're experiencing the problem below, try updating ffmpeg
I need to supply video with alpha as a prores4444 encoded file. I've been trying to use ffmpeg, but for once it seems to be letting me down (I know, gobsmacked!).
I'm using the prores_ks codec and following the intructions on the man page this is my command, testing on a QTRLE encoded file with 8-bit RGBA:
ffmpeg -i '.\alpha test.mov'  -c:v prores_ks -profile:v 4 -quant_mat 'hq' -pix_fmt yuva444p10le 'prorestest2.mov'

The output is:
ffmpeg version N-82664-g801b5c1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 41.101 / 55. 41.101
  libavcodec     57. 66.108 / 57. 66.108
  libavformat    57. 58.101 / 57. 58.101
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 67.100 /  6. 67.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.\alpha test.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2016-12-12T03:17:14.000000Z
  Duration: 00:00:10.00, start: 0.000000, bitrate: 406275 kb/s
    Stream #0:0(eng): Video: qtrle (rle  / 0x20656C72), bgra(progressive), 1920x1080, 405436 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2016-12-12T03:17:14.000000Z
      handler_name    : Apple Alias Data Handler
      encoder         : Animation
      timecode        : 00:00:00:00
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2016-12-12T03:17:14.000000Z
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:00:00
File 'prorestest2.mov' already exists. Overwrite ? [y/N] y
Output #0, mov, to 'prorestest2.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    encoder         : Lavf57.58.101
    Stream #0:0(eng): Video: prores (prores_ks) (ap4h / 0x68347061), yuva444p10le, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2016-12-12T03:17:14.000000Z
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:00:00
      encoder         : Lavc57.66.108 prores_ks
Stream mapping:
  Stream #0:0 -> #0:0 (qtrle (native) -> prores (prores_ks))
Press [q] to stop, [?] for help
frame=  250 fps=5.5 q=-0.0 Lsize=  186122kB time=00:00:09.96 bitrate=153082.2kbits/s speed=0.218x
video:186119kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001761%

It all looks good, unitl you see the results. Here is a frame from the original, exported as a png (using djv):

…and here is the prores encoded version. There's blockiness and ringing artefacts that are most apparent in areas that have partial alpha:

It's most apparent if you look at the colour channels individually:

I've tried the different -quant_mat settings (in the docs it looks like there should be 6, but if I try -quant_mat 5 I get an out of range error. I also tried using the string version, i.e. -quant_mat 'hq'. Another thing I tried was changing the number of alpha bits using -alpha_bits 16 and -alpha_bits 8. The problem was worse with 16 bit alpha.
So is it something I'm doing or is it the codec not working properly?

Can you provide one frame from the original as a PNG?

I've edited the question with pngs from the movie instead of screenshots. The blockiness is harder to see against white.

@stib Did you also test prores_aw? It's another ProRes encoder. I didn't try or look at the source code: got to install drywall instead...

oh that's easy: cd ~/drywall; ./configure && make && sudo make install

Gave it a try, no alpha. ffmpeg -i '.\alpha test.mov'  -c:v prores_aw -profile:v 3 -pix_fmt yuva444p10le 'prores_aw-test.mov'  →  Incompatible pixel format 'yuva444p10le' for codec 'prores_aw', auto-selecting format 'yuv422p10le'

Looks to be an encoder deficit, probably due to the rapid transition in the alpha from 1 to 0 in the border regions. Outputting to VP9 with alpha produces a clean result as does outputting to prores without alpha. Outputting with an uniform alpha i.e. whole alpha plane reset to 0 or 0.5 or 1 also produces a clean result. It's not a scaler issue as rawvideo with yuva444p10le also produces clean result.
Looking at the source code, I see this line, which may be relevant:
// todo alpha quantisation for high quants

Should I raise a bug report, or is it redundant, given that it's already a 'todo' item

Raise a bug report, as that may raise priority.

Link to bug report.

@stib The bug report is marked as fixed. Can you verify?

Thanks for the heads-up. It appears to be working, but I haven't fully tested it yet.

Seems to be fixed now.


text:
After Effects: Linear Expression - going from value 1 to another value and then back to value 1
Essentially I am trying to get a position expression on a video layer (two dimensional) to go from 640, 360 (middle of the screen) to another value defined by an expression control and then back to 640, 360. To define the duration of this effect I have used placeholder checkboxes (start, middle and end) to create drag-able keyframes that mark the start and end points. I know this is a strange way to define the start and end points of the effect, but it works well for what I'm doing.
Current code:
start = effect("Start (use keyframe)")("Checkbox");
end = effect("End (use keyframe)")("Checkbox");
mid = effect("Middle (use keyframe)")("Checkbox");

if (start.numKeys > 0){
start1 = start.key(start.numKeys).time
}
else{
start1 = 0;
}

if (end.numKeys > 0){
end1 = end.key(end.numKeys).time;
}
else{
end1 = 0;
}

if (mid.numKeys > 0){
mid1 = mid.key(mid.numKeys).time;
}
else{
mid1 = 0;
}

[linear(time, start1, mid1, 640, effect("End Position")("Point")[0]), linear(time, start1, mid1, 360, effect("End Position")("Point")[1])];

[linear(time, mid1, end1, effect("End Position")("Point")[0], 640), linear(time, mid1, end1, effect("End Position")("Point")[1], 360)];

Note: the code has worked fine without the mid variable and the second linear expression, however it won't go from 640, 360 to x, y and then back to 640, 360. It will only go from 640, 360 to x, y and then stop.
I have also tried using the loopOut("pingpong") function but it breaks the entire expression.

Is there any reason why you're using this approach? There are far easier ways to do it (see below).
But anyway the problem is that the second last and last line both return values, but an expression can only return one set of values, and so it only returns the last one. I think this points to a misunderstanding of how expressions work. An expression is calculated every frame*; it has no memory of what happened previously or what will happen later. So your expression has to return one result for any particular point in time, and the result is calculated from the value it returns at that time.
You need some flow control there. Use an if/else statement to replace the last two lines:
if (time < mid1){
    [linear(time, start1, mid1, 640, effect("End Position")("Point")[0]), linear(time, start1, mid1, 360, effect("End Position")("Point")[1])];
}else{
    [linear(time, mid1, end1, effect("End Position")("Point")[0], 640), linear(time, mid1, end1, effect("End Position")("Point")[1], 360)];
}

But you can make your life a lot easier. Why not have a slider effect that has a 0-100 range that defines what percentage of the distance along the path the object should be at. Then you just keyframe it to ramp from 0-100 and back again. The whole expression would just be:
rampCtrl=effect("the Effect That Controls How Far Along It is")("slider");
linear(rampCtrl, 0, 100, [640,360], effect("End Position")("Point"))

Note that you don't have to split it into two parts, the linear() function can deal with vectors as the value1 and value2 inputs.

*(you can think of expressions as being calculated every frame, but they are actually calcualted every time the comp is rendered. If you have motion blur on, the frame is composed of numerous time slices at sub-frame points in time, blended together, and the expression is calculated for each of those time slices. Generally you can ignore this, but it does impact rendering speed if your calcualtion is very time consuming, and it can cause weirdness if your expression returns unexpected results between frames, e.g. when looping back to an original value between two frames)

Thanks so much for the help. I have only been messing with expressions for a week or so, but now I have a better understanding of how the expression logic works.
I'll also try using your version and see if it makes it any easier for me.


text:
How do youtube professionals record audio for their video?
If some professional has a video, and they want to do a voiceover for it, how do they do it?
Do they first remove unwanted clips from video and then record audio using audacity while seeing the video as it is running?

If you are referring to tutorials or commentary then yes, you would record the original performance (perhaps with computer sound), while thinking of your audience. When I record tutorials for software, I often perform the example while talking, then go back and edit it down to a reasonable length. I remove unwanted sound, then re-voice the finished edit from a script (doesn't have to be fully written, can be bullet points).
This way I can make mistakes in delivery and restart as many times as I like.
Then i lay that recording back over the edited pictures. At this point I may find that I need to make the video longer to accommodate the new voice over. So there is a little bit of give and take. It is quite hard to manage picture lock without sound.

The process you are describing is called ADR (automated dialog replacement) or dubbing - after picture is locked, lines are recorded separately in a controlled environment and mixed to match the appropriate sonic perspective the required. If you were to adr all of the lines in a vid, you would also then add in a room tone/ambience to give it a soundbed to live in. If you are replacing a few lines that cannot be salvaged, you would then mix in to match the remaining lines and mix the adr'd lines within the ambience of that scene. Most hollywood and large productions are 75-85% ADR - shooting conditions/locations or props etc create a ton of sonic pollution, so most on location sound recordists do their best to capture what will be the reference track once the project goes to post production.
There are a few common recording techniques - productions that go through the trouble of ADR are usually a higher production value than Audacity, most likely using ProTools or other industry standard DAWs.
The two basic ways to record ADR would be to loop the video/original lines to be replaced in your recording program, so the talent can watch and deliver multiple takes to match the on screen performance. Another method, is to have the talent parrot their performance; you start recording, the actor hears the performance, and then just mimmics right after. I find the second easier because youre not asking someone to anticipate the video they want to match, they can just focus on trying to mimmic their own earlier performance - let the recording engineer focus on if the audio syncs with picture, let the actor focus on delivery.


text:
Editing with music: what workflow produces the best results?
What would produce the best result, in terms of quality?
So I like to go out and take some random dynamic, smooth, clips of places around my neighborhood with my Flycam, but I'm wondering what would be the best workflow;
find and edit out the unusable parts of the footage (like the heads and tails), then find a nice, ambient, relaxed type music, and add it in, fine tuning the clips so it matches the music (cuts on the beat, etc).
or
Find the music first, then edit clips according to the music so it matches.
Which do you think would be faster, easier, and produce a better result? What are some pros and cons of each?
I use Premiere.

Sooner or later you have to look at your video and make choices.  A term of the art is to "create video selects".  And the organizational technique used in Premiere Pro is called a "stacked timeline" or a "pancake timeline"(with more details explained here).  But to ease into these (and answer your question)...
You absolutely need to go through your footage to find the good stuff.  Don't think of it as "editing out the unusable parts", but rather "find, mark, and label the good parts".  Labeling is key because that's how you are going to find the good stuff later.  Mark in and out points to quickly get rid of useless "flying to" and "flying from" parts of your footage.
Quoting from 1, "By stacking 2 timelines on top of each other…an editor can now access an entire reel of selects in chronological order (or whatever order desired) and instantly drop them into the active timeline below. To accomplish this layout…first open both timelines by clicking on them in the Project Panel. Drag the Selects timeline tab and hover over the top quarter of the Master timeline. Once it turns a purple color, release the tab and you’re in Pancake Land! By not having to bounce between tabbed timelines and using copy/paste…the process of analyzing and deciding which shot makes it into the cut is streamlined and intuitive. You can playback the Selects timeline in the program panel or hit the “match frame” keyboard shortcut and play it back in the source panel. Then just insert edit or drag-and-drop the shots you want into the Main timeline. Another very nice feature of this edit workflow is that the shots you pull from the Selects (top) timeline remain in their original position and are duplicated into the Main (bottom) timeline."
Another thing to keep in mind is that the construction and ordering of the selects timeline is up to you.  You can order your footage chronologically, by subject, by altitude, whatever your labeling system and sorting system might be.  Make metadata work for you!
At this point you probably have an idea of what your true "hero" footage is, and how much time you can fill with the top 95% of your material.  (Or you have an idea how deeply you have to scrape the barrel to create a 2-3 minute video.)  This will give you an idea of to find the right matching music--both thematically and in length.  And it will give you an idea whether you are better off to start cutting the video to the audio, or vice-versa.
Usually the best results are those that make the best elements speak best, both by themselves and together in ensemble.  If something sticks out like a sore thumb, take it out.  If you realize there's a shot that would make the video complete and you don't have it, maybe (in your case) you can rig up the flycam and get it.  Most video editors don't have that luxury because the footage is a given and they cannot just ask for more.
As your video converges with the audio, you will get a sense of just how important it is to align visual and audio "beats".  Keep working until every visual moment is reinforced by the audio, and vice-versa.

A screenshot would make the technique you're describing much clearer.

I'd probably go shoot a lot of footage and then find sounds or music that incorporate nicely with some of the shots you took then get rid of the rest the can't be incorporated.


text:
Can you measure the width of a character in an AE expression?
I have a type effect that requires a couple of layers, one with the type, and another moving behind the letters as they appear (simulating the little text bubbles you get when typing on an iPhone). It's very tedious animating the position of the bottom layer to match the text, so I'm wondering if it's possible to use any javascript tools to measure the characters and drive the position value.
Currently I have an expression driving the opacity like this, to automatically turn the background off for spaces:
theOffset=thisComp.layer(1).text.animator("Animator 1").selector("Range Selector 1").offset;
if (thisComp.layer(1).text.sourceText.substr(theOffset, 1) == " " ){0} else {100}

and another that folows the text animator range selector so that I can retime if I want without having to nudge keyframes till doomsday:
theOffset=thisComp.layer(1).text.animator("Animator 1").selector("Range Selector 1").offset;
try {
    transform.position.key(theOffset + 1).value
}
catch(error){[-10000,0]}//effectively hide it on errors (like the index going out of bounds)

…but this relies on me going through and creating keyframes to match the spacing of all the letters in the text, and frankly I'd rather be doing something else with the time that takes. so I'm trying to find a string method that I could use like this:
xOffset = thisComp.layer(1).text.sourceText.substr(1, theOffset).getTextWidth()

but getTextWidth obviously isn't a valid method. Is there a JS method that can get the size of a string on screen? There seems to be several solutions for this when the client is a web browser, but I can't find any that work for AE expressions.

As you are asking for JavaScript, I'm assuming you are using ExtendScript and not the limited After Effects expressions you apply directly to layers?

No, I'm talking expressions. A lot of undocumented javascript creeps into expressions; for example many of the javascript string methods are there, like regex and so on.

Looks like Adobe have come to the party on this one. A new update as of After Effects CC 2014.2 (13.2) has a sourceRectAtTime() method that does exactly what I'm wanting. To quote their blurb:

You can now read the rectangle bounds of a layer’s content, including
  the corrected bounds of a text layer, for any time in a composition.
  The sourceRectAtTime() method from the After Effects scripting API is
  now accessible in expressions as a read-only layer object attribute.

Yee-hah!

Oh cool finally. Thanks for updating the question with this info.

So you want the width of the whole text object no single characters?
In that case you could use this: http://motionboutique.com/text-bounds-expresssion-580/
A tutorial plus sample project on how to get the bounding box of a text layer.
In case the link dies, here is the complete expression they use to determine the bounding box.
step = 1.0; // higher values speed things up (2 means two times faster) but reduce precision
L = thisComp.layer("MyTextLayer"); // text layer whose size must be evaluated

w = thisComp.width;
h = thisComp.height;
halfW = w / 2;
halfH = h / 2;
halfStep = step / 2;

left = w;
right = 0;
top = h;
bottom = 0;

// find left
found = false;
for (x = 0; !found && x < w; x+=step)
{
    if (L.sampleImage([x,halfH], [halfStep,halfH], true)[3] > 0)
    {
        found = true;
        if (x < left)
            left = x;
    }
}
// find right
found = false;
for (x = w; !found && x >= 0; x-=step)
{
    if (L.sampleImage([x,halfH], [halfStep,halfH], true)[3] > 0)
    {
        found = true;
        if (x > right)
            right = x;
    }
}
// find top
found = false;
for (y = 0; !found && y < h; y+=step)
{
    if (L.sampleImage([halfW,y], [halfW,halfStep], true)[3] > 0)
    {
        found = true;
        if (y < top)
            top = y;
    }
}
// find bottom
found = false;
for (y = h; !found && y >= 0; y-=step)
{
    if (L.sampleImage([halfW,y], [halfW,halfStep], true)[3] > 0)
    {
        found = true;
        if (y > bottom)
            bottom = y;
    }
}

/*"Size of text\n" + (right-left) + "x" + (bottom-top)*/
left + "," + top + "," + (right-left) + "," + (bottom-top)

Thanks for that. This looks like it samples the pixels to see if there's any opacity and determines the size that way. Good thinking outside the square. I'll have to test to see if it works on animated text.

Expressions evaluate per frame so animation shouldn't be any issue. It will just slow your rendertime down a little as the sampleImage function is quite CPU heavy.

Expressions evaluate each time the frame is rendered. If you have motion blur on, the layer can get rendered dozens of time per-frame. So an expression that slows down the playback a little while you're working on it can suddenly become a beast when you turn on MB in the render.


text:
Need to reach a low data rate of about 1.5 - 2 MB/min (200 - 267 kb/s)
I am working on a project involving live streaming. My goal is to reach a data rate of no more than 200 - 267 kb/s when streaming. Is it possible to reach such low rate while keeping an acceptable fps and resolution? If so what would the fps and frame resolution?
Also, what compression method will I need to use?
Thank you.

So that's 205 to 273kbit/s.  Is that including audio?  Opus or HE-AAC can sound good for speech at 32kbit/s, and Opus is acceptable for speech at 10kb/s.

Yes including audio.

Voice?  Or music?

Voice. It is a video captured from a phone's camera

How much CPU power do you have for encoding.  Realtime on a phone with an ARM CPU?  Or realtime on a 4-core hyperthreaded i7 with AVX2, at 3GHz?

Oh, and do you need to distribute an app that uses this?  If so, you'll probably want to use a codec that isn't encumbered with patent royalties.  (so x264 and x265 might be ruled out.)  Then vp9 would be probably the best choice.

For audio, Opus is not patent-encumbered, and it has a special speech-specific portion it can use at low bitrates.  And it sounds at least as good as AAC, according to listening tests.  And it's optimized for low latency, which is important for 2-way chat.  Irrelevant for streaming to an audience, but not a downside.

summary: yes, depending on content, with a good encoder h.264 can look pretty good at 240kib/s video bitrate, at NTSC 720x480p30.
With modern codecs, you don't need to downscale the rez too far.  If there isn't a lot of noise in your source, you're just putting the same complexity into fewer pixels.  You shouldn't encode 1080p at 270kb/s, though :P.  There is overhead to having more macroblocks, and diluting the complexity across too many pixels probably means worse results from quantizing the DCT coefficients.  Lower resolution lets you turn up the CPU-usage knob on your codec while still being realtime, though.
For a test encode, I have a lossless source of the sintel trailer.  (3D animation with fades between scenes, and significant amount of changeless).  So it's probably actually a really bad test case...
ffmpeg -i sintel.y4m -pix_fmt yuv420p -vf crop=1920:816:0:132,scale=640:-1 -ssim 1 -psnr -tune animation -preset slow -b:v 270k 640x272.x264.270k.mkv

That does quite well, with an average QP of 18.03(I) / 23.44(P) / 24.93(B).  SSIM Mean Y:0.9852979, PSNR Global:44.801 at 231.37 kib/s.  (a still section at the end leaves x264 undershooting the target bitrate for one-pass).  I left psy optimizations enabled, so x264 is trying to do what looks best, not what scores highest on SSIM or PSNR.  Just useful as a ballpark figure.
I have a live-action source that's not too noisy.  I picked a portion that just has one actor moving around on stage, everyone else standing still, and no camera motion.  So it might be similar in compressibility to a someone talking while looking at a webcam, in front of a mostly-constant background.  (stuff like this matters a LOT for compressibility).  About 1/3 of the screen is black background.  (so black the encoder knows you can't see anything, and hardly spends any bits, I assume.)
ffmpeg -ss 2410 -t 30 -i vid.yadif3.1,mcdeint3.1.10.ffvhuff.mkv -c:a opus -b:a 32k -pix_fmt yuv420p -r 30 -vf framestep=2 -ssim 1 -psnr  -preset slow -b:v 240k  2410+30.slow.opus.230k.mkv

Source is 60p deinterlace output, from NTSC DV or something.  Anyway, with those ffmpeg options, it stays as 720x480@30p (with non-square pixels, display aspect ratio = 16:9).  Output looks pretty darn good considering the bitrate, and the singing sounds good, but has some artifacts.  (audio source is not noisy, and there's no accompaniment, just soloist + chorus.)
frame=  900 fps= 35 q=-1.0 LPSNR=Y:inf U:inf V:inf *:inf size=     990kB time=00:00:30.01 bitrate= 270.3kbits/s
video:854kB audio:120kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.635424%
[libx264 @ 0x2400360] frame I:4     Avg QP:22.63  size: 23294  PSNR Mean Y:44.02 U:48.68 V:47.86 Avg:45.00 Global:42.71
[libx264 @ 0x2400360] frame P:239   Avg QP:22.23  size:  2492  PSNR Mean Y:43.64 U:48.67 V:47.52 Avg:44.67 Global:44.47
[libx264 @ 0x2400360] frame B:657   Avg QP:24.97  size:   282  PSNR Mean Y:43.38 U:48.52 V:47.37 Avg:44.43 Global:44.24
[libx264 @ 0x2400360] consecutive B-frames:  0.6%  0.0% 19.0% 80.4%
[libx264 @ 0x2400360] mb I  I16..4: 27.0% 58.0% 15.0%
[libx264 @ 0x2400360] mb P  I16..4:  0.2%  0.4%  0.1%  P16..4: 22.1%  5.1%  6.7%  0.0%  0.0%    skip:65.4%
[libx264 @ 0x2400360] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 12.5%  0.4%  0.1%  direct: 0.1%  skip:87.0%  L0:23.6% L1:74.4% BI: 2.1%
[libx264 @ 0x2400360] final ratefactor: 22.98
[libx264 @ 0x2400360] 8x8 transform intra:59.0% inter:71.2%
[libx264 @ 0x2400360] direct mvs  spatial:99.7% temporal:0.3%
[libx264 @ 0x2400360] coded y,uvDC,uvAC intra: 50.7% 48.1% 24.7% inter: 2.8% 5.1% 0.2%
[libx264 @ 0x2400360] i16 v,h,dc,p: 36% 38%  7% 19%
[libx264 @ 0x2400360] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15%  4% 22%  8% 12% 11% 12%  8%  8%
[libx264 @ 0x2400360] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14%  3%  5% 12% 15% 16% 12% 12% 10%
[libx264 @ 0x2400360] i8c dc,h,v,p: 48% 27% 18%  7%
[libx264 @ 0x2400360] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x2400360] ref P L0: 66.9%  8.4% 14.9%  3.5%  4.6%  1.6%
[libx264 @ 0x2400360] ref B L0: 85.5% 10.8%  2.9%  0.8%
[libx264 @ 0x2400360] ref B L1: 92.3%  7.7%
[libx264 @ 0x2400360] SSIM Mean Y:0.9730952 (15.702db)
[libx264 @ 0x2400360] PSNR Mean Y:43.450 U:48.564 V:47.412 Avg:44.498 Global:44.292 kb/s:232.89

And 35fps on my E6600 (2.4GHz dual core first-gen c2duo) is not bad.  If you're trying to live-stream from a phone, you're going to be much more constrained, though.  You could use lower rez or lower framerate (25 fps, or 24, or 20?)
I was actually surprised at how well x264 did with -preset veryfast.  I guess on this content, even veryfast finds most of the same redundancy to eliminate.
frame=  900 fps= 90 q=-1.0 LPSNR=Y:inf U:inf V:inf *:inf size=     994kB time=00:00:30.01 bitrate= 271.5kbits/s
video:859kB audio:120kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.612045%
[libx264 @ 0x37b6420] frame I:4     Avg QP:21.51  size: 24840  PSNR Mean Y:44.16 U:48.09 V:47.20 Avg:44.99 Global:42.15
[libx264 @ 0x37b6420] frame P:227   Avg QP:21.22  size:  2649  PSNR Mean Y:43.57 U:48.08 V:46.72 Avg:44.50 Global:44.26
[libx264 @ 0x37b6420] frame B:669   Avg QP:22.30  size:   267  PSNR Mean Y:43.32 U:48.04 V:46.67 Avg:44.29 Global:44.02
[libx264 @ 0x37b6420] consecutive B-frames:  0.9%  0.0%  0.0% 99.1%
[libx264 @ 0x37b6420] mb I  I16..4: 24.0% 45.9% 30.1%
[libx264 @ 0x37b6420] mb P  I16..4:  1.4%  2.8%  0.1%  P16..4: 20.9%  4.2%  3.1%  0.0%  0.0%    skip:67.5%
[libx264 @ 0x37b6420] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8:  1.7%  0.6%  0.1%  direct: 2.1%  skip:95.2%  L0:23.9% L1:45.7% BI:30.3%
[libx264 @ 0x37b6420] final ratefactor: 20.78
[libx264 @ 0x37b6420] 8x8 transform intra:60.6% inter:38.4%
[libx264 @ 0x37b6420] coded y,uvDC,uvAC intra: 39.1% 40.2% 10.5% inter: 2.7% 3.1% 0.1%
[libx264 @ 0x37b6420] i16 v,h,dc,p: 73% 11% 13%  3%
[libx264 @ 0x37b6420] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12%  7% 73%  1%  1%  1%  2%  1%  1%
[libx264 @ 0x37b6420] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 13% 14%  5%  8%  9%  8%  6%  6%
[libx264 @ 0x37b6420] i8c dc,h,v,p: 76%  8% 15%  1%
[libx264 @ 0x37b6420] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x37b6420] SSIM Mean Y:0.9737951 (15.816db)
[libx264 @ 0x37b6420] PSNR Mean Y:43.390 U:48.047 V:46.685 Avg:44.343 Global:44.068 kb/s:234.13

bitrate ended up 2kib/s higher, with about the same PSNR, and higher SSIM.
With -tune ssim to disable psychovisual optimizations (don't do this for real use),
veryfast gets: Y-SSIM: 15.891db, PSNR Global:44.294, kb/s:233.26.
slow gets: Y-SSIM: 16.097db, PSNR Global:44.752, kb/s:232.86
So that's what x264 can do with h.264 High@L3.0 profile, at 0.023 bits/pixel/frame.
tested x265:
ffmpeg -ss 2410 -t 30 -i vid.yadif3.1,mcdeint3.1.10.ffvhuff.mkv -c:a opus -b:a 32k -pix_fmt yuv420p -r 30 -vf framestep=2 -ssim 1 -psnr -c:v libx265 -preset slow -b:v 240k -aspect 16:9 x265.2410+30.slow.opus.230k.mkv
ffmpeg version N-68044-gb9dd809 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 14 2015 23:21:08 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-gpl --enable-version3 --enable-nonfree --disable-doc --disable-ffserver --enable-libbluray --enable-libschroedinger --enable-libtheora --enable-libx264 --enable-libx265 --enable-libmp3lame --enable-libopus --enable-libwebp --enable-libvpx --disable-outdev=oss --disable-indev=oss --disable-encoder=vorbis --enable-libvorbis --enable-libfdk-aac --disable-encoder=aac --disable-decoder=jpeg2000 --enable-libvidstab
  libavutil      54. 16.100 / 54. 16.100
  libavcodec     56. 20.100 / 56. 20.100
  libavformat    56. 18.101 / 56. 18.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5.  7.101 /  5.  7.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 'vid.yadif3.1,mcdeint3.1.10.ffvhuff.mkv':
  Metadata:
    ENCODER         : Lavf56.15.102
  Duration: 01:22:11.94, start: 0.000000, bitrate: 95843 kb/s
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv420p, 720x480, SAR 186:157 DAR 279:157, 59.94 fps, 59.94 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc56.14.100 ffvhuff
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
Codec AVOption ssim (Calculate and print SSIM stats.) specified for output file #0 (x265.2410+30.veryfast.opus.230k.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
x265 [info]: HEVC encoder version 1.4+286-a12080554342
x265 [info]: build info [Linux][GCC 4.8.2][64 bit] 8bpp
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
x265 [warning]: --psnr used with AQ on: results will be invalid!
x265 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: WPP streams / frame threads / pool  : 15 / 1 / 2
x265 [info]: CTU size / RQT depth inter / intra  : 32 / 1 / 1
x265 [info]: ME / range / subpel / merge         : hex / 57 / 1 / 2
x265 [info]: Keyframe min / max / scenecut       : 25 / 250 / 40
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb / refs: 1 / 1 / 0 / 1
x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-240 kbps / 1.0 / 0
x265 [info]: tools: rd=2 early-skip deblock sao signhide fast-intra tmvp
Output #0, matroska, to 'x265.2410+30.veryfast.opus.230k.mkv':
  Metadata:
    encoder         : Lavf56.18.101
    Stream #0:0: Video: hevc (libx265), yuv420p, 720x480 [SAR 32:27 DAR 16:9], q=2-31, 240 kb/s, 30 fps, 1k tbn, 30 tbc (default)
    Metadata:
      encoder         : Lavc56.20.100 libx265
    Stream #0:1: Audio: opus (libopus) ([255][255][255][255] / 0xFFFFFFFF), 48000 Hz, stereo, flt, 32 kb/s (default)
    Metadata:
      encoder         : Lavc56.20.100 libopus
Stream mapping:
  Stream #0:0 -> #0:0 (ffvhuff (native) -> hevc (libx265))
  Stream #0:1 -> #0:1 (ac3 (native) -> opus (libopus))
Press [q] to stop, [?] for help
frame=  900 fps= 24 q=0.0 LPSNR=Y:inf U:inf V:inf *:inf size=     998kB time=00:00:30.01 bitrate= 272.4kbits/s
video:861kB audio:120kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: 1.713292%
x265 [info]: frame I:      4, Avg QP:21.87  kb/s: 5097.48   PSNR Mean: Y:43.899 U:48.345 V:47.187  SSIM Mean: 0.968502 (15.017dB)
x265 [info]: frame P:    177, Avg QP:18.74  kb/s: 710.27    PSNR Mean: Y:43.347 U:48.274 V:47.041  SSIM Mean: 0.973469 (15.763dB)
x265 [info]: frame B:    719, Avg QP:20.83  kb/s: 89.99     PSNR Mean: Y:43.113 U:48.231 V:47.010  SSIM Mean: 0.972552 (15.615dB)
x265 [info]: global :    900, Avg QP:20.42  kb/s: 234.24    PSNR Mean: Y:43.163 U:48.240 V:47.017  SSIM Mean: 0.972714 (15.641dB)
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 0.6% 0.0% 0.0% 0.6% 98.9%

(Note that I needed -x265-params ssim=1, because the ffmpeg libx265 interface doesn't pick up a lot of the commandline options.)
    slow: 253.245kbit/s fps=1.7  Y PSNR:44.228 unknown SSIM, forgot to turn it on
veryfast: 244.347kbit/s fps= 24  Y PSNR:43.163 15.641dB SSIM.

perceptually, the x265 veryfast output has less blocking than the x264 slow output.  I think x265 looks better.
x264 and x265 both from the git / hg repos, updated Jan 10th.

Doing a test-encode now with x265.  It's 15 times slower, but should do well at low bitrate.

Amazing. I see you are using ffmpeg and have seen some instructions on how to compile ffmpeg for iOS but couldn't do so successfully.

for iOS?  So you need this to run on a phone?  yeah, don't even think about x265 then.  x264 has some ARM asm optimizations for ARM CPUs with a vector unit, and can prob. run in realtime with low rez.  You'd be trading more battery usage for better video quality, compared to using the hardware h.264 encoder.

check out http://demos.webmproject.org/ios/vp9.  Amusingly, they too chose the Sintel trailer as their source.

Also, you don't need ffmpeg.  It's just a convenient commandline frontend to the encoding library.  You might want some of the various libav libraries to handle muxing your video+audio into a standard container format, instead of reinventing the wheel with either a custom protocol for carrying the bitstreams, or writing your own code for muxing them into mkv.

If you expect people to watch these streams on phones, not just send them from phones to desktops, then h.264 has the advantage of a high installed-base of power-efficient hardware DECODERS to save battery life on the receive end.  I'd recommend h.264 + opus, unless h.264 patents are a problem.  Then VP9.

Yes it will be watched on iOS devices only.

I tried approaching the problem by getting frame samples, compressing them to jpeg with a 0.75 quality but they remain way too large (approx 20kB/frame) which is huge data for a 15fps stream. How could I stream otherwise? Short 4-5sec sequenced h.264 encoded clips?

Sounds like you need to ask on stackoverflow how to do streaming media on iOS.  I'd guess it'd be something like:  Pick a streaming media protocol, find a library for it, and use it.  Find out how to get either raw video to feed through x264, or how to feed camera data through the hardware h.264 encoder, and feed that to your streaming media library.  Same for the audio: If there's built-in iOS support for HE-AAC, using it instead of opus might be an easier first step.  None of this should ever involve jpeg...  Use good standard video formats, don't re-invent MJPEG.


text:
What kind of storage for digital footage?
I've got a bunch of usb external hard drives, but I don't trust them for storing digitised footage. I will have potentially up to 3 TB of footage after digitising. USB can be slow for transferring large files. Is there a faster alternative? and how do I know what I buy is reliable? E.g. is it better to have 3 1 TB disks or 1 3 TB disk? Is it better to go for an internal hard drive in a PC or an external disk drive?

Don't trust any hard drive to be reliable! Always backup your footage, you can not trust any HDD, doesn't matter how reputable the manufacturer is. There are always monday batches. HDDs WILL fail at some point, so ALWAYS make backups.
Bear in mind that you might find a RAID solution nice to use but that's not a real backup, backup drives are disconnected and are not running with your "live" drive, otherwise you might end up with all your drives failing together, including your backups.
I recommend going for at least 2x3TB drives, they have a lot better price per GB than 1TB drives. Though 1TB drives tend to last a tad longer on average but thats not worth the much higher price in my opinion. If you want to invest more for higher product life, don't buy standard desktop drives but instead a workstation or server HDD. For Western Digital (WD) that would be the Red/Black/Purple series. Seagate has a few 24/7 Surveilance HDDs that are also more reliable.
In terms of speed. I'm guessing you are using USB 2.0. An alternative is USB3.0, the speed of that exceeds the read and write speeds of any HDD. If you are a Mac user you also have Thunderbolt in most newer products but external HDD cases for that are a hell lot more expensive than USB 3.0 cases but they have the advantage of daisy chaining, which means you can connect many external drives to one port without a hub if you need multiple drives connected at the same time.
In terms of what is better, external or internal. For HDDs that doesn't really matter anymore in terms of speed, as long as you get a case with a quality controller and dont use USB 2.0 or Firewire. It depends on what suits you better. A case is of course more portable but there are also hot swap cages for backups that are installed like DVD drives.
Choose what you prefer.
And a general advice, never buy a complete solution where you buy a hard drive already enclosed in an external case. You do not know what you get and they are barely cheaper than getting your own case and installing the HDD yourself in a few seconds.

How do you deal with disk fragmentation on the video storage drives? Does moving the files as a group inherit the fragmentation when moving to a new drive, or is it better to move the video files individually so that fragmentation is not inherited?

Personally, I use a 12 TB RAID array composed of 5 3TB drives.  If any one of them fails, I don't lose any data, but if 2 or more fail at the same time, I am up a creak.
Other plans can consist of RAID 6, which allows for 2 drives to fail, but at the cost of two drives worth of storage capacity rather than one (so 5 3TB drives would only give you 9TB of storage rather than 12).
Alternately, some people prefer either RAID 1, where files are stored on two different drives in full or simply drive mirroring where files are kept on two drives manually and one is moved off site.
Historically, I used to use optical media, and I still occasionally use BD-R disks for some specific backup scenarios, however, in general, the expectation is that HDDs should last longer than burnable optical media (though both do degrade over time.)
It ultimately comes down to how much risk you are willing to live with and how much you can afford to spend on backups.  Really complex setups can include things like dual RAID 6 arrays, one kept on site, the other kept off site.
Cloud archive storage is also an option where you pay to have your data massively replicated over diverse geographic regions so that no one disaster can wipe out your data, but this generally has a relatively high cost and has high bandwidth needs as well, rather than being a one time cost.
As for connections, you can use eSATA, USB 3.0 or Thunderbolt for quick connections.  These will all keep up with the speed of most HDDs that you would want to use for archival purposes.  Size wise, smaller drives are likely more stable as they utilize larger size blocks, but you still want to make sure you go for high quality drives that have a focus on data longevity.  Most HDD manufacturers have drives intended for long term backups, though the amount of benefit you get from these drives is somewhat debated as quality of basic model HDDs has risen significantly in recent years compared to the low point.

How do you deal with disk fragmentation on the video storage drives? Does moving the files as a group inherit the fragmentation when moving to a new drive, or is it better to move the video files individually so that fragmentation is not inherited?

@user610620 no, copying files doesn't carry over fragmentation.  You have to worry about new fragmentation a bit if you're removing things from your archive drive, but fragmentation is a storage block layer thing, not a file thing.  Also, if you are mostly worried about archival storage, fragmentation is not really an issue even if present.

Thanks for saying that copying individual files don't carry over fragmentation. Can you say the same for cloning fragmented hard drives?

@user610620 if you do a block level copy the fragmentation will remain, but I'm not sure why you'd ever want to do a block level copy when moving a project from working drives to archives.  It would be horribly space inefficient.  I've only ever seen people copy the folders they need to move.

I just searched what "block level copy" means, and still don't know how anyone would implement that in Windows. So yes, I must be talking about "copying folders" then when I say cutting and pasting individual files.

@user610620 block level copies are used in image backups on windows where you are backing up the entire drive rather than specific projects.  That doesn't make sense in the context of video projects since you want to move files and folders around rather than disk images.  Only disk images maintain fragmentation because fragmentation is simply the fact that a file may be written to multiple spots on a physical disk, based on where there is room.  You might get different fragmentation after a copy if the drive you are copying to doesn't have contiguous storage, but that's different.

Additionally, fragmentation is far less of an issue on anything SSD based as they don't really have seek times (there is a slight random access penalty, but not normally worth mentioning, especially since the SSD controller normally intentionally fragments storage to spread the wear and tear on an SSD.

@user610620 correct, that will copy individual files in to new spots on the other drive.  Even copying from one spot on the same drive to another spot and deleting as a separate activity will change how fragmented the files are.  The only file operation that won't change fragmentation is a rename (cut/paste) on the same drive.

So cutting and pasting to a new drive will not inherit the fragmentation of the file on the old drive?

@user610620 correct, fragmentation refers to difference between how a file is physically stored vs logically stored.  To the user, it's a single file, but the disk storing it may not have a big enough contiguous section of free space or may prefer to write it in different sections for lifespan reasons.  In these cases, the file is fragmented for storage at multiple smaller physical locations.  You copy logical files though, not physical ones.  The destination has its own physical constraints and will map the logical file to physical storage in its own way because it's a different physical spot

Please insert this in, and re-work, your answer

@user610620 it really is tangential to the question though.  Fragmentation has nothing to do with my answer, I was just taking the time to explain to you why it wasn't relevant.  If anything, if you don't object, I will clear this comment thread since it's not really relevant to the answer here.  I can nuke all the comments at once.


text:
How much disk space does 1 mini DV tape digitised in HDV take?
I'm looking out to buy some storage for a session of logging a lot of tapes, and I want to guage how much space I will need. How much disk space does 1 mini DV tape digitised in HDV take?

Why would you bother to up-res DV to HDV? It will just waste a lot of space without any quality gain.

I used this camara http://www.sony.co.uk/pro/product/broadcast-products-camcorders-hdv-dvcam/hvr-a1e/overview/ and recorded in HD

mini DV is already digital format. The bitrate is 25Mbps.
So, 1 hour occupies approximately 11 Gigabytes

Note that 25Mbps is only the video stream.  The audio stream is an additional 192kbps per channel.  Granted, that doesn't make a huge difference in the overall file size, but it does mean things end up a bit closer to 12 gigabytes per hour.

It is approximately 11GB per hour, though I do tend to round up a bit when I make my calculations.
Digital Rebellion has a handy Video Space Calculator on their website (also available as an iOS app). You can select the format, frame rate, and video length.


text:
Scripting - Where is the documentation for the Layer#Effects attribute?
I have been trying to make a script that will automatically apply an effect to the selected layer. So far, it looks like this:
var myLayer = app.project.activeItem.selectedLayers[0];

I have seen here and here the use of the Effects attribute, which is used like this:
var myEffect = myLayer.Effects.addProperty("My Effect");

The only class I found in the CS3 scripting guide that has the addProperty method was the PropertyGroup object, found on page 147. There is no mention of myLayer.Effects. In fact, I have not seen an attribute with a capitalized first letter before.
I am going to use this to automate creating around 100 circles on a layer. (This effect is found under Effects & Presets > Generate > Circle.) I want to be able to provide a list of X/Y coordinates and for each one generate a circle with this center and a fixed size. This list could come from a file or from a list of each null object on the same layer.

Could you use circular shape layers instead of effects?

I actually found the answer in the CS3 scripting guide. CompItem#selectedLayers actually returns an array of AVLayer objects. AVLayer is a subclass of Layer and has quite a few  attributes. Here are a few of them:

Masks
Effects
Anchor points
Position
Scale
X Rotation
Y Rotation
Opacity

Oddly enough, when calling these attributes you need to pay attention to if the attribute is one word or two. If it's one word, the first letter will be capitalized, but if it's two words the first letter will be lower case and the rest in camel case fasion.
For example, if you have an AVLayer instance called myLayer and you want to get its list of effects you call myLayer.Effects, but if you want to get its X rotation you call myLayer.xRotation.

As for my end goal of creating circles on a selected layer, this is what I came up with (works in CS5.5 although it also needs error checking to see if a layer is actually selected!):
function createCircle(layer, coords, radius) {
    var x = coords[0];
    var y = coords[1];

    var circle = layer.Effects.addProperty("Circle");
    circle.Center.setValue([x, y]);
    circle.Radius.setValue(radius);
    return circle
}

var myComp = app.project.activeItem;
var myLayer = myComp.selectedLayers[0];
var circles = [];

//coordsList could come from an external file or another function
for (var i = 0; i < coordsList.length; i++) {
    circles.push(createCircle(myLayer, coordsList[i], 75));
}