text:
Programmatically detect 'packed B-frames' AVI files
I have a set of old AVI files that I wish to fix using ffmpeg 'mpeg4_unpack_bframes' filter.
I can manually detect them, simply running ffplay and I'll get a clear message:
[mpeg4 @ 0x55ef7bd90980] Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it.

Then it is easy to fix using:
$ ffmpeg -i packed_bframes.avi -codec copy -bsf:v mpeg4_unpack_bframes unpacked_bframes.avi

My question is: what command line tool can I use on GNU/Linux (eg. Debian) to detect those files and only those (possibly without DISPLAY) ?

Right now, the best I could find is:
$ ffmpeg -y -hide_banner -v info -i packed_bframes.avi -ss 0 -t 1 -an -c:v mpeg4 -f null /dev/null 2>&1 | grep mpeg4_unpack_bframes
[mpeg4 @ 0x559262225100] Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it.

I wanted to avoid grepping ffmpeg's warnings from stdout/stderr in my own tools, so I looked for an alternative/stabler approach. The key to how ffmpeg detects packed B-frames is here:

https://github.com/FFmpeg/FFmpeg/blob/f4b4e16641184b2414e5822c49fa5f6f9a57f2fb/libavcodec/mpeg4videodec.c#L2949
https://github.com/FFmpeg/FFmpeg/blob/f4b4e16641184b2414e5822c49fa5f6f9a57f2fb/libavcodec/mpeg4videodec.c#L3677

Unfortunately, ffprobe does not inform on the existence of packed B-frames and depending on your needs, implementing/linking an entire MPEG4 stream decoder might be overkill.
Fortunately you can use ffprobe and little code to programmatically detect them:
ffprobe -show_packets -select_streams v -read_intervals '%+#1' -show_entries packet=size,pos path/to/file.avi

Then open the AVI file, seek pos, read size bytes and Regex-search for \x00\x00\x01\xB2DivX(\d+)b(\d+)p or \x00\x00\x01\xB2DivX(\d+)Build(\d+)p. Here \x00\x00\x01\xB2 stands for the MPEG4 "User data" magic sequence.
You can see an example here: https://github.com/AlexAltea/curator/commit/f9b06146fde30dce0a422ca05a6ed7fa675da6ad
This should always correctly identify packed B-frames: when reformatting with -bsf:v mpeg4_unpack_bframes (or equivalent options in other tools), the p flag at the end of the DivX identifier gets removed.
If you ever come across false postives (unpacked videos that still have the p flag), you can further improve by querying ffprobe -show_frames. I've noticed that packed B-frames always get reported as having pkt_size == 8.


text:
Lossless masking of MP4/h.264
I am familiar with the UNIX command jpegtran which supports the wipe (1) command line option for JPEG (ITU.81) format.
Using ffmpeg one can losslessly encode a jpg image sequence to a MJPEG video.
I was wondering if ffmpeg would support the same wipe implementation for h264 ? I could not find anything related to lossless-editing of video other than this. Looking at the features page, I do not see anything related to 'wipe' or 'mask' image.
I am looking for masking of a rectangular region, replacement color is not important (eg. neutral gray as in jpegtran implementation is acceptable).
(1)
$ man jpegtran
[...]
A complementary lossless wipe option is provided to discard (gray out) data inside a given image region while losslessly preserving what is outside:

       -wipe WxH+X+Y
              Wipe (gray out) a rectangular region of width W and height H from the input image, starting at point X,Y.

       Attaching an 'f' character ("flatten") to the width number will cause the region to be filled with the average of adjacent blocks rather than grayed out.  If the wipe region and the region outside
       the wipe region, when adjusted to the nearest iMCU boundary, form two horizontally adjacent rectangles, then attaching an 'r' character ("reflect") to the width number will cause the  wipe  region
       to be filled with repeated reflections of the outside region rather than grayed out.

The short answer is no.
You can use the drawbox filter to overlay a gray or any other color box over a rectangular region of a video.
However, it then has to be re-encoded. You can specify lossless encoding, however the output stream will usually be (much) larger.

Ok, thanks. I found a simple example to play with.

For later reference, here is what I found out:
% identify 300.jpg
300.jpg JPEG 200x300 200x300+0+0 8-bit sRGB 10839B 0.000u 0:00.000

Convert to yuv444:
% ffmpeg -y -i 300.jpg -pix_fmt yuv444p 300.yuv

Convert to mp4:
% ffmpeg -y -s 200x300 -pix_fmt yuv444p -i 300.yuv -c:v libx264 -pix_fmt yuv444p -profile:v high444 -crf 0 -preset:v slow lossless.m4v

Convert back to image:
% ffmpeg -y -i lossless.m4v -vcodec rawvideo -pix_fmt yuv444p m4v_decoded.yuv

Verify:
% md5sum m4v_decoded.yuv 300.yuv
b7e89f5a091b680e6991c6ae6aad8564  m4v_decoded.yuv
b7e89f5a091b680e6991c6ae6aad8564  300.yuv

Thanks to SO.

To extract all I-Frames:
% ffmpeg -skip_frame nokey -i file -vsync 0 -frame_pts true out%d.png

Thanks to SuperUser.

For 420 pay attention that high profile is not supported.
Thanks again to SuperUser.

source: Stack Exchange

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

sort: votes


text:
ffmpeg to convert and merge 3 videos to a single widescreen video
I have three .mov files with video in Apple ProRes (apcn) and audio in PCM S24 LE (in24), of identical length and dimensions (1920x1080), frame rate (23.976024) and each with the same audio track. I'd like to:

convert to H.264 video and AAC audio, retaining very good quality (for public exhibition), and
generate a single widescreen video in H.264/AAC, i.e. it'll be 1920px times 3 wide and 1080px high.

For generating the widescreen I've worked out I can use this command assuming I've prepared the individual mp4 files:
ffmpeg -i left.mp4 -i centre.mp4 -i right.mp4
   -filter_complex "[0:v:0][1:v:0][2:v:0]hstack=inputs=3" triple.mp4

Main Question:
Should I do the process in two steps -- (a) convert files, (b) make widescreen file -- or does that mean the widescreen video is re-encoded therefore it's worse quality? I'd like to keep the separate files so if there's no other impact then I'd prefer to do it as two steps. If I should do the conversion to H.264 at the same time as making the widescreen how do I combine the different commands?
Sub-Questions:

When preparing the widescreen I came across an alternative method using overlay like below. Is there any advantage either way? It seems like the overlay should be slower but in testing seemed about the same.
ffmpeg -i left.mp4 -i centre.mp4 -i right.mp4 -filter_complex "[0:v:0]pad=iw*3:ih[bg]; [bg][1:v:0]overlay=w[leftcentre]; [leftcentre][2:v:0]overlay=w*2" triple.mp4
When preparing the widescreen, I think ffmpeg chooses the audio from just one of the input files. Since the audio is the same on each it doesn't matter to me which one. Is that right or is it in some way combining them?
Am I right in thinking a term like [1:v:0] in the filter_complex expression means 'second input, first video track only'?
Here's my command to convert the .mov files, which seems to work as desired. Is there anything obviously wrong with it?
ffmpeg -i left.mov -c:v libx264 -preset medium -tune film -crf 16 -c:a aac -b:a 256k left.mp4

May I ask how is your project going? I'm planing to do the same but I don't know if what I want to do will work. I am planing to use two osmo pocket and clicked record same time and one on the left and one on the right recording at the same time. I think it's pretty similar to yours of having a wider view. May I ask if yiu have a sample of yours or how did yours turn out? Thank you so much and I hope to hear from everyone

Hi! The project worked well, I used the ffmpeg commands something like that above to make a single widescreen movie file. I used this to play it split across three projectors using a Matrox TripleHead2Go.

fwiw this is the command I ended up using (I think): ffmpeg -i 1920_LEFT.mov -i 1920_CENTRE.mov -i 1920_RIGHT.mov -filter_complex "[0:v:0][1:v:0][2:v:0]hstack=inputs=3" -c:v libx264 -tune film -crf 16 -b:a 256k myOutputFile.mp4

fyi my source wasn't multiple camera recordings but rather several hours of recordings from one camera which had been edited into a multi-screen artwork that was to be projected using three projectors simultaneously. I was joining the three videos into a single widescreen one to ensure they were synchronised exactly when playing, since they'd be playing continuously for days in a gallery environment with nobody to check the sync. Hence we used a Matrox TripleHead2Go to split the widescreen video into three separate but synchronised outputs for the projectors. There was just one audio stream.

This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review

Quality-wise, it's better to use the original MOVs, but if the MP4-based stacking looks ok, that's the final arbiter.
ffmpeg -i left.mov -i centre.mov -i right.mov
-filter_complex "[0:v:0][1:v:0][2:v:0]hstack=inputs=3"
-c:v libx264 -tune film -crf 16 -b:a 256k triple.mp4

When using the originals, it doesn't matter whether you do it in one step or two. For streamlining purposes, I would do it in two - then the two encodes aren't competing for memory or CPU.

The stack filters are somewhat more efficient. They require all inputs to have the same size in the dimension normal to the join direction i.e. same height for hstack. Overlay is a generic filter, so it doesn't. Also, stack filters will freeze on the first and last frame of inputs which start late or finish early.
In digital files, audio and video are independent i.e. they exist within the same file and are synced via timestamps but logically they are distinct entities. ffmpeg relies on -map options to select streams for inclusion in the output. In the absence of any -map option, it picks one audio - the "best" - from among all the inputs. See https://ffmpeg.org/ffmpeg.html#Stream-selection
[1:v:0] ... "means 'second input, first video track only'?"  --> Yes.
Looks fine. The suitability of the tune value depends on the material.

Great, thanks! I've just done this in two steps, making .mp4 files and then using hstack on them to make a triple-width .mp4. I'm surprised to see the file size is smaller for the triple-width file than any individual .mp4 file! Bitrate Viewer shows me the triple-width file has significantly lower bitrate (avg 12Mbps instead of 18Mbps) despite having three times the width. Is it re-encoding using some defaults and I need to use some arguments to control the quality level of that re-encoding?

Just to be clear: did you use MP4 or MOVs as source for the stacking?

I used the .mp4s. Will do it with the .mov files instead.

Small follow-up: if I've decided -crf 16 provides suitable quality for my individual 1920x1080 .mp4 files, should I keep using that for creating my stacked widescreen .mp4 or do I need to lower that value to get the same quality in a 5760x1080 file?

The higher the resolution, the more relaxed CRF can be (upto a point), but it sounds like you're getting the opposite result. Don't look at the file size, do a subjective check.

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

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


text:
How to set up a 3-screen video installation to sync correctly?
I need to set up a three-screen HD video installation with sound for a friend's art exhibition. The videos will likely be provided as separate video files, each with a different video but exactly the same length and intended to be played synchronously. I'm looking for advice on how to set up the installation so that the three screens will be synchronised correctly and played on an endless loop. What's the best way to achieve this with consumer-grade equipment?
I can hopefully borrow three HD (720p) projectors - not sure yet which model, I'll hopefully find that out soon - or can possibly purchase three cheaper projectors specifically for this. I've been told it's important to have the same model (& year?) to ensure the color will be effectively matched.
I can borrow a laptop or mac mini to drive the video or could purchase one or more cheap devices if needed. I can also borrow blu-ray players if that's any use. Again, I need advice about what device to borrow/buy.
Sound is two-track stereo, so can be played from just one of the videos. That should be the easy bit.

Are there 3 different video files (of the same length)? Or is it one video played through 3 projectors? If it's the latter, some projectors allow daisy chaining through VGA, effectively copying the signal from one projector to the other. This (I think, no real experience here) syncs them automatically.

There's a different video playing on each screen

Moved comment to the answer. Let me know how this works out for you as I'm quite curious to see the result.

The Matrox graphics card is probably the easiest and most versatile approach. I use the TripleHead2Go, which as you'd assume sends a signal(s) to up to three monitors/projectors.
Multiple computers will never stay in sync. I found this out the hard way the night of an event.
In terms of software, if you're on OS X check out VDMX. There's a fully functional demo that you can grab. Setting it up for your needs would be fairly trivial after a quick search for the right approach.
PS. I would have just commented on the other answers, but I'm new here and don't have the credentials.

Thanks @ray, this is what we went with. Matrix seem really simple to set up and totally avoid the hassle of multiple computers and hence any need to sync anything.

I was in same situation when I started my project in 2014. After a lot of research i found a very good solution.
I am running three projectors and one monitor on one computer so total 4 outputs i am using and it's working quite well.
I am using mac pro black cylinder model and I bought resolume arena software which can play multiple videos at a time in sync too.
There are two options you can go for,

if you go for Mac pro which has 6 thunderbolt and one hdmi out then buy thunderbolt to HDMI/VGA/DVI..and connect you projectors and screen you are done with hardware and now coming to software part download resolume "https://resolume.com/software"  and you are all set to play the videos in sync.
If you want to go for Windows or you already have one  then buy a graphics card with multiple display outputs. you need at least 4 outputs graphics card because 3 for projectors and one for monitor which you will need to see the resolume software interface to play the videos.
Something like this "NVIDIA NVS 510 Quad DisplayPort UHD 4K Graphics Card" pls check specifications of any graphic card you like before you buy.

I did a 3 screen art installation in a hotel lobby some years ago. The original system used media players in a rack with converters to pass DVI over cat5 cable. There was a control computer to keep the media players in sync. It was 20U of rack space, 15K of hardware and many hours of configuration and installation. It ran 24/7 for 7 years.
When the media players started dying I replaced the system with a single server computer and a Matrox Triplehead unit.
Then the plasma screens finally wore out. The new LCD monitors did not do DVI. Converting the outputs was going to be expensive.
That is when I switched to Brightsign HD players.
They will play in sync with each other with just a simple network connection to a small switch. The HD220 players are around $350 each and mount on the back of the monitor.
Less than a grand to replace 30K worth of junk.
Now I can shoot the video for that with a 4K camcorder and use handbrake to split it up. Back in the early days we had 3 Hidef cameras on a massive plate to line them up. Editing had to be done in sync.
Now I take the camera and tripod in a small pack and go out on my bicycle to capture video.

As you want to play three different videos, daisy-chaining projectors or copying the signal using an amplifier is not viable.
Machine
While you can get one machine to play to three different projectors I think it will be quite expensive and prone to errors.
Average laptops/desktops are not equipped to output a video signal to three screens. You will need a modern GPU or an external video card, which can be quite expensive. Additionally the hard disk and CPU should be able to play three videos simultaneously. Lower end machines might stutter and syncing will be very hard.
Therefore I suggest you borrow/buy three average laptops. Nowadays almost any laptop can play an HD video and connect to a projector without a problem. Try to get three laptops with the same OS, as that makes live easier.
For sound, just connect one of the laptops to a sound system using the line-out/headphone jack.
Software
VLC seems to have several ways to sync videos over the network. A Google search for vlc sync different machines network yielded results involving multicast and the third party tool Syncplay.
Other hardware
When using projectors they need to be calibrated. Simply calibrating one and copying the settings to the other two might yield unsatisfactory results.
Proper calibration is done using a colorimeter, but you can also calibrate by eye if precision is not very important.
I've only calibrated a projector by eye several times, so I can not tell you more about colorimeter calibration. This subject might also be suitable for a separate question.
To connect the machines you'll need a router or switch. Wired connections are more reliable than wireless connections.
Rough Bill of Materials
3 x laptop
3 x projector
3 x video cable (VGA, DVI, HDMI, whatever the projector needs)
1 x 3.5mm audio jack cable
1 x sound system (2.1 amp/speaker combo is easiest)
1 x network switch or router with min. 3 LAN ports
3 x ethernet cables
2 x 4 port power strip (to balance load if needed)

Using three random laptops for this is likely to be problematic. You may find that the players get out of sync fairly quickly. If you require frame-accurate sync (or better) over a video of any length, you usually need a single computer with a triple-headed graphics card (like Matrox) playing a single video comprising all three parts.
I don't know Syncplay (recommended in another answer), but it's worth a try if it can keep continuous sync. Often such solutions don't maintain absolute frame sync over time. And depending on internal factors, "frame sync" may not be good enough to prevent disruptions at scene changes - you also need vertical genlock.

First the three videos need to be the same length
Export as three separate files (mp4 H264).
the way to do it is to use network connected Brightsign players and have one as master and the other two as slave (see tutorial on Brighsign webpage). The result is frame accurate sync. With this method you can sync as many monitors as you want.

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


text:
How do I make a news-like lower third in kdenlive?
With the composite transition in kdenlive I am already able to let the the lower third (with the name and a line of additional information, just like in the news) appear. Now I want it to fade in (or some other effect), but kdenlive only allows to add one transition.
Is there a way to avoid this dilemma?

I don't know kdenlive, but the bar you are referring to is often called a lower third.

thank you, that really could help, since i am not a native speaker obviously and had a little trouble finding the name of it.

Just use an affine transform for the title

Create a title with the text
Put the video on track 2
Put the title on track 1
Combine them with an affine transformation
On the affine transformation, add 4 key frames for a title of 5 seconds, at 0 / 1 / 4 / 5 seconds
Set the opacity for keyframe at second 0 and second 5 to 0. Keyframes at second 1 and 4 keep 100% opacity
Play. The title fades in for a second, stays for 3 seconds and fades out for a second.

Screencast: http://cweiske.de/tagebuch/kdenlive-lower-third.htm

thank you for the very desciptive answer, as well as the video !
This really seems like a nice and straight forward solution.


text:
Copying h.264 video from TS into MP4 changes frame rate and time
I have large MPEG-TS file that I am converting to MP4 using the below command.  If I seek to the same time in the video in both the MP4 and the TS file,  the MP4 will be a few frames behind the TS file.  This get progressively worse the further into the video I seek.
c:\>ffmpeg -y -r 30 -i full-ts.ts -c:v copy -r 30 -an full.mp4
ffmpeg version N-69040-gb23a866 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan 12 2015 22:02:37 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --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-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --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      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.100 /  5.  7.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpegts, from 'full-ts.ts':
  Duration: 00:11:25.75, start: 1.424000, bitrate: 3407 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 125 kb/s
Output #0, mp4, to 'full.mp4':
  Metadata:
    encoder         : Lavf56.18.101
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 15360 tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=20419 fps=0.0 q=-1.0 Lsize=  251660kB time=00:11:25.59 bitrate=3007.0kbits/s
video:251446kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.084929%

I'm confused why the TBN is so large in the output stream.  I've tried -copyts,  -copytb, all the -vsynch options,  but I cannot get seek times to match up on the MP4.   Also,  the MP4 shows a frame rate of 29.78,  whereas the TS file is solid 30/1 using ffprobe.
ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=avg_frame_rate full.mp4
streams_stream_0_avg_frame_rate="5227264/175529"

ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=avg_frame_rate full-ts.ts
programs_program_0_streams_stream_0_avg_frame_rate="30/1"
streams_stream_0_avg_frame_rate="30/1"

Any idea how I can get the seeking on the both containers to show the same frame?  Please help!

What happens if you remove the input -r 30? What is the reason for that anyway? Also, you enable stream copy mode with -c:v copy which means the output -r 30 is ignored.

@LordNeckbeard - it changes a few things in the output,  but I still have the seeking issue.  See log @ https://gist.github.com/andypryor/3b1f123b4c8d6ed3975c   ,  Thank for explaining the -r 30 is not needed,  I misunderstood its use,  thought I could force mp4 frame rate.

As I understand it, mp4 doesn't store a framerate anywhere, just times between individual frames.  So ffprobe looks at the frame times of the first few frames, and assumes the rest of the video is the same.  I don't have any ideas to actually solve your problem, though.  Except maybe try something other than ffmpeg, like MP4Box.  Or even mkvmerge to a .mkv, to see if that works any differently.  (and maybe try ffmpeg muxing to something other than mp4.  ffmpeg's mp4 muxer might not be perfect.)

The standard video frame rate is 29.97, if you convert to 30fps you will eventually see drift: http://filmdoctor.net/2010/06/drop-frame-vs-non-drop-frame/

tbn of the output stream is too small 15k. it should be 90k. Seems like discarding of the audio stream is the source of the problem.

@incBrain the tbn is not a problem. The tbn for TS is a fixed 90k irrespective of video stream framerate and FFmpeg generates a tbn of tbr x 512 for MOV/MP4 formats where tbr is the codec frame rate. Audio doesn't factor in here, since tbn refers to the video timescale.

@Mulvya tnx for the info. Do you know why they chose tbr x 512? Why 512?

As per a comment here, removing the -r flag ought to do this properly. You have another -r flag for the input, also. Remove both of them, and it should properly copy the stream as it is into a new container; you may need to remove that -an (disable audio) switch, too. I'm not sure on that:
ffmpeg -y -i full-ts.ts -c:v copy full.mp4

If that fails, also per a comment here, you could try a different output container format.


text:
why movie video is different from other videos (sports, news, or other)
I'm not a video producer or anything but I always noticed the different
of the image from a movie vs a regular video.
I'm curious, re they shot on different camera types or it's just post-production effects?
https://i.sstatic.net/ggWeR.jpg
This is an example. If you take a look at the colors you will obviously
notice which one is the movie

What exactly do you mean? Movies differ from news shows and the likes in many ways ...

http://i.imgur.com/g1vg6GU.jpg
I mean this. How is the difference in color achieved? Is it the camera or after effects? You can obviously notice which one is the movie which one is not

Both. I'll elaborate later today (unless someone else writes an answer before I get home).

Movies have certain "looks" to arouse certain moods. The lightning and color depends on the intention of the movie and each individual scene.
Let's take the picture you linked as an example:

The footballer is lit by the floodlights in the stadium. He is lit from every side so that you can see as much as possible, there is little shadow and contrast. The movie scene with the delightful workers is very different: There is a leading light coming from the left, with shadows on the right side. It may look like sunlight, but this was most likely achieved with a set of spotlights. At the very least, you usually use three different lights coming from different directions. This is called three-point lightning. From Wikipedia:

The key light, as the name suggests, shines directly upon the subject and serves as its principal illuminator; more than anything else, the strength, color and angle of the key determines the shot's overall lighting design. [...]
  The fill light also shines on the subject, but from a side angle relative to the key and is often placed at a lower position than the key (about at the level of the subject's face). It balances the key by illuminating shaded surfaces, and lessening or eliminating chiaroscuro effects, such as the shadow cast by a person's nose upon the rest of the face. It is usually softer and less bright than the key light (up to half), and more to a flood. [...]
  The back light (a.k.a. the rim, hair, or shoulder light) shines on the subject from behind, often (but not necessarily) to one side or the other. It gives the subject a rim of light, serving to separate the subject from the background and highlighting contours.

Of course, aside from the lightning, the garments, stage props and the likes are also picked carefully. Imagine how you would react to a shiny red plastic bag in Bilbo Baggins' Hobbit-Hole ...
Then there is post-production, which has a huge role in creating a movie's look. Color-grading is the process of deciding upon a desired look for each scene and then adjusting the colors in this scene to have a coherent appearance. Take a look at movies in color, a great website that analyses movies and creates color palettes to show which colors are dominant in a movie. For example, this is the color palette of Sherlock Holmes: A Game of Shadows, which uses mostly blue-grey colors:

More palpable, this is a collection of ordered stills from James Bond: Quantum of Solace:

As you can see, each scene has a specific color range that is used to convey certain moods. The color-grading process is very difficult, there are people who do nothing but that for a living ...
Tl;dr: The speficic look of a movie is achieved through a combination of sophisticated lightning techniques, the choice of stage props and post-production efforts.


text:
Screen capture AND audio recording in ffmpeg
I am using ffmpeg built from source at this revision in Fedora 20.
I am able to record audio perfectly fine with the command:
FFmpeg/ffmpeg -f alsa -ac 2 -i pulse -- output.wav

However, when I try both screen capture and audio, like this:
FFmpeg/ffmpeg -video_size 800x600 -framerate 25 -ac 2 -f x11grab -i :0.0+0,0 -ac 2 -f alsa -i pulse -ac 2 -acodec copy output.mpeg -ac 2

I'm getting a video with 0 audio channels, which I can check running FFmpeg/ffplay output.mpeg
Input #0, mpeg, from 'output.mpeg':
  Duration: 00:00:09.44, start: 0.540000, bitrate: 2743 kb/s
    Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p(tv), 800x600 [SAR 1:1 DAR 4:3], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 0 channels, s16p
   7.26 M-V:  0.000 fd=   0 aq=    0KB vq=   33KB sq=    0B f=0/0

and no audible sound is played. The position of -ac 2 doesn't change the behaviour, nor does repeating it only once. This is despite ffmpeg claims to record the audio with 2 channels, here is the input:
ffmpeg version N-71312-ga66dcfe Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-7)
  configuration:
  libavutil      54. 22.100 / 54. 22.100
  libavcodec     56. 34.100 / 56. 34.100
  libavformat    56. 29.100 / 56. 29.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 13.101 /  5. 13.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
Trailing options were found on the commandline.
Input #0, x11grab, from ':0.0+0,0':
  Duration: N/A, start: 1428348285.201679, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 800x600, 25 fps, 25 tbr, 1000k tbn, 25 tbc
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, alsa, from 'pulse':
  Duration: N/A, start: 1428348285.225901, bitrate: 1536 kb/s
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
 File 'output.mpeg' already exists. Overwrite ? [y/N] y
[mpeg @ 0x2d079a0] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'output.mpeg':
  Metadata:
    encoder         : Lavf56.29.100
    Stream #0:0: Video: mpeg1video, yuv420p, 800x600, q=2-31, 200     kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.34.100 mpeg1video
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
  Stream #1:0 -> #0:1 (copy)

I'm clueless. If anybody can tell me how to get this to work by either:

fixing my mistakes in the command line flags
if it's a regression, which revision to build from.
any other way

I'll buy him/her a pint.

I've also filled a bug report on ffmpeg's trac: https://trac.ffmpeg.org/ticket/4436#ticket

The solution seems to be to use both a different video and audio encoder. This line works:
FFmpeg/ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec aac -strict experimental output.flv

I couldn't get it to work without -acodec aac -strict experimental, contrary to the HOWTO on ffmpeg wiki.
The error message I'm getting is:
Output #0, flv, to 'output.flv':
    Stream #0:0: Video: flv1 (flv), yuv420p, 1024x768, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc56.34.100 flv
    Stream #0:1: Audio: adpcm_swf, 0 channels
    Metadata:
      encoder         : Lavc56.34.100 adpcm_swf
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> flv1 (flv))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> adpcm_swf (native))
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

Neither could I get this to work using:
FFmpeg/ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+0,0 -f alsa -ac 2 -i pulse -acodec copy output.mpeg

which contains -ac 2 probably in the right place. The error I'm getting repeatedly is:
[mp2 @ 0x7faffc007da0] Header missing
This most likely is a bug/regression.
To sum up, I've found a probable bug in both ffmpeg and on ffmpeg's wiki. And it looks like I'll have to buy the promised beer for myself ;)


text:
Is a 1/2.3" sensor good enough for tv?
I just purchased a Panasonic HC-X1000 but now having second thoughts because I only now learned that the image sensor, being a tiny 1/2.3" sensor, is no better than that in a compact camcorder or gopro 3.
The fact is, I bought this camera to produce for tv. I don't mind that this is not the best camera or the biggest sensor. My real question is, will the video produced by the camera be good enough to be used/licensed by networks (assuming that the content is good enough as well lol).
If not, I think I'll be returning this and going for something like the Panasonic GH4.

Can you provide more information about your intended content and audience?  If you're just going to chase ambulances for ENG footage a la Nightcrawler, then any cell phone would do.  If you're looking to sell B-roll, they're going to want something that matches their cameras better.  Probably, your best bet is to ask them.

@JasonConrad The intended content will be primarily documentaries, and possibly reality tv. The camera has a bunch of features that are nice for that (dual recording, backup recording, auto-focus, etc).

Small sensor means two things: increased depth of field (everything is in focus, no soft backgrounds) and more noise in low-light conditions. If either of these are a deal-breaker then consider changing. Here's why maybe you shouldn't:
To get a large sensor camera with the ease of use and ergonomics of this camera you'll be looking at cameras like the Sony FS7 which with lenses is going to be around the $8k mark, maybe close to $10K all up.
Otherwise if you do go down the DSLR route you'll find that simply getting a GH4 probably won't be enough for broadcast work. You'll also need a good on-camera monitor because the built in monitors are way too low res to be able to judge focus critically, probably an external sound recorder, maybe also an external video recorder if you want to record raw or proRes, maybe a follow focus handle, maybe a matte box, and—since you'll have all these extra bits to carry—a rig to put it all on. At this point it will weigh about as much as a family sized refrigerator and look like something from Mad Max. I know, because I've lived it.
You won't have motor zoom, and unless you get a cinema lens (eyewateringly expensive) you'll have to put up with stills lenses: no manual iris control on the lens, focus measurements are very approximate and usually go something like 1ft, 2 ft, infinity, and there's no parfocal zooming—meaning that focus changes as you zoom.
The shorter depth of field also means that you have to really stay on top of your focus. When I first started shooting with DSLRs (5DII) I was going gung-ho with wide open lenses, and discovering that when I looked at the footage in the edit suite that if the subject moved at all they'd go completely soft. It wasn't until I got an external monitor that I could reliably get useable footage from the thing. For documentary shooting, although you can get beautiful results when conditions are right, it really isn't the right camera for run-'n-gun.
If beautiful bokeh is worth it to you, then go DSLR, but if getting the shot is more important then go with something with good ergonomics, that is first and foremost built as a video camera.

Thanks for your answer. I think I'll keep the X1000 and just order a GH4 so that I have the best of both worlds. Don't have $20k to spend on a camera so I think I'll do my best with what I've got.

That's probably a good strategy. DSLRs are great when you have controlled conditions - for interviews for example, they can make even a fairly drab setting look great, but they're a PITA for run - 'n - gun, when a proper video camera will be much more useful.

Actually, 2/3" sensors have been, and still are used for television all over the world.  Even now that recently there has been an increase in larger sensor camera's being used for TV production, by far most factual tv shows are produces with 2/3" camera's.
What "quality" is acceptable for broadcast is highly dependant on what country you live in. Alltough in my country these specs don't seem to important, here, in Europe, you will need:

50 Mbit/s 4:2:2 minimum for inter-frame codecs
100 Mbit/s 4:2:2 minimum for intra-frame codecs
A lot more read the specifications

Altough I've seen for video Journalism other specifications apply (see link below).
You will notice that most DSLR's don't pass these specification, especially not when you take audio into consideration.
Your camera, however, only lacks a little in the bandwith (mentioned above) this is easily solved with an external recorder. (Atomos, Blackmagic Design, Convergent Design)
In my personal experience, broadcasters would LOVE a little less depth of field,
however they HATE footage that is out of focus or has bad audio.
I would happily take your camera out and sell the footage to a broadcaster.
(That is, if you have a good story)
EBU broadcast Specifications

The size of a 1/2.3" sensor is 6.17 x 4.55 mm .   A  2/3" sensor is 8.8 x 6.6 mm (about double the area).  Many broadcast cameras use 3 - 2/3" sensors. Many consumer camcorders and some Gopro models use tiny 1/2.8 or 1/3.2" sensors.


text:
Problem with video playback of AVI (Xvid) on Sony BDP-S186 [solved]
I'd like to play an AVI on my Sony BDP-S186.
The user manual states: Supported Codecs and File Types: including Xvid (.avi) (http://pdf.crse.com/manuals/4290282312.pdf - in German).
I'm trying to play the file from an USB stick.
The video file's codec is MPEG-4 Video (XVID).
The device says "Die Datei ist verfälscht oder unbestätigt," which means that the file is corrupted.
Sometimes it works for AVI files, sometimes it doesn't and I actually do not know what's the reason for the issue. The issue seems to be well known by the internet, but I didn't find an appropriate solution for now.
This forum deals also the issue: http://www.cczwei-forum.de/cc2/thread.php?threadid=6317 (in German)
I'm buying the capability of playing files with that format/compression and not the capability of not playing them.
I would also be interested in the legal side of this issue. I don't think the cause for not playing specific videos is caused by copyright protection or anything related, even if Sony qualified themselves always for being a bad example of copyright protection guards.

I changed the file system on the USB stick from FAT32 to NTFS. The video playback works now.

So your files were bigger than 2GB, and were broken when you tried to put them on FAT32?

No. Usually the video files I tried to play were around 700M, every file worked on the computer and only some of them worked on the Sony. After changing to NTFS I did not experience this problem again so far.

authors: امیر حسین رمضانی


text:
Convert MTS 1080/60p to MP4 1080/60p
Still learning a little bit about converting formats, fps, etc.
I have a Sony A6000 and have the option to record in 1080 at 60fps. This is perfect for me because I absolutely love the smoothness of it. However, when I import it into my Macbook using PlayMemories Mobile, it imports the .MTS file (perfectly fine) and converts it into MP4. The problem is that the MP4 file looks pretty crappy compared to the original one. Very choppy, etc.
Is there any better way that I can handle this? How do other people record 1080 at 60fps and upload videos to YouTube? I'd like to be able to accomplish the same goal, but have no idea how to. I hope this all makes sense, although I'm sure I'm misunderstanding something here.
I'd love to maintain 60fps if possible during the conversion.

So this program that you use (Playmemories Mobile) converts your videos upon importing? Why do you use it then? Have you tried copying your video files directly from the camera to your macbook?

I agree with what @MoritzLost said.  Better that you copy those video files directly.
Once you have these MTS files copied, there are a variety of options.  I ran into this problem myself recently and found the two best options were rather simple (despite lots of complicated discussions online):

Simply rename (or copy first and rename the copy) the video file from a .MTS extension to .MP4 extension.
Sounds a bit stupid, but the video and audio are generally supported by lots of different programs.  Problem is, the MTS container surrounding the video and audio streams us bit as well supported.  Give this a try first, because it's the easiest thing to do with keeping the audio and video quality exactly as it is in the original file.
The next best option I found was using ffmbc.  You can find the website for it (which will eventually be unsupported or removed completely) at: https://code.google.com/p/ffmbc/ .  There is also a Google Groups website for it at: https://groups.google.com/forum/#!forum/ffmbc-discuss .  For the Windows version, you'll find a download on the Groups website, while for Mac and Unix/Linux, you can download and build the code yourself (sorry, I can't help you with building on a Mac).
After you have the program built, you can run the following command:
ffmbc -fflags +genpts -i "FILENAME.MTS" -vcodec copy -acodec copy "FILENAME.mp4"
Obviously, you'll need to make sure ffmbc is runable from the command line of whichever OS you are using...otherwise, you can use the full path to the ffmbc executable.  And change "FILENAME" to be the name of whatever file you are using.
**From my experience, you will find the resulting file to be smaller.  For some reason, the MP4 container format is more efficient than the MTS container format.  You could research the reasons behind this, if you're interested.  Anyway, I have found that with a 6.1 GB file, repackaging an MTS file drops to about 5.7 GB.  The time it took to repackage that particular file from MTS to MP4 was about 1m 30sec.  So, even if you have incredibly large files, you are not looking as nearly the length of time that you would for re-encoding the video/audio.
You could also try using ffmpeg, MP4Box, Libav, are a variety of other tools.  The key here is that you do not need to re-encode the audio or video (unless you want/choose to).  You simply want to change the container that "holds" the video and audio streams.

**Generally speaking, the AAC audio format is better supported and standard for MP4.  So, you might want to copy the video stream but re-encode the audio if the application or media player you're using doesn't support AC3 (the default MTS audio format).  Re-encoding the audio won't take much extra time, but will add time compared to simply repackaging the video/audio in a different container.
Also, if you need to change anything, such as framerate, resolution, audio bitrate, etc., then you'll need to re-encode the audio or video (or both).  But, if you literally want the audio/video to be the same, the container change is your best choice and the fastest (with the exception of if renaming the extension MP4, if this works for your purposes).

ffmpeg will be more current than ffmbc, and if you're not encoding to an exotic production codecs or containers, is generally unnecessary.

What you are saying is only partially true.  Yes, ffmpeg is more current.  Regarding "exotic production codecs"...well, ffmbc also supports most/all of the same "non-exotic" codecs that ffmpeg does.  Problem is the issue that was posted here on Stack Exchange a year ago, listed here: link.  Basically ffmpeg changes from 29.97 fps to 59.94 fps.  Unless you know a way around this, using ffmbc to maintain the correct fps of the original MTS video is better.

As an additional point, if the @lewlsaucengravy uses ffmpeg and doesn't have a problem with with the fps changing, then ffmpeg is perfectly fine to use.  I am hesitant to suggest it given my problem and others' with the fps changing when changing the container from MTS to MP4.

That old question presents a complicated case. See the answer I just posted there. Note that the output I produced for a similar file - interlaced HDMV/AC-3 in MTS to MP4 with copying video stream - plays properly. And progressive H264 will mux fine. And all H264 streams will transcode correctly with ffmpeg. So, unless the OP needs to mux the current stream, my suggesrion stands.

I had the same issue as that post...I don't see it as being overly complicated.  That person attempted multiple things which made his post long and complicated, however.  As as you wrote in that thread, it played properly for you.  That poster said in his post that it did not play properly for him.  If it works for you, great.  However, I posted this answer based on my problem experience with fps and that other people who have posted here obviously had the same problem.  Also remuxing = copying video/audio stream into a different container.  So...I don't really follow your last sentence.

The OP here hasn't indicated that they need to stream copy. They just want a smoothly playing file that doesn't look "pretty crappy". Your 2nd option suggests ffmbc in order to remux the video stream. I suggested ffmpeg since it will be current (in terms of bugfixes and features).

What I meant by "complicated" in the case you cite is the problem there is not a generic bug of ffmpeg failing to preserve framerate during a MTS to MP4 remux but that when ffmpeg muxes a non-spec H264 interlaced stream with merged field pairs into an in-spec stream, thus separating each field, the frame rate analysis goes haywire. For this OP, that's not an issue since the 60fps mode in their camera only shoots progressive for which ffmpeg poses no problem.

I guess my chief objection was that your solution made it sound like ffmpeg can't handle MTS well, whereas it's that if you give it an out-of-spec H264 il stream to mux, the resulting file will show a wrong framerate. That's a niche case, not applicable to this OP and the preference for ffmbc not advisable in general.

authors: Борис Барлыков


text:
iPhone 6 Video Pulse
Does anyone know what this strange effect is in my video?  It's almost as if something is causing the video to "pulse" and reset somehow.  At first, I thought perhaps my own heartbeat was causing a slight vibration resulting in this but the first video was taken with the phone on a stand:

You may have to watch kind of closely to see it but I think it's pretty pronounced in the grass, trees, and cherry blossoms at HD and full screen.
It seems like the video is alternating between sharp and soft so I guess it's just an artifact of the compression but I haven't noticed the effect being so bad in other videos.
Is there anything I can do to fix this?

it looks like its the iPhone auto focus, try finding an app that doesn't use the auto focus

Ah, so simple and yet I never thought of it.  I think you're right and I'll give a different app a try.  This might be so simple as to not be of much help to others but please do put in your comment as an answer and I'll give it the up vote.

It looks like its the iPhone auto focus, try finding an app that doesn't use the auto focus


text:
Quality of VHS converted to DVD
I work for a small library. We have a collection of VHS tapes that we have recorded to DVD using a Magnavox VHS HQ DVD recorder. They came in as .ogg, They came in a a set of files including some .VOB which I can play by changing the file extension to .mp4. How much quality have I lost in this conversion? Is there a way to convert VHS to digital with higher fidelity?
The collection has historical value, so there is some debate on whether we need to save the original VHS tapes as opposed to just keeping the videos in electronic format (on a server that is backed up nightly).
Edit:
A bit of new information:
I used GSpot to determine the codec (I don't have admin/install rights on my computer, so that is the only program I could use), and it says mpeg2. Does any of this information help with the original question?
Edit2:
I'm such a dumb dumb. I had all these people trying to figure out why my files were .OGG. They weren't. They were .VOB. What was on the DVDs is exactly what Perter Cordes described below. Now that I've sent people on a wild goose chase...

the codec of the video stream in the ogg file is mpeg2?  weird.  You can install mediainfo in your ~/bin directory.

It's a work Windows 7 workstation ;)

IDK if there's a "portable" version of mediainfo.  It's pretty simple.  BTW, I was assuming Linux since only Free software is going to default to .ogg for anything.

If peter's answer helped you to solve your issue, it's friendly to upvote :)

The best way to conserve the VHS's would be to scan each frame in at the highest quality possible and export to a video file, this would be a very long process and would require some expensive kit or a professional service. If they are historical value and you want the best it would be worth spending the money and getting it done by a pro but that cost is your choice in the end but it can be expensive as I looked into it myself.
VHS quality is the best it would ever be without spending huge amounts of time and money as above. what your getting on your DVD is going to be as the content going in.
I have done this myself a few times from VHS and no matter what settings I chose and no matter how big the bit rate, file size, up-scaling options etc the quality was always the same, the phrase "rubbish in, rubbish out" comes to mind.

I'm not sure what to make of your last comment."Rubbish in, rubbish out" clearly means that the quality isn't going to improve with the digitization. But in your experience, how much and what do you think you lost the most? What sort of detail? Audio or visual?

VHS is not a great format to start with, it was made for consumers to use and not professionals, I didn't loose quality but didn't gain any either it looks pretty much the same as the original but it wont get any worse with tape stretching, mold, fungus etc. depending on the quality of your tapes can make a difference in the quality you get out, tapes with stretch, mold etc will not look as good as brand new tape never been used before

One big loss in converting VHS to DVD arises from going through the composite domain. Both VHS and MPEG2 use a separated chroma paradigm -- on the VHS tape are two signals, essentially luma and bandwidth-limited chroma. MPEG2 (the standard for DVD) also uses separate luma and chroma. But the standard output from a VHS player combines the signals in a way that means the MPEG2 encoder must do a rather imperfect job of unmixing them again.
One solution, such as it is, would be to use a VHS player that has separate luma and chroma outputs, called S-Video, and an encoder that can work directly with S-Video components.
I'm not saying you'll get beautiful results, because nothing about VHS is beautiful to begin with. But you would be sure of getting a conversion that doesn't suffer unnecessary losses.

They came in as .ogg??  I thought you converted to dvd?  Are you talking about then ripping the DVD video with HandBrake or something?
Also, you're doing something wrong, or at least have your file extension -> "open with" settings screwed up if renaming a .ogg to a .mp4 is necessary.  Maybe it opens with a different player then, and only the player associated with .mp4 is actually working on your computer?  (.ogm is the usual extension for ogg video;  Maybe you have .ogg associated with an audio-only player?)
Anyway, you're doing several steps here:

capture a digital version of the video signal from your VCR
encode that to MPEG2 dvd
transcode the lossy MPEG2 to something a video codec that can go in a .ogg container.  edit (apparently just remux, not xcode, so no quality loss at this step after all).

The achievable quality of step 1 is fairly limited, since the representation stored on the magnetic VHS tapes is of limited quality.
Because of the limited quality of the source, you're probably not losing much quality from having a lossy intermediate codec.  Obviously it would be better to go directly from capture -> final, with only lossless steps in between (e.g. capture card in a computer, capture to a lossless file.  Or encode in realtime to the final format.)
EDIT: turns out you're just remuxing the dvd-video into an ogg container, not transcoding.  I didn't think ogm could hold mpeg2, but I guess it can, and for some reason you're using some software that defaults to muxing into an ogg container.
You ARE probably losing quality if your final output is going into an ogg container, though.  It's probably Theora video, which is obsolete (and has a much worse quality vs. bitrate tradeoff than VP8 or x264).
A player like VLC or mpv will let you see the codec details of your video.  Or just use mediainfo.
Unless you're archiving in a lossless format (50x the filesize of visually-indistinguishable lossy), you might want to apply some filtering to clean up the video from the VHS tapes before encoding.  Depending on the condition of the tapes, they might have significant chroma noise that a denoise filter could help with.  This will require some playing around.
edit: if you're going to stick with a capture device that doesn't give access to the digital video except after it encodes to MPEG2 (and makes a trivial menu to make a complete DVD-VIDEO), xcoding the MPEG2 to lossless would only be useful if you wanted to apply some filtering.  Never xcode a lossy codec to lossless.  You'll increase the filesize by a LOT.  The lossy encode is the most compact representation of that exact decoded bitstream, so just save it instead of a lossless representation of decoding the lossy encode.
So, if you can get deinterlace/denoise filtering to work well enough "on-the-fly" in realtime, then you can use dvd images straight from the Magnavox as your archival masters.  In 10 or 20 years, there might be smarter filters that will do a better job, so it's best to keep the source, as long as it's in a state that's usable in realtime.
If you can't get the necessary filtering to run well on-the-fly on at least your library computers, then you should probably deinterlace and maybe even denoise now, and make either lossless h.264, FFv1, or something lossy.  mcdeint is slow, but does a good job.  (don't just use yadif for master copies.)  You'd need to decide whether to archive at 720x480p60, or throw away half the temporal resolution and deinterlace 720x480i60 -> 720x480p30.  The decision is somewhat content-dependent, but if you're using a codec with inter-prediction (P and B frames), like h.264, then higher fps means frames are more similar to each other, so it takes much less than twice as much space to compress twice the FPS at the same quality.
http://linux.goeszen.com/digitising-vhs-tapes-on-linux.html has some stuff to say about it.
http://ubuntuforums.org/showthread.php?t=2091899 suggests hqdn3d as a denoise filter.  That sounds right; I would have tried that one first over any of ffmpeg's other postprocessing filters, if I was trying to do this myself.
end of edit
You'll want to read up on video codecs to make a decision on which one to use for archival storage. VP8 and VP9 are free from patent royalties.  h.264 and h.265 aren't, but patents don't live forever, and h.264 is the current playable-by-everything standard for video.  You'll want to check up on the patent royalty situation, but as long as you aren't selling access to h.264 video, you shouldn't owe any fees.  The best h.264 encoder in the world is x264, which is free and open source, and very mature and well optimized.
h.265 is next-gen, and x265 is still very slow, but can get better quality at the same bitrates as x264.  Google's VP9 encoder is somewhat better than x264 for quality-per-bitrate, but takes at least 10x longer to encode.  VP8 is not bad, but I think it's a bit worse quality-per-bitrate (aka rate-distortion) compared to x264.  (both with near-maxed CPU-usage settings).
If you want library patrons to play files on their own devices right now, I'd suggest going with h.264 because of the massive compatibility advantage over any other format.  If we're only talking about playback on library-owned computers, I might play around with VP9.
For future-proofing, every player for the next 50 years at least will support h.264, I'd guess.  I think H.264 for video will be like mp3 for audio: people will still be using it LONG after it's obsolete, because it's the first format that doesn't completely suck, and that has widespread player support for everything from streaming to files to videoconferencing.
edit: keeping the original VHS is of limited value.  They will continue to degrade, but digital files won't.  If you can afford the space in temp-controlled storage, it won't HURT to keep them, but the sooner you get them capped with high-quality analog equipment the better.  I'd keep them for at least a couple years after doing the initial digital conversion, in case you discover a problem or error with the digital setup and need to redo it!

Thanks for the detailed response. A lot of great information there. I edited the question with a bit of additional info. It's interesting what you are saying about the ogg files. Someone else did the transfer on a Magnavox ZV427MG9. The manual does not say which codec it uses, but Gspot says mpeg2. I was asked to copy playable files off the DVDs, and what I found when opening them were ogg files that would not play. But if I changed the file extension to mp4, they played. I must have gotten that trick from somewhere on the interwebs.

You probably didn't just copy the files from the DVD, then.  If you had, you'd have a directory of files like VIDEO_TS/VTS_01_0.VOB, VIDEO_TS/VTS_01_1.VOB, etc.  Or a .iso image containing those files.  If the copy went fast, then maybe the software you used remuxed the MPEG2 video stream into a .ogg container.  If it was slow, and used 100% CPU, then it transcoded from MPEG2 to something that it stored in a .ogg.

Your Magnavox device almost certainly makes standard DVDs.  copy DVDs by mounting them like you would for a data DVD, and copying the VIDEO_TS directory.  Many players (like mpv or vlc) can play dvd images from a directory instead of a disk.  e.g. mpv dvd:// --dvd-device=/path/to/VIDEO_TS.

ffmpeg itself can't read a "title" from a dvd image, so you have to use tccat or something to dump the main title to a single mpeg2 stream, usually in a .ts container.  (or pipe it directly into ffmpeg)  Google up how to dvd->mkv or dvd->mp4 with ffmpeg, or GUI frontends for doing what's needed.

Or just archive the DVD images, if they're not too big.  MPEG2 is not an efficient codec (quality per bitrate), and hardware encoders usually don't come close to what a good software encoder could do with the same source data.  However, since your VHS cap setup only caps in MPEG2, that's the highest quality digital version of your video that you have access to.  Anything you transcode the DVD to will have another generation of loss.  (It might look better, though, if you use some filters to deinterlace and/or clean up VHS chroma noise.)

Ugh, I led some on a wild goose chase. See my edit to original post. Thanks for correcting me. So, now that we know that they are converted into standard DVDs, is "You ARE probably losing quality if your final output is going into an ogg container, though. It's probably Theora video, which is obsolete (and has a much worse quality vs. bitrate tradeoff than VP8 or x264)." still true?

Container doesn't matter, you can remux all you like.  If you're seeing .VOB files, you're seeing your video in the format the Magnavox generates, with no further generation-loss.  Everything I said in my edit about maybe using that MPEG2 stream as your master archival format still applies.  Remember that in 50 years, we might have wall-sized displays (or head-mounted displays that are equivalent), so be careful of doing anything that's going to look more blocky / blurry than the source.


text:
Losing audio in re-encoding with ffmpeg
I have some DVDs I want to save MP4s from. The video files are VOB files. I can play them if I change the extension to .mp4, but I can't use the seek bar in Windows Media Player. Also, the files are very large. I'm using ffmpeg to re-encode them with h.264 and compress. The video is coming out fine, but I'm losing the audio. The command I'm using is:
ffmpeg -loglevel panic -i <input file> -c:v libx264 -preset slow -crf 24 -c:a copy -y <output file>

I can only seem to capture the tail end of the output, but here it is:
frame= 6504 fps= 76 q=30.0 size=   31114kB time=00:03:36.86 bitrate=1175.3kbits/
frame= 6543 fps= 76 q=30.0 size=   31289kB time=00:03:38.20 bitrate=1174.7kbits/
frame= 6582 fps= 76 q=30.0 size=   31447kB time=00:03:39.55 bitrate=1173.4kbits/
frame= 6617 fps= 76 q=30.0 size=   31616kB time=00:03:40.73 bitrate=1173.3kbits/
frame= 6656 fps= 76 q=30.0 size=   31849kB time=00:03:41.95 bitrate=1175.5kbits/
frame= 6690 fps= 76 q=30.0 size=   32024kB time=00:03:43.10 bitrate=1175.9kbits/
frame= 6724 fps= 76 q=30.0 size=   32194kB time=00:03:44.22 bitrate=1176.2kbits/
frame= 6761 fps= 76 q=30.0 size=   32367kB time=00:03:45.47 bitrate=1176.0kbits/
frame= 6797 fps= 76 q=30.0 size=   32551kB time=00:03:46.62 bitrate=1176.6kbits/
frame= 6832 fps= 76 q=30.0 size=   32745kB time=00:03:47.80 bitrate=1177.5kbits/
frame= 6868 fps= 76 q=30.0 size=   32936kB time=00:03:49.02 bitrate=1178.1kbits/
frame= 6909 fps= 76 q=30.0 size=   33157kB time=00:03:50.40 bitrate=1178.9kbits/
frame= 6951 fps= 76 q=30.0 size=   33353kB time=00:03:51.80 bitrate=1178.7kbits/
frame= 6990 fps= 76 q=30.0 size=   33545kB time=00:03:53.08 bitrate=1179.0kbits/
frame= 7028 fps= 76 q=30.0 size=   33739kB time=00:03:54.36 bitrate=1179.3kbits/
frame= 7068 fps= 76 q=30.0 size=   33944kB time=00:03:55.71 bitrate=1179.7kbits/
frame= 7108 fps= 76 q=30.0 size=   34125kB time=00:03:56.99 bitrate=1179.6kbits/
frame= 7149 fps= 76 q=30.0 size=   34348kB time=00:03:58.43 bitrate=1180.1kbits/
frame= 7188 fps= 76 q=30.0 size=   34538kB time=00:03:59.74 bitrate=1180.1kbits/
frame= 7222 fps= 76 q=30.0 size=   34729kB time=00:04:00.86 bitrate=1181.2kbits/
frame= 7257 fps= 76 q=30.0 size=   34955kB time=00:04:01.98 bitrate=1183.3kbits/
frame= 7289 fps= 76 q=30.0 size=   35163kB time=00:04:03.10 bitrate=1184.9kbits/
frame= 7325 fps= 76 q=30.0 size=   35389kB time=00:04:04.28 bitrate=1186.7kbits/
frame= 7364 fps= 76 q=30.0 size=   35580kB time=00:04:05.60 bitrate=1186.8kbits/
frame= 7403 fps= 76 q=30.0 size=   35812kB time=00:04:06.88 bitrate=1188.3kbits/
frame= 7441 fps= 76 q=30.0 size=   35997kB time=00:04:08.12 bitrate=1188.5kbits/
frame= 7485 fps= 76 q=30.0 size=   36188kB time=00:04:09.63 bitrate=1187.5kbits/
frame= 7526 fps= 76 q=30.0 size=   36401kB time=00:04:10.97 bitrate=1188.1kbits/
frame= 7566 fps= 76 q=30.0 size=   36574kB time=00:04:12.32 bitrate=1187.5kbits/
frame= 7606 fps= 76 q=30.0 size=   36746kB time=00:04:13.66 bitrate=1186.7kbits/
frame= 7644 fps= 76 q=30.0 size=   36926kB time=00:04:14.88 bitrate=1186.8kbits/
frame= 7677 fps= 76 q=30.0 size=   37113kB time=00:04:16.00 bitrate=1187.6kbits/
frame= 7711 fps= 76 q=30.0 size=   37317kB time=00:04:17.21 bitrate=1188.5kbits/
frame= 7747 fps= 76 q=30.0 size=   37574kB time=00:04:18.36 bitrate=1191.3kbits/
frame= 7782 fps= 76 q=30.0 size=   37780kB time=00:04:19.52 bitrate=1192.6kbits/
frame= 7814 fps= 76 q=30.0 size=   37985kB time=00:04:20.64 bitrate=1193.9kbits/
frame= 7848 fps= 76 q=30.0 size=   38207kB time=00:04:21.76 bitrate=1195.7kbits/
frame= 7885 fps= 76 q=30.0 size=   38423kB time=00:04:22.91 bitrate=1197.2kbits/
frame= 7924 fps= 76 q=30.0 size=   38615kB time=00:04:24.32 bitrate=1196.8kbits/
frame= 7961 fps= 76 q=30.0 size=   38821kB time=00:04:25.50 bitrate=1197.8kbits/
frame= 7998 fps= 76 q=30.0 size=   39067kB time=00:04:26.72 bitrate=1199.9kbits/
frame= 8034 fps= 76 q=30.0 size=   39290kB time=00:04:27.90 bitrate=1201.4kbits/
frame= 8073 fps= 76 q=30.0 size=   39480kB time=00:04:29.24 bitrate=1201.2kbits/
frame= 8109 fps= 76 q=30.0 size=   39665kB time=00:04:30.40 bitrate=1201.7kbits/
frame= 8152 fps= 76 q=30.0 size=   39885kB time=00:04:31.84 bitrate=1201.9kbits/
frame= 8195 fps= 76 q=30.0 size=   40070kB time=00:04:33.31 bitrate=1201.0kbits/
frame= 8235 fps= 76 q=30.0 size=   40271kB time=00:04:34.62 bitrate=1201.3kbits/
frame= 8275 fps= 76 q=30.0 size=   40464kB time=00:04:35.96 bitrate=1201.2kbits/
frame= 8316 fps= 76 q=30.0 size=   40657kB time=00:04:37.31 bitrate=1201.0kbits/
frame= 8357 fps= 76 q=30.0 size=   40844kB time=00:04:38.68 bitrate=1200.6kbits/
frame= 8395 fps= 76 q=30.0 size=   41050kB time=00:04:39.96 bitrate=1201.1kbits/
frame= 8435 fps= 76 q=30.0 size=   41211kB time=00:04:41.31 bitrate=1200.1kbits/
frame= 8476 fps= 76 q=30.0 size=   41359kB time=00:04:42.72 bitrate=1198.4kbits/
frame= 8520 fps= 76 q=30.0 size=   41520kB time=00:04:44.16 bitrate=1197.0kbits/
frame= 8560 fps= 76 q=30.0 size=   41663kB time=00:04:45.47 bitrate=1195.6kbits/
frame= 8606 fps= 76 q=27.0 size=   41829kB time=00:04:46.97 bitrate=1194.0kbits/
frame= 8646 fps= 76 q=30.0 size=   42010kB time=00:04:48.38 bitrate=1193.3kbits/
frame= 8688 fps= 76 q=30.0 size=   42183kB time=00:04:49.72 bitrate=1192.7kbits/
frame= 8727 fps= 76 q=30.0 size=   42428kB time=00:04:51.07 bitrate=1194.1kbits/
frame= 8766 fps= 76 q=30.0 size=   42598kB time=00:04:52.38 bitrate=1193.5kbits/
frame= 8803 fps= 76 q=30.0 size=   42758kB time=00:04:53.60 bitrate=1193.0kbits/
frame= 8845 fps= 76 q=30.0 size=   42949kB time=00:04:55.00 bitrate=1192.6kbits/
frame= 8886 fps= 76 q=30.0 size=   43110kB time=00:04:56.38 bitrate=1191.6kbits/
frame= 8925 fps= 76 q=30.0 size=   43346kB time=00:04:57.69 bitrate=1192.8kbits/
frame= 8966 fps= 76 q=30.0 size=   43528kB time=00:04:59.04 bitrate=1192.4kbits/
frame= 9009 fps= 76 q=30.0 size=   43725kB time=00:05:00.48 bitrate=1192.1kbits/
frame= 9051 fps= 76 q=30.0 size=   43925kB time=00:05:01.85 bitrate=1192.1kbits/
frame= 9091 fps= 76 q=30.0 size=   44112kB time=00:05:03.23 bitrate=1191.7kbits/
frame= 9132 fps= 76 q=30.0 size=   44309kB time=00:05:04.54 bitrate=1191.9kbits/
frame= 9172 fps= 76 q=30.0 size=   44544kB time=00:05:05.92 bitrate=1192.8kbits/
frame= 9214 fps= 76 q=30.0 size=   44740kB time=00:05:07.29 bitrate=1192.7kbits/
frame= 9256 fps= 76 q=30.0 size=   44919kB time=00:05:08.73 bitrate=1191.9kbits/
frame= 9293 fps= 76 q=30.0 size=   45155kB time=00:05:09.92 bitrate=1193.6kbits/
frame= 9330 fps= 76 q=30.0 size=   45342kB time=00:05:11.20 bitrate=1193.6kbits/
frame= 9370 fps= 76 q=30.0 size=   45553kB time=00:05:12.51 bitrate=1194.1kbits/
frame= 9408 fps= 76 q=30.0 size=   45750kB time=00:05:13.76 bitrate=1194.5kbits/
frame= 9447 fps= 76 q=30.0 size=   45949kB time=00:05:15.07 bitrate=1194.7kbits/
frame= 9484 fps= 76 q=30.0 size=   46136kB time=00:05:16.35 bitrate=1194.7kbits/
frame= 9523 fps= 76 q=30.0 size=   46350kB time=00:05:17.56 bitrate=1195.6kbits/
frame= 9558 fps= 76 q=30.0 size=   46523kB time=00:05:18.81 bitrate=1195.4kbits/
frame= 9596 fps= 76 q=30.0 size=   46726kB time=00:05:20.03 bitrate=1196.1kbits/
frame= 9633 fps= 76 q=30.0 size=   46911kB time=00:05:21.34 bitrate=1195.9kbits/
frame= 9671 fps= 76 q=30.0 size=   47106kB time=00:05:22.56 bitrate=1196.3kbits/
frame= 9710 fps= 76 q=30.0 size=   47289kB time=00:05:23.87 bitrate=1196.1kbits/
frame= 9748 fps= 76 q=30.0 size=   47470kB time=00:05:25.12 bitrate=1196.1kbits/
frame= 9788 fps= 76 q=30.0 size=   47654kB time=00:05:26.46 bitrate=1195.8kbits/
frame= 9825 fps= 76 q=30.0 size=   47845kB time=00:05:27.74 bitrate=1195.9kbits/
frame= 9860 fps= 76 q=30.0 size=   48071kB time=00:05:28.86 bitrate=1197.5kbits/
frame= 9895 fps= 76 q=30.0 size=   48255kB time=00:05:30.01 bitrate=1197.8kbits/
frame= 9932 fps= 76 q=30.0 size=   48456kB time=00:05:31.29 bitrate=1198.2kbits/
frame= 9975 fps= 76 q=30.0 size=   48643kB time=00:05:32.70 bitrate=1197.7kbits/
frame=10013 fps= 76 q=30.0 size=   48825kB time=00:05:33.95 bitrate=1197.7kbits/
frame=10050 fps= 76 q=30.0 size=   49009kB time=00:05:35.26 bitrate=1197.5kbits/
frame=10088 fps= 76 q=30.0 size=   49191kB time=00:05:36.41 bitrate=1197.8kbits/
frame=10130 fps= 76 q=30.0 size=   49348kB time=00:05:37.88 bitrate=1196.4kbits/
frame=10173 fps= 76 q=30.0 size=   49501kB time=00:05:39.32 bitrate=1195.1kbits/
frame=10217 fps= 76 q=30.0 size=   49656kB time=00:05:40.80 bitrate=1193.6kbits/
frame=10259 fps= 76 q=30.0 size=   49825kB time=00:05:42.17 bitrate=1192.9kbits/
frame=10299 fps= 76 q=30.0 size=   50008kB time=00:05:43.52 bitrate=1192.6kbits/
frame=10340 fps= 76 q=30.0 size=   50209kB time=00:05:44.92 bitrate=1192.5kbits/
frame=10380 fps= 76 q=30.0 size=   50377kB time=00:05:46.24 bitrate=1191.9kbits/
frame=10416 fps= 76 q=30.0 size=   50576kB time=00:05:47.39 bitrate=1192.7kbits/
frame=10453 fps= 76 q=30.0 size=   50768kB time=00:05:48.64 bitrate=1192.9kbits/
frame=10493 fps= 76 q=30.0 size=   50959kB time=00:05:49.98 bitrate=1192.8kbits/
frame=10530 fps= 76 q=30.0 size=   51135kB time=00:05:51.26 bitrate=1192.5kbits/
frame=10568 fps= 76 q=27.0 size=   51307kB time=00:05:52.48 bitrate=1192.4kbits/
frame=10607 fps= 76 q=30.0 size=   51515kB time=00:05:53.76 bitrate=1192.9kbits/
frame=10647 fps= 76 q=30.0 size=   51696kB time=00:05:55.10 bitrate=1192.6kbits/
frame=10680 fps= 76 q=30.0 size=   51866kB time=00:05:56.25 bitrate=1192.6kbits/
frame=10714 fps= 76 q=30.0 size=   52064kB time=00:05:57.37 bitrate=1193.4kbits/
frame=10749 fps= 76 q=30.0 size=   52276kB time=00:05:58.49 bitrate=1194.6kbits/
frame=10784 fps= 76 q=30.0 size=   52486kB time=00:05:59.71 bitrate=1195.3kbits/
frame=10822 fps= 76 q=30.0 size=   52677kB time=00:06:00.92 bitrate=1195.6kbits/
frame=10859 fps= 76 q=30.0 size=   52878kB time=00:06:02.24 bitrate=1195.8kbits/
frame=10894 fps= 76 q=30.0 size=   53069kB time=00:06:03.32 bitrate=1196.5kbits/
frame=10930 fps= 76 q=30.0 size=   53266kB time=00:06:04.54 bitrate=1197.0kbits/
frame=10969 fps= 76 q=30.0 size=   53462kB time=00:06:05.92 bitrate=1196.9kbits/
frame=11007 fps= 76 q=30.0 size=   53676kB time=00:06:07.13 bitrate=1197.7kbits/
frame=11047 fps= 76 q=30.0 size=   53854kB time=00:06:08.41 bitrate=1197.5kbits/
frame=11086 fps= 76 q=30.0 size=   54028kB time=00:06:09.79 bitrate=1196.9kbits/
frame=11124 fps= 76 q=30.0 size=   54202kB time=00:06:11.04 bitrate=1196.7kbits/
frame=11165 fps= 76 q=30.0 size=   54380kB time=00:06:12.41 bitrate=1196.2kbits/
frame=11201 fps= 76 q=30.0 size=   54542kB time=00:06:13.60 bitrate=1195.9kbits/
frame=11241 fps= 76 q=30.0 size=   54751kB time=00:06:14.94 bitrate=1196.2kbits/
frame=11279 fps= 76 q=30.0 size=   54929kB time=00:06:16.25 bitrate=1195.9kbits/
frame=11314 fps= 76 q=30.0 size=   55106kB time=00:06:17.37 bitrate=1196.2kbits/
frame=11353 fps= 76 q=30.0 size=   55313kB time=00:06:18.62 bitrate=1196.8kbits/
frame=11389 fps= 76 q=30.0 size=   55504kB time=00:06:19.84 bitrate=1197.0kbits/
frame=11426 fps= 76 q=30.0 size=   55696kB time=00:06:21.12 bitrate=1197.2kbits/
frame=11464 fps= 76 q=30.0 size=   55895kB time=00:06:22.40 bitrate=1197.4kbits/
frame=11500 fps= 76 q=30.0 size=   56110kB time=00:06:23.58 bitrate=1198.3kbits/
frame=11537 fps= 76 q=30.0 size=   56280kB time=00:06:24.80 bitrate=1198.2kbits/
frame=11572 fps= 76 q=30.0 size=   56464kB time=00:06:25.98 bitrate=1198.4kbits/
frame=11610 fps= 76 q=30.0 size=   56663kB time=00:06:27.26 bitrate=1198.6kbits/
frame=11647 fps= 76 q=30.0 size=   56863kB time=00:06:28.44 bitrate=1199.2kbits/
frame=11683 fps= 76 q=30.0 size=   57060kB time=00:06:29.66 bitrate=1199.6kbits/
frame=11724 fps= 76 q=30.0 size=   57230kB time=00:06:31.07 bitrate=1198.8kbits/
frame=11761 fps= 76 q=30.0 size=   57415kB time=00:06:32.28 bitrate=1199.0kbits/
frame=11798 fps= 76 q=30.0 size=   57592kB time=00:06:33.53 bitrate=1198.9kbits/
frame=11834 fps= 76 q=30.0 size=   57797kB time=00:06:34.75 bitrate=1199.4kbits/
frame=11872 fps= 76 q=30.0 size=   58030kB time=00:06:36.00 bitrate=1200.5kbits/
frame=11912 fps= 76 q=30.0 size=   58214kB time=00:06:37.34 bitrate=1200.2kbits/
frame=11952 fps= 76 q=30.0 size=   58381kB time=00:06:38.62 bitrate=1199.8kbits/
frame=11993 fps= 76 q=30.0 size=   58552kB time=00:06:40.03 bitrate=1199.0kbits/
frame=12035 fps= 76 q=30.0 size=   58725kB time=00:06:41.47 bitrate=1198.3kbits/
frame=12077 fps= 76 q=30.0 size=   58911kB time=00:06:42.88 bitrate=1197.9kbits/
frame=12116 fps= 76 q=30.0 size=   59117kB time=00:06:44.12 bitrate=1198.3kbits/
frame=12154 fps= 76 q=30.0 size=   59303kB time=00:06:45.40 bitrate=1198.3kbits/
frame=12190 fps= 76 q=30.0 size=   59492kB time=00:06:46.59 bitrate=1198.6kbits/
frame=12222 fps= 76 q=30.0 size=   59716kB time=00:06:47.68 bitrate=1199.9kbits/
frame=12259 fps= 76 q=30.0 size=   59912kB time=00:06:48.96 bitrate=1200.1kbits/
frame=12299 fps= 76 q=30.0 size=   60099kB time=00:06:50.24 bitrate=1200.1kbits/
frame=12336 fps= 76 q=30.0 size=   60309kB time=00:06:51.48 bitrate=1200.6kbits/
frame=12374 fps= 76 q=30.0 size=   60553kB time=00:06:52.73 bitrate=1201.8kbits/
frame=12412 fps= 76 q=30.0 size=   60744kB time=00:06:53.98 bitrate=1202.0kbits/
frame=12445 fps= 76 q=30.0 size=   60910kB time=00:06:55.07 bitrate=1202.1kbits/
frame=12479 fps= 76 q=30.0 size=   61102kB time=00:06:56.22 bitrate=1202.6kbits/
frame=12515 fps= 76 q=30.0 size=   61285kB time=00:06:57.47 bitrate=1202.6kbits/
frame=12555 fps= 76 q=30.0 size=   61436kB time=00:06:58.78 bitrate=1201.8kbits/
frame=12595 fps= 76 q=30.0 size=   61588kB time=00:07:00.12 bitrate=1200.9kbits/
frame=12634 fps= 76 q=30.0 size=   61782kB time=00:07:01.47 bitrate=1200.8kbits/
frame=12670 fps= 76 q=30.0 size=   61967kB time=00:07:02.62 bitrate=1201.1kbits/
frame=12709 fps= 76 q=30.0 size=   62147kB time=00:07:03.96 bitrate=1200.8kbits/
frame=12751 fps= 76 q=30.0 size=   62335kB time=00:07:05.37 bitrate=1200.5kbits/
frame=12793 fps= 76 q=30.0 size=   62515kB time=00:07:06.68 bitrate=1200.2kbits/
frame=12835 fps= 76 q=30.0 size=   62695kB time=00:07:08.12 bitrate=1199.6kbits/
frame=12873 fps= 76 q=30.0 size=   62920kB time=00:07:09.37 bitrate=1200.4kbits/
frame=12910 fps= 76 q=30.0 size=   63082kB time=00:07:10.62 bitrate=1200.0kbits/
frame=12951 fps= 76 q=30.0 size=   63280kB time=00:07:11.96 bitrate=1200.1kbits/
frame=12989 fps= 76 q=30.0 size=   63464kB time=00:07:13.24 bitrate=1200.0kbits/
frame=13028 fps= 76 q=30.0 size=   63637kB time=00:07:14.56 bitrate=1199.6kbits/
frame=13068 fps= 76 q=30.0 size=   63811kB time=00:07:15.93 bitrate=1199.1kbits/
frame=13109 fps= 76 q=30.0 size=   64019kB time=00:07:17.21 bitrate=1199.5kbits/
frame=13146 fps= 76 q=30.0 size=   64190kB time=00:07:18.52 bitrate=1199.1kbits/
frame=13186 fps= 76 q=30.0 size=   64369kB time=00:07:19.84 bitrate=1198.9kbits/
frame=13223 fps= 76 q=30.0 size=   64533kB time=00:07:21.08 bitrate=1198.5kbits/
frame=13263 fps= 76 q=30.0 size=   64701kB time=00:07:22.43 bitrate=1198.0kbits/
frame=13300 fps= 76 q=30.0 size=   64892kB time=00:07:23.64 bitrate=1198.2kbits/
frame=13339 fps= 76 q=30.0 size=   65068kB time=00:07:24.96 bitrate=1198.0kbits/
frame=13378 fps= 76 q=30.0 size=   65257kB time=00:07:26.20 bitrate=1198.1kbits/
frame=13418 fps= 76 q=30.0 size=   65405kB time=00:07:27.58 bitrate=1197.1kbits/
frame=13457 fps= 76 q=30.0 size=   65547kB time=00:07:28.89 bitrate=1196.2kbits/
frame=13500 fps= 76 q=30.0 size=   65690kB time=00:07:30.33 bitrate=1195.0kbits/
frame=13545 fps= 76 q=30.0 size=   65855kB time=00:07:31.80 bitrate=1194.1kbits/
frame=13589 fps= 76 q=30.0 size=   66003kB time=00:07:33.28 bitrate=1192.9kbits/
frame=13632 fps= 76 q=30.0 size=   66168kB time=00:07:34.68 bitrate=1192.1kbits/
frame=13674 fps= 76 q=30.0 size=   66317kB time=00:07:36.09 bitrate=1191.1kbits/
frame=13717 fps= 76 q=30.0 size=   66461kB time=00:07:37.56 bitrate=1189.9kbits/
frame=13752 fps= 76 q=30.0 size=   66580kB time=00:07:38.72 bitrate=1189.0kbits/
frame=13788 fps= 76 q=30.0 size=   66723kB time=00:07:39.96 bitrate=1188.3kbits/
frame=13823 fps= 76 q=30.0 size=   66878kB time=00:07:41.08 bitrate=1188.2kbits/
frame=13861 fps= 76 q=30.0 size=   67064kB time=00:07:42.36 bitrate=1188.2kbits/
frame=13895 fps= 76 q=30.0 size=   67235kB time=00:07:43.45 bitrate=1188.4kbits/
frame=13935 fps= 76 q=30.0 size=   67392kB time=00:07:44.83 bitrate=1187.7kbits/
frame=13975 fps= 76 q=30.0 size=   67541kB time=00:07:46.14 bitrate=1187.0kbits/
frame=14014 fps= 76 q=30.0 size=   67685kB time=00:07:47.48 bitrate=1186.1kbits/
frame=14055 fps= 76 q=30.0 size=   67831kB time=00:07:48.86 bitrate=1185.1kbits/
frame=14098 fps= 76 q=30.0 size=   67976kB time=00:07:50.27 bitrate=1184.1kbits/
frame=14129 fps= 76 q=30.0 size=   68144kB time=00:07:51.29 bitrate=1184.5kbits/
frame=14165 fps= 76 q=30.0 size=   68328kB time=00:07:52.51 bitrate=1184.6kbits/
frame=14200 fps= 76 q=30.0 size=   68518kB time=00:07:53.66 bitrate=1185.0kbits/
frame=14234 fps= 76 q=30.0 size=   68708kB time=00:07:54.81 bitrate=1185.4kbits/
frame=14273 fps= 76 q=30.0 size=   68881kB time=00:07:56.06 bitrate=1185.3kbits/
frame=14310 fps= 76 q=30.0 size=   69057kB time=00:07:57.37 bitrate=1185.0kbits/
frame=14342 fps= 76 q=30.0 size=   69246kB time=00:07:58.46 bitrate=1185.6kbits/
frame=14370 fps= 76 q=30.0 size=   69455kB time=00:07:59.39 bitrate=1186.9kbits/
frame=14398 fps= 76 q=30.0 size=   69663kB time=00:08:00.28 bitrate=1188.2kbits/
frame=14432 fps= 76 q=30.0 size=   69869kB time=00:08:01.44 bitrate=1188.9kbits/
frame=14468 fps= 76 q=30.0 size=   70070kB time=00:08:02.59 bitrate=1189.4kbits/
frame=14503 fps= 76 q=30.0 size=   70253kB time=00:08:03.77 bitrate=1189.6kbits/
frame=14539 fps= 76 q=30.0 size=   70456kB time=00:08:04.96 bitrate=1190.2kbits/
frame=14576 fps= 76 q=30.0 size=   70648kB time=00:08:06.20 bitrate=1190.3kbits/
frame=14612 fps= 76 q=30.0 size=   70874kB time=00:08:07.45 bitrate=1191.1kbits/
frame=14643 fps= 76 q=30.0 size=   71048kB time=00:08:08.48 bitrate=1191.5kbits/
frame=14676 fps= 76 q=30.0 size=   71237kB time=00:08:09.56 bitrate=1192.0kbits/
frame=14710 fps= 76 q=30.0 size=   71436kB time=00:08:10.68 bitrate=1192.6kbits/
frame=14743 fps= 76 q=30.0 size=   71623kB time=00:08:11.80 bitrate=1193.0kbits/
frame=14777 fps= 76 q=30.0 size=   71796kB time=00:08:12.96 bitrate=1193.1kbits/
frame=14810 fps= 76 q=30.0 size=   72035kB time=00:08:14.04 bitrate=1194.4kbits/
frame=14841 fps= 76 q=30.0 size=   72239kB time=00:08:15.07 bitrate=1195.4kbits/
frame=14869 fps= 76 q=30.0 size=   72409kB time=00:08:16.00 bitrate=1195.9kbits/
frame=14899 fps= 76 q=30.0 size=   72585kB time=00:08:17.02 bitrate=1196.3kbits/
frame=14932 fps= 75 q=30.0 size=   72789kB time=00:08:18.11 bitrate=1197.1kbits/
frame=14964 fps= 75 q=30.0 size=   72983kB time=00:08:19.16 bitrate=1197.7kbits/
frame=14997 fps= 75 q=30.0 size=   73176kB time=00:08:20.28 bitrate=1198.2kbits/
frame=15029 fps= 75 q=30.0 size=   73363kB time=00:08:21.34 bitrate=1198.8kbits/
frame=15060 fps= 75 q=30.0 size=   73615kB time=00:08:22.40 bitrate=1200.3kbits/
frame=15094 fps= 75 q=30.0 size=   73824kB time=00:08:23.48 bitrate=1201.2kbits/
frame=15125 fps= 75 q=30.0 size=   74011kB time=00:08:24.54 bitrate=1201.7kbits/
frame=15158 fps= 75 q=30.0 size=   74196kB time=00:08:25.63 bitrate=1202.1kbits/
frame=15189 fps= 75 q=30.0 size=   74373kB time=00:08:26.68 bitrate=1202.4kbits/
frame=15222 fps= 75 q=30.0 size=   74564kB time=00:08:27.77 bitrate=1203.0kbits/
frame=15254 fps= 75 q=30.0 size=   74744kB time=00:08:28.89 bitrate=1203.2kbits/
frame=15285 fps= 75 q=30.0 size=   74912kB time=00:08:29.92 bitrate=1203.5kbits/
frame=15319 fps= 75 q=30.0 size=   75141kB time=00:08:31.04 bitrate=1204.5kbits/
frame=15352 fps= 75 q=30.0 size=   75337kB time=00:08:32.09 bitrate=1205.2kbits/
frame=15384 fps= 75 q=30.0 size=   75558kB time=00:08:33.18 bitrate=1206.1kbits/
frame=15412 fps= 75 q=30.0 size=   75731kB time=00:08:34.11 bitrate=1206.7kbits/
frame=15444 fps= 75 q=30.0 size=   75912kB time=00:08:35.20 bitrate=1207.1kbits/
frame=15475 fps= 75 q=30.0 size=   76099kB time=00:08:36.22 bitrate=1207.6kbits/
frame=15504 fps= 75 q=30.0 size=   76294kB time=00:08:37.21 bitrate=1208.4kbits/
frame=15534 fps= 75 q=30.0 size=   76488kB time=00:08:38.17 bitrate=1209.2kbits/
frame=15564 fps= 75 q=30.0 size=   76711kB time=00:08:39.20 bitrate=1210.4kbits/
frame=15597 fps= 75 q=30.0 size=   76910kB time=00:08:40.28 bitrate=1211.0kbits/
frame=15627 fps= 75 q=30.0 size=   77101kB time=00:08:41.24 bitrate=1211.7kbits/
frame=15661 fps= 75 q=30.0 size=   77296kB time=00:08:42.43 bitrate=1212.0kbits/
frame=15697 fps= 75 q=30.0 size=   77488kB time=00:08:43.61 bitrate=1212.3kbits/
frame=15732 fps= 75 q=30.0 size=   77681kB time=00:08:44.76 bitrate=1212.7kbits/
frame=15767 fps= 75 q=30.0 size=   77862kB time=00:08:45.98 bitrate=1212.7kbits/
frame=15801 fps= 75 q=30.0 size=   78069kB time=00:08:47.10 bitrate=1213.3kbits/
frame=15833 fps= 75 q=30.0 size=   78244kB time=00:08:48.16 bitrate=1213.6kbits/
frame=15867 fps= 75 q=30.0 size=   78441kB time=00:08:49.28 bitrate=1214.1kbits/
frame=15897 fps= 75 q=30.0 size=   78609kB time=00:08:50.30 bitrate=1214.3kbits/
frame=15930 fps= 75 q=30.0 size=   78808kB time=00:08:51.42 bitrate=1214.8kbits/
frame=15963 fps= 75 q=30.0 size=   79018kB time=00:08:52.51 bitrate=1215.6kbits/
frame=15996 fps= 75 q=30.0 size=   79228kB time=00:08:53.56 bitrate=1216.4kbits/
frame=16027 fps= 75 q=30.0 size=   79434kB time=00:08:54.62 bitrate=1217.2kbits/
frame=16059 fps= 75 q=30.0 size=   79624kB time=00:08:55.68 bitrate=1217.7kbits/
frame=16103 fps= 75 q=30.0 size=   79806kB time=00:08:57.15 bitrate=1217.1kbits/
frame=16148 fps= 75 q=30.0 size=   79984kB time=00:08:58.68 bitrate=1216.3kbits/
frame=16189 fps= 75 q=30.0 size=   80149kB time=00:09:00.00 bitrate=1215.9kbits/
frame=16230 fps= 75 q=30.0 size=   80308kB time=00:09:01.40 bitrate=1215.1kbits/
frame=16273 fps= 75 q=30.0 size=   80500kB time=00:09:02.81 bitrate=1214.9kbits/
frame=16311 fps= 75 q=30.0 size=   80679kB time=00:09:04.16 bitrate=1214.6kbits/
frame=16346 fps= 75 q=30.0 size=   80861kB time=00:09:05.31 bitrate=1214.7kbits/
frame=16376 fps= 75 q=30.0 size=   81043kB time=00:09:06.24 bitrate=1215.4kbits/
frame=16407 fps= 75 q=30.0 size=   81229kB time=00:09:07.32 bitrate=1215.8kbits/
frame=16439 fps= 75 q=30.0 size=   81413kB time=00:09:08.38 bitrate=1216.2kbits/
frame=16469 fps= 74 q=30.0 size=   81588kB time=00:09:09.37 bitrate=1216.6kbits/
frame=16503 fps= 74 q=30.0 size=   81787kB time=00:09:10.17 bitrate=1217.8kbits/
frame=16515 fps= 74 q=-1.0 Lsize=   82483kB time=00:09:10.98 bitrate=1226.4kbits
/s
video:56333kB audio:25809kB subtitle:0kB other streams:0kB global headers:0kB mu
xing overhead: 0.414423%
[libx264 @ 044828a0] frame I:74    Avg QP:23.62  size: 31695
[libx264 @ 044828a0] frame P:4215  Avg QP:26.02  size:  8043
[libx264 @ 044828a0] frame B:12226 Avg QP:28.60  size:  1753
[libx264 @ 044828a0] consecutive B-frames:  0.5%  0.4%  5.7% 93.4%
[libx264 @ 044828a0] mb I  I16..4: 17.7% 65.8% 16.4%
[libx264 @ 044828a0] mb P  I16..4:  0.6%  1.3%  0.2%  P16..4: 47.6% 13.8% 10.1%
 0.0%  0.0%    skip:26.4%
[libx264 @ 044828a0] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 39.1%  2.6%  0.6%
 direct: 1.3%  skip:56.3%  L0:49.5% L1:46.9% BI: 3.5%
[libx264 @ 044828a0] 8x8 transform intra:61.7% inter:77.0%
[libx264 @ 044828a0] direct mvs  spatial:100.0% temporal:0.0%
[libx264 @ 044828a0] coded y,uvDC,uvAC intra: 68.2% 68.4% 23.7% inter: 12.8% 17.
0% 1.0%
[libx264 @ 044828a0] i16 v,h,dc,p: 24% 42%  6% 28%
[libx264 @ 044828a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12%  8%  9%  9% 14% 11% 13%
 9% 14%
[libx264 @ 044828a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 23%  6%  7% 10%  8% 12%
 9% 15%
[libx264 @ 044828a0] i8c dc,h,v,p: 32% 33% 18% 17%
[libx264 @ 044828a0] Weighted P-Frames: Y:1.2% UV:0.2%
[libx264 @ 044828a0] ref P L0: 37.6% 12.0% 27.8%  8.4% 13.5%  0.8%  0.0%
[libx264 @ 044828a0] ref B L0: 54.4% 29.2% 12.4%  3.9%
[libx264 @ 044828a0] ref B L1: 88.2% 11.8%
[libx264 @ 044828a0] kb/s:837.45

H:\HHVL\Scripts>

Please show the complete console output from your command (without -loglevel).

I'm trying...The output is too long to copy. I tried: ffmpeg -i "HAMMER Training Water Hammer  Prop Room 16.mp4" -c:v libx264 -preset slow -crf 24 -c:a copy -y test.mp4 > output.txt, But nothing is showing up in the file.

@LordNeckbeard any suggestions? I tried dir > output.txt and it performed as expected.

Unfortunately I need the complete console output. You can trim the repeating frame= lines.

I just can't copy them. The command window only stores so much. It's unfortunate that redirecting to a file is not working.

add a '-t 5' after -i . The console output should be small enough for complete capture. 2) if that's too big, run ffprobe -i  3) your audio bitrate is roughly 384 kbps. Seems like AC-3 6 ch. I'm not too sure, but I don't think ISO MP4 container takes AC-3. You may have to encode audio to AAC.

And to redirect to a file suffix "2> logfile.txt" to your command like this "ffmpeg -i ..... -y  2> logfile.txt".

IDK why exactly ffmpeg in a Windows cmd window doesn't update its status line in place like it's supposed to, instead of scrolling up the screen.  To work around it, use FFREPORT=file=ffreport.txt ffmpeg ... to run ffmpeg with the FFREPORT environment variable set (so it can log before even parsing its command line).  Or if that doesn't work in cmd.exe, then ffmpeg -report ....

If the input is VOBs, you might do better with treating them as an actual DVD, and using one title.  This can avoid timestamp jumps and other stuff you can get when a single video spans multiple VOBs.

@PeterCordes I'm beginning to think that is the best approach. I should just rip the DVDs to MP4s. I can probably find some free utility to do that.

I forget if ffmpeg can parse dvds directly.  If not, transcode has a handy tool called tccat to dump the stream from a dvd to an MPEG transport-stream.  See http://gentoovps.net/dvd-to-h264/ for example.

Apparently, ffmpeg can do it, but only by amalgamating the VOBs. Here and here


text:
AE - Composition video file/layer missing audio
In my case, I'm working with a file that does have audio, confirmed in the RAM preview and other checks mentioned above, however, I noticed after rendering, the first video file ha no audio (not even in the RAM preview any longer, the video layer is like my other imported video layers and still has the little audio icon with it). I had a audio fade-in on it but it worked before in the RAM preview and my audio fade-out on the last video still works fine. Some little option somewhere got toggled and yeah.... somewhere in there in those many great options AE provides...
The link to my .aep and project files on Google Drive:

http://goo.gl/PJI2nz

and to my audio fade-out working, but no audio in the first half of the video:

https://youtu.be/pMf5JLBIPQk?t=1h35m22s

Thanks for any help.  :)

Make sure that audio is on in your output module. In versions prior to CC you had two choices: on and off, recently they've added an automatic function that turns on audio rendering if the comp has audio.
In the render queue you'll see this if you twirl down the output module triangle:

And you can set audio rendering in the output module window:

Note that the output module is what determines whether audio gets rendered. It can be on when you do a RAM preview, but if it aint on in the output module, you aint gettin' it.

I don't see that option in my Adobe Media Encoder CC.
See

My answer is for rendering from AE. That pic looks like you've got Media Encoder set up ok. Can you use something like ffprobe or mediainfo to check whether there is an audio stream present? The lack of audio could mean: • there's no audio stream, • there is an audio stream which is silent, or • there's something preventing you from playing the audio properly in the encoded file.

I don't have enough reputation to select this as the answer yet but the Audio Output On was the trick. Pardon I didn't try it earlier. Thanks @stib

@Mikeumus Nice it's solved now - you can't upvote at the moment, I could upvote for you ;), but please mark it as solved - below the reputation arrows, see the tour: http://video.stackexchange.com/tour. Thanks.

Make sure the sound icon of the layer is enabled and check the audio waveform of the layer in your composition at this time.

For RAM Audio Preview see this answer: How can I preview with audio in After Effects and be able to pause / resume the preview?

My video layer did indeed have a waveform and the audio icon was checked "on". It was when I followed your RAM Preview answer using the "0" key to activate the playback that on about the 7th or so try, the audio finally faded in on the playback as excepted. Rendering now in the Media Encoder. Will report back once the file is rendered. Thanks.

Turns out my render didn't have audio in the same style as my youtube link above. :(

@Mikeumus If ram preview is fine, check your render settings.

everything is setup to render the audio. I'm using the YouTube 720p present.

@Mikeumus But you've also checked the keyframes right?

I have two keyframes (little white diamond shapes) that do a audio fade-in (-48dbs - 0 dbs). The last RAM Preview I did, the audio fade-in from those key frames seemed to be working.

@Mikeumus ok thanks for checking - sounds right :) you can also try to encode it directly in after effects. Go to the comp that looks ok and hit CTRL+M to add it to the render queue. You could render it as uncompressed and encode it later with media encoder to your youtube preference.

ok sounds good. I've got to try something. Thanks.


text:
How can I stay motivated and become more productive as a video editor?
I really like the editing process, how it's possible to bring a vision you've had to life, by timing things just right, etc. It's a great art.
Unfortunately I am super un-productive at it. This has been a pattern for me for a long time. Editing always takes the longest time and it a huge dread for me. I have several projects that I failed to complete once they got into the editing stage.
Often I am quite excited at first, piecing together one sequence that's viewable pretty fast.
From there it's downhill. I lose all kinds of motivation, excitement, or passion, and the process is tiring me out. Trimming the 150th cut, fixing the 96th issue, finding just the right 3 seconds from a 4 minute clip... It just becomes sooo dreadful and overwhelming. Even if I made it through putting potentially usable clips, which I pre-trimmed, in a somewhat useful order, it becomes tiring to go through the footage again, and yet again find just the right frame in the 200 frame clip... phew. Another thing that always frustrates me is when my material just isn't any good. I am missing important shots or angles or whatever, or the existing ones have giant mistakes in them, which makes the clip hard or impossible to use.
Overall my output is pretty good after the first session (after I piece together the first usable bit) but for the rest of the project things just take forever and drag out endlessly. As I said, I have some projects that are still not completely edited.
I mean generally this sounds like any project you could do (not just video related) : At first the motivation is high, but then it steadily declines and things become a dread. Perseverance makes or brakes success. For me personally though, editing is extremely affected by this problem.
Has anyone had this issue, too, and found good ways to overcome it? Are there any techniques I could use that are rewarding, or at least help me stay productive? Any guidelines or "recipes" I could follow that give me a different perspective? Has anyone ever successfully applied Scrum to editing?

I guess I just found a very similar question here http://video.stackexchange.com/questions/6910/effective-working-at-audio-video-editing-sessions-avoid-fatigue-making-steady-p Will leave this one open for a little longer to see if there are different ideas.

Whatever you do, stay away from stack exchange when you're supposed to be working. That site just eats up time ;)

Unfortunately you are right ^^ especially that friggin distracting hot topics section... I meant to have Ad block filter that out

Interesting that you mention scrum.  Even large productions tend to have not very many editors; probably not large enough for agile development, at least.  At the same time, having an assistant editor to do all of the assembly, metadata entry, sound sync, and rough edit is how I'd answer your question. Or, maybe you should be the assist, and let someone else do the finishing, if that's where you're most productive. IMHO, the reason for this typical labor division is burnout; both jobs are essentially the same thing in different stages; One's course grit, the other's fine.

I asked this question 4 years ago, here's what I've learned since then (in no specific order):

Break it down into sub-sequences, and finish one short sub-sequence at a time
Get into a mindset of "It doesn't have to be perfect, it just has to be good enough". This helps me, especially when I'm paralyzed from overwhelm. Doing something can be better than doing nothing in such case, and usually the result it still very good.
Make a list with extremely specific tasks (e.g. "finish the project" is too unspecific, you need to say "edit the recap sequence"). Having very specific tasks helps to have clearly defined next action, followed by the rewarding dopamine kick of "yes, I completed it!"
Motivation: Why do it, and why avoid failing at it? What's your goal beyond finishing this project? You've got hell to run from, and heaven to run for. Become clear on your reasons and desired outcomes. Be clear on the negative consequences for not completing it. But motivation alone is not enough, you also need:
Inspiration: This goes beyond "time away from the editing station". You gotta recharge your battery. Do something that reminds you of your motivation (If money is your motivation, go to a store to look at all the stuff you'll buy. Or socialize with friends. Or spend time with a woman. Or go to the movies) Do something that will take your mind off the project and recharge your battery, regularly.
Passion = Motivation + Inspiration. At the end of the day you've gotta love it, you've gotta be excited about what you do and why you're doing it.
Streamline your work by eliminating (recurring) tasks. It has really helped me to become more productive by finding ways to eliminate tasks. Moving away from tapes and to SD cards has obviously helped tremendously. Or another example: I had to re-encode screen capture footage first, before I could import it into my project. Also I had audio recorded on a separate device, so I had to pull it off the device, import it, sync it. Now I figured out how to immediately produce a video file from my screen capture, that's importable and includes the sound. No more re-encoding, no more syncing first, instead I can get right to editing, without any dreadful tasks.
Write scripts! This obviously is too late if you're in the middle of a difficult project right now, but I used to get a lot of "ad lib" footage of people trying to get a point across. 3 takes of rambling makes it very hard to produce something coherent. Writing a script in advance and having your presenter stick to it as much as possible makes deciding on the right take a LOT easier.
Find out what time of the day you're most productive, and protect that time. I've been very bad at that lately, because my schedule has been off. But if I get up at 6 am and start working for 2 or 3 hours before even having breakfast, I get SO MUCH done (if the tasks are clearly defined). The two hours after breakfast from 10 to 12 are still quite productive. But after that it's all downhill. So any day I'm sleeping in, I'm not getting as much done, as I could, therefore delaying the completion of my project.

https://youtu.be/daPmenMTbU4 interesting video that goes into managing your mental energy throughout the day

Do you drink coffee?  That's my solution.
More seriously though - For me, it helps to jump from project to project, setting individual goals each time I move to a different project, e.g. for project 'x', finish creating sub-clips from raw footage before I stop editing.  It also helps to alternate between tasks that are boring and tasks that are more exciting.
In reality, you often don't have the luxury of moving away from a project or boring tasks.  That's when you have to just power through it.  In the end, if you're proud of what you have done, it's always worth it.
It can be extremely frustrating to work with bad material or to have to work in projects with missing shots.  Again, with these situations, there is no secret sauce.  You edit what you can, and do your best to prevent the situation next time.
I hope this helps.
Calvin

To understand what is happening to You in full. I'd suggest getting to know Yerkes-Dodson law which was established in psychology.
The Wikipedia might be helpfull in that manner:
Yerkes-Dodson law
It just depends on the goals that You have while editing the project. You stated that there is lots of repetetive tasks that have to be made while video editing.
Try optimizing the process. Set up Your own dedicated set of hotkeys. In my experience that brings more pleasure at the basic level.

Yerkes-Dodson law... that's gold!! Thanks man!!

This is an old topic, but I'll add anyway. Focus and distraction are difficult for me. To stay motivated and to keep from burning out, try the The Pomodoro Technique The technique uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks.
I'll edit for twenty five minutes, then take a five minute break to stretch, or whatever. Then, repeat the process again and again. This keeps me disciplined, productive yet offers a  reward at the end of each session. It can help anyone get through a time consuming project. Regular breaks AWAY from the editing station will allow you to recharge yet the timer keeps you disciplined.  Try it. The Pomodoro technique