public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Video editing advice on formats and size of file
@ 2011-12-23 14:18 Dale
  2011-12-23 14:45 ` Michael Mol
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Dale @ 2011-12-23 14:18 UTC (permalink / raw
  To: gentoo-user

Howdy,

I been trying to get this to work right for a goooooood while now.  I'm 
confused here.  I have some videos that I download that are split up.  
Some have two or three parts and a few 4 or 5.  What I can't get is 
this, I can't seem to take say two 250Mb videos and make it come 
anywhere near 500Mbs when spliced together.  They usually end up being 
1.5Gb and sometimes much more.  I use Kdenlive to do this with.  I have 
tried every setting that I can find.  I have used exiftool to try to 
match the encoding and rates and all that with no improvement or very 
little improvement.

Is there some secret spice that I am missing or something?  Why can't I 
take two videos and splice them together and it be something close to 
the two file sizes added together?  I'm not asking for a perfect fit but 
at least something close.  If I can get 2 250Mb videos to splice 
together and be 600Mbs, that would be good enough.

Thanks.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-23 14:18 [gentoo-user] Video editing advice on formats and size of file Dale
@ 2011-12-23 14:45 ` Michael Mol
  2011-12-24  1:52   ` Dale
  2011-12-23 14:49 ` [gentoo-user] " Grant Edwards
  2011-12-23 16:29 ` [gentoo-user] " David Haller
  2 siblings, 1 reply; 17+ messages in thread
From: Michael Mol @ 2011-12-23 14:45 UTC (permalink / raw
  To: gentoo-user

Dale wrote:
> Howdy,
>
> I been trying to get this to work right for a goooooood while now. I'm
> confused here. I have some videos that I download that are split up.
> Some have two or three parts and a few 4 or 5. What I can't get is this,
> I can't seem to take say two 250Mb videos and make it come anywhere near
> 500Mbs when spliced together. They usually end up being 1.5Gb and
> sometimes much more. I use Kdenlive to do this with. I have tried every
> setting that I can find. I have used exiftool to try to match the
> encoding and rates and all that with no improvement or very little
> improvement.
>
> Is there some secret spice that I am missing or something? Why can't I
> take two videos and splice them together and it be something close to
> the two file sizes added together? I'm not asking for a perfect fit but
> at least something close. If I can get 2 250Mb videos to splice together
> and be 600Mbs, that would be good enough.

You're probably re-encoding, rather than simply splicing the existing 
streams. The resulting size will necessarily have some quality loss, and 
the resulting file size will depend greatly on the quality of your 
encoder, not just on your settings for codec choice and options.

What you really want to do is repackage the audio and video streams from 
all your files into a single container file.

Back when I was poking "simple" things like this, I used 'avidemux'. 
That was ages ago, and on Ubuntu, but it might work for you. You'd want 
to use 'copy' for your audio and video selection, to avoid any transcoding.

On Ubuntu, I usually had difficulties(read: crashes) with avidemux when 
some tool or library it wanted wasn't installed--it wasn't smart enough 
to remove those options from its menus if those options weren't present. 
I haven't tried it on gentoo; it's plausible someone fixed that either 
upstream or as part of some USE flag awareness in the past couple years.

I expect there are ways to do the exact same thing on the command line 
using ffmpeg, but I'm less familiar with that tool.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* [gentoo-user] Re: Video editing advice on formats and size of file
  2011-12-23 14:18 [gentoo-user] Video editing advice on formats and size of file Dale
  2011-12-23 14:45 ` Michael Mol
@ 2011-12-23 14:49 ` Grant Edwards
  2011-12-24  1:55   ` Dale
  2011-12-23 16:29 ` [gentoo-user] " David Haller
  2 siblings, 1 reply; 17+ messages in thread
From: Grant Edwards @ 2011-12-23 14:49 UTC (permalink / raw
  To: gentoo-user

On 2011-12-23, Dale <rdalek1967@gmail.com> wrote:
> Howdy,
>
> I been trying to get this to work right for a goooooood while now.  I'm 
> confused here.  I have some videos that I download that are split up.  
> Some have two or three parts and a few 4 or 5.  What I can't get is 
> this, I can't seem to take say two 250Mb videos and make it come 
> anywhere near 500Mbs when spliced together.

This always works for me with avi and mpeg files:

 mencoder -oac copy -ovc copy -quiet infile1.avi infile2.avi -o outfile.avi

-- 
Grant






^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-23 14:18 [gentoo-user] Video editing advice on formats and size of file Dale
  2011-12-23 14:45 ` Michael Mol
  2011-12-23 14:49 ` [gentoo-user] " Grant Edwards
@ 2011-12-23 16:29 ` David Haller
  2011-12-24  1:57   ` Dale
  2 siblings, 1 reply; 17+ messages in thread
From: David Haller @ 2011-12-23 16:29 UTC (permalink / raw
  To: gentoo-user

Hello,

On Fri, 23 Dec 2011, Dale wrote:
>Is there some secret spice that I am missing or something?  Why can't
>I take two videos and splice them together and it be something close
>to the two file sizes added together?

If resolutions and codec match, simply use mkvmerge:

mkvmerge -o out.mkv in1.avi in2.avi ...

HTH,
-dnh

-- 
Well I wish you'd just tell me rather than try to engage my enthusiasm.
                                                             -- Marvin



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-23 14:45 ` Michael Mol
@ 2011-12-24  1:52   ` Dale
  2011-12-24  3:26     ` Dale
  0 siblings, 1 reply; 17+ messages in thread
From: Dale @ 2011-12-24  1:52 UTC (permalink / raw
  To: gentoo-user

Michael Mol wrote:
> Dale wrote:
>> Howdy,
>>
>> I been trying to get this to work right for a goooooood while now. I'm
>> confused here. I have some videos that I download that are split up.
>> Some have two or three parts and a few 4 or 5. What I can't get is this,
>> I can't seem to take say two 250Mb videos and make it come anywhere near
>> 500Mbs when spliced together. They usually end up being 1.5Gb and
>> sometimes much more. I use Kdenlive to do this with. I have tried every
>> setting that I can find. I have used exiftool to try to match the
>> encoding and rates and all that with no improvement or very little
>> improvement.
>>
>> Is there some secret spice that I am missing or something? Why can't I
>> take two videos and splice them together and it be something close to
>> the two file sizes added together? I'm not asking for a perfect fit but
>> at least something close. If I can get 2 250Mb videos to splice together
>> and be 600Mbs, that would be good enough.
>
> You're probably re-encoding, rather than simply splicing the existing 
> streams. The resulting size will necessarily have some quality loss, 
> and the resulting file size will depend greatly on the quality of your 
> encoder, not just on your settings for codec choice and options.
>
> What you really want to do is repackage the audio and video streams 
> from all your files into a single container file.
>
> Back when I was poking "simple" things like this, I used 'avidemux'. 
> That was ages ago, and on Ubuntu, but it might work for you. You'd 
> want to use 'copy' for your audio and video selection, to avoid any 
> transcoding.
>
> On Ubuntu, I usually had difficulties(read: crashes) with avidemux 
> when some tool or library it wanted wasn't installed--it wasn't smart 
> enough to remove those options from its menus if those options weren't 
> present. I haven't tried it on gentoo; it's plausible someone fixed 
> that either upstream or as part of some USE flag awareness in the past 
> couple years.
>
> I expect there are ways to do the exact same thing on the command line 
> using ffmpeg, but I'm less familiar with that tool.
>
>

Well, it took some experimenting but I finally figured it out.  I like 
to have never found the save video option under the file menu.  Why not 
hide it next time.  lol  I can't blame it on my glasses this time 
either.  I got new ones a while back.  Maybe it is stupidity.  o_O

I will say this tho, it is dang fast.  It took like 10 to 15 seconds and 
it was done.  Kdenlive took MUCH longer.

File size is awesome too.  The two files added are very close to just 
adding the file size of each video.  I'm talking within a megabyte or two.

Thanks for this tip.  I got a new toy to play with.  lol

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Re: Video editing advice on formats and size of file
  2011-12-23 14:49 ` [gentoo-user] " Grant Edwards
@ 2011-12-24  1:55   ` Dale
  2012-01-01 18:56     ` Mick
  0 siblings, 1 reply; 17+ messages in thread
From: Dale @ 2011-12-24  1:55 UTC (permalink / raw
  To: gentoo-user

Grant Edwards wrote:
> On 2011-12-23, Dale<rdalek1967@gmail.com>  wrote:
>> Howdy,
>>
>> I been trying to get this to work right for a goooooood while now.  I'm
>> confused here.  I have some videos that I download that are split up.
>> Some have two or three parts and a few 4 or 5.  What I can't get is
>> this, I can't seem to take say two 250Mb videos and make it come
>> anywhere near 500Mbs when spliced together.
> This always works for me with avi and mpeg files:
>
>   mencoder -oac copy -ovc copy -quiet infile1.avi infile2.avi -o outfile.avi
>


I tried this but it made my video pixelated for some reason.  The one I 
tested was a .flv so that may have a LOT to do with it.  Maybe it needed 
different options.  I tried the man page but it looked like Greek to 
me.  I mostly watch videos but no idea on how to make them or even do 
much editing, tho I am sort of learning.  My lady friend likes to watch 
videos so I have to put them together and burn them to a DVD.

Things women make us guys do.  lol

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-23 16:29 ` [gentoo-user] " David Haller
@ 2011-12-24  1:57   ` Dale
  0 siblings, 0 replies; 17+ messages in thread
From: Dale @ 2011-12-24  1:57 UTC (permalink / raw
  To: gentoo-user

David Haller wrote:
> Hello,
>
> On Fri, 23 Dec 2011, Dale wrote:
>> Is there some secret spice that I am missing or something?  Why can't
>> I take two videos and splice them together and it be something close
>> to the two file sizes added together?
> If resolutions and codec match, simply use mkvmerge:
>
> mkvmerge -o out.mkv in1.avi in2.avi ...
>
> HTH,
> -dnh
>

Going to put this in the savers file for later.  I sort of found a tool 
that works and it has a GUI.  :-)   May test this tho.  Other tool may 
stop working one day and we all know plan Bs are good to have.  Since 
this is Linux, we can go all the way to plan Z.  Lots of options.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-24  1:52   ` Dale
@ 2011-12-24  3:26     ` Dale
  2011-12-24  3:50       ` Michael Mol
  0 siblings, 1 reply; 17+ messages in thread
From: Dale @ 2011-12-24  3:26 UTC (permalink / raw
  To: gentoo-user

Dale wrote:
>
> Well, it took some experimenting but I finally figured it out.  I like 
> to have never found the save video option under the file menu.  Why 
> not hide it next time.  lol  I can't blame it on my glasses this time 
> either.  I got new ones a while back.  Maybe it is stupidity.  o_O
>
> I will say this tho, it is dang fast.  It took like 10 to 15 seconds 
> and it was done.  Kdenlive took MUCH longer.
>
> File size is awesome too.  The two files added are very close to just 
> adding the file size of each video.  I'm talking within a megabyte or 
> two.
>
> Thanks for this tip.  I got a new toy to play with.  lol
>
> Dale
>
> :-)  :-)
>

Since you seem to have used this more than I have.  I have a question.  
On the original videos, the sound is synced up fine.  The words match 
when their lips move and other sounds match up.  After I splice them 
together, the sound is off.  It seems longer videos are worse than 
shorter ones.  Am I missing something here?  I'm pretty much using the 
default settings.

I also have a problem with the older .flv1 files.  Any tips on that?  
Something special I need to install for older formats?  I googled and 
found threads but it appears the packages either merged with something 
else or are no longer available or something.

Thanks much.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-24  3:26     ` Dale
@ 2011-12-24  3:50       ` Michael Mol
  2011-12-24  8:54         ` Dale
  2012-05-03 23:30         ` David Haller
  0 siblings, 2 replies; 17+ messages in thread
From: Michael Mol @ 2011-12-24  3:50 UTC (permalink / raw
  To: gentoo-user

On Fri, Dec 23, 2011 at 10:26 PM, Dale <rdalek1967@gmail.com> wrote:
> Dale wrote:
>>
>>
>> Well, it took some experimenting but I finally figured it out.  I like to
>> have never found the save video option under the file menu.  Why not hide it
>> next time.  lol  I can't blame it on my glasses this time either.  I got new
>> ones a while back.  Maybe it is stupidity.  o_O
>>
>> I will say this tho, it is dang fast.  It took like 10 to 15 seconds and
>> it was done.  Kdenlive took MUCH longer.
>>
>> File size is awesome too.  The two files added are very close to just
>> adding the file size of each video.  I'm talking within a megabyte or two.
>>
>> Thanks for this tip.  I got a new toy to play with.  lol
>>
>> Dale
>>
>> :-)  :-)
>>
>
> Since you seem to have used this more than I have.  I have a question.  On
> the original videos, the sound is synced up fine.  The words match when
> their lips move and other sounds match up.  After I splice them together,
> the sound is off.  It seems longer videos are worse than shorter ones.  Am I
> missing something here?  I'm pretty much using the default settings.
>
> I also have a problem with the older .flv1 files.  Any tips on that?
>  Something special I need to install for older formats?  I googled and found
> threads but it appears the packages either merged with something else or are
> no longer available or something.
>
> Thanks much.

This is a slightly simplified explanation, owing to my probably not
remembering details quite correctly.

Media files consist of at least three parts: The container format, the
audio stream and the video stream. You're familiar with container
formats as ".flv", ".mkv", ".avi", ".mpg", ".mp4", etc.

The audio and video streams consist of frames (for video) or samples
(for audio) where each one consists of information particular to a
particular video image or audio sample. The audio and video frames
typically don't include information as to when they occurred; a frame
won't tell you that it's specific to 33.2 seconds into a sequence, for
example.

Normally, the file and/or streams will describe how many frames per
second the video stream should move along at, and how many samples per
second the audio stream should move along.

When the samples and frames stop matching up as the media file plays,
you get desync. This is normal to within a certain tolerance; when
you're moving along 48k audio samples per second, and only 30 video
frames per second, nobody cares if an audio sample is ten or so off
from its ideal position.

Unfortunately, I can only tell you what's going on. I can't tell you
how to fix it; it's not something I dealt with much.

I'd suggest you give the other tools a try, too. The other tools
brought up will do essentially the same thing as avidemux; they're
just ripping the audio and video streams out of the source container
files and placing them into a new container file. Your old approach
was very, very slow because your tools were generating completely new
audio and video streams. It's the difference between "dd if=src
of=dst" and "dd if=src|lzma --decompress --stdout|lzma --stdout|dd
of=dst" ... except lzma doesn't loose any data in the process, while
your transcoding was. Once you get the sync issues worked out, you
might even notice improvements in audio and image quality. :)

-- 
:wq



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-24  3:50       ` Michael Mol
@ 2011-12-24  8:54         ` Dale
  2011-12-24 10:36           ` Dale
  2012-05-03 23:30         ` David Haller
  1 sibling, 1 reply; 17+ messages in thread
From: Dale @ 2011-12-24  8:54 UTC (permalink / raw
  To: gentoo-user

Michael Mol wrote:
> This is a slightly simplified explanation, owing to my probably not
> remembering details quite correctly.
>
> Media files consist of at least three parts: The container format, the
> audio stream and the video stream. You're familiar with container
> formats as ".flv", ".mkv", ".avi", ".mpg", ".mp4", etc.
>
> The audio and video streams consist of frames (for video) or samples
> (for audio) where each one consists of information particular to a
> particular video image or audio sample. The audio and video frames
> typically don't include information as to when they occurred; a frame
> won't tell you that it's specific to 33.2 seconds into a sequence, for
> example.
>
> Normally, the file and/or streams will describe how many frames per
> second the video stream should move along at, and how many samples per
> second the audio stream should move along.
>
> When the samples and frames stop matching up as the media file plays,
> you get desync. This is normal to within a certain tolerance; when
> you're moving along 48k audio samples per second, and only 30 video
> frames per second, nobody cares if an audio sample is ten or so off
> from its ideal position.
>
> Unfortunately, I can only tell you what's going on. I can't tell you
> how to fix it; it's not something I dealt with much.
>
> I'd suggest you give the other tools a try, too. The other tools
> brought up will do essentially the same thing as avidemux; they're
> just ripping the audio and video streams out of the source container
> files and placing them into a new container file. Your old approach
> was very, very slow because your tools were generating completely new
> audio and video streams. It's the difference between "dd if=src
> of=dst" and "dd if=src|lzma --decompress --stdout|lzma --stdout|dd
> of=dst" ... except lzma doesn't loose any data in the process, while
> your transcoding was. Once you get the sync issues worked out, you
> might even notice improvements in audio and image quality. :)
>

I been doing some testing on this.  I went to about the end of a 3 hour 
video.  By the time it gets near the end of the video, the sound is 
almost 1.4 seconds off.  I tested this by telling smplayer to adjust the 
audio delay.  It is a bit annoying to see something on screen then hear 
it a second or so later.  It's like seeing a explosion at a distance.  
You see it then have to wait for the sound wave to hit you.  When I am 
midways of the video, it is about .6 to .7 seconds off.  So, it gets 
farther off as it goes.  It's most likely one step off that just gets 
worse as it goes.

I tried a couple other commands but I get errors about the file type.  I 
think a couple movies are in flv1 which is old.  I may have to convert 
them then stitch them together, which may not do the sound any good then 
either. lol

Well, I got something to play with.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-24  8:54         ` Dale
@ 2011-12-24 10:36           ` Dale
  2011-12-24 15:41             ` Michael Mol
  0 siblings, 1 reply; 17+ messages in thread
From: Dale @ 2011-12-24 10:36 UTC (permalink / raw
  To: gentoo-user

Dale wrote:
>
> I been doing some testing on this.  I went to about the end of a 3 
> hour video.  By the time it gets near the end of the video, the sound 
> is almost 1.4 seconds off.  I tested this by telling smplayer to 
> adjust the audio delay.  It is a bit annoying to see something on 
> screen then hear it a second or so later.  It's like seeing a 
> explosion at a distance.  You see it then have to wait for the sound 
> wave to hit you.  When I am midways of the video, it is about .6 to .7 
> seconds off.  So, it gets farther off as it goes.  It's most likely 
> one step off that just gets worse as it goes.
>
> I tried a couple other commands but I get errors about the file type.  
> I think a couple movies are in flv1 which is old.  I may have to 
> convert them then stitch them together, which may not do the sound any 
> good then either. lol
>
> Well, I got something to play with.
>
> Dale
>
> :-)  :-)
>

Well, I tried to go to sleep and come back to this tomorrow.  I couldn't 
sleep so here I am again.  While laying there I came up with a idea.  I 
stitched the first two videos together into a temporary file.  Then I 
stitched the temporary file to the 3rd video.  The sound is off but it 
sort of resets when it reached the stitch point so it is a good bit 
closer than it was.

If I ever get me a video camera, I'm going to know to not break up 
videos if I ever plan to put them back together again.  It appears that 
when you break the video, it is like humpty dumpty.  You just can't 
quite get it back together again.

At least this way is faster tho.  Thanks to all for the ideas.  I'm 
still testing things.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or how you interpreted my words!

Miss the compile output?  Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-24 10:36           ` Dale
@ 2011-12-24 15:41             ` Michael Mol
  2011-12-24 17:42               ` pk
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Mol @ 2011-12-24 15:41 UTC (permalink / raw
  To: gentoo-user

On Sat, Dec 24, 2011 at 5:36 AM, Dale <rdalek1967@gmail.com> wrote:
> Dale wrote:
>>
>>
>> I been doing some testing on this.  I went to about the end of a 3 hour
>> video.  By the time it gets near the end of the video, the sound is almost
>> 1.4 seconds off.  I tested this by telling smplayer to adjust the audio
>> delay.  It is a bit annoying to see something on screen then hear it a
>> second or so later.  It's like seeing a explosion at a distance.  You see it
>> then have to wait for the sound wave to hit you.  When I am midways of the
>> video, it is about .6 to .7 seconds off.  So, it gets farther off as it
>> goes.  It's most likely one step off that just gets worse as it goes.
>>
>> I tried a couple other commands but I get errors about the file type.  I
>> think a couple movies are in flv1 which is old.  I may have to convert them
>> then stitch them together, which may not do the sound any good then either.
>> lol
>>
>> Well, I got something to play with.
>>
>> Dale
>>
>> :-)  :-)
>>
>
> Well, I tried to go to sleep and come back to this tomorrow.  I couldn't
> sleep so here I am again.  While laying there I came up with a idea.  I
> stitched the first two videos together into a temporary file.  Then I
> stitched the temporary file to the 3rd video.  The sound is off but it sort
> of resets when it reached the stitch point so it is a good bit closer than
> it was.
>
> If I ever get me a video camera, I'm going to know to not break up videos if
> I ever plan to put them back together again.  It appears that when you break
> the video, it is like humpty dumpty.  You just can't quite get it back
> together again.
>
> At least this way is faster tho.  Thanks to all for the ideas.  I'm still
> testing things.

There are ways to fix the sync, I just don't know what they are. Don't
give up hope. :)

Though...hm. One thing you might try is keeping the 'video' streams in
'copy' mode, but transcode the audio streams to something like 256kb/s
MP3. It'll increase your file size slightly, but the tools may be
clever enough to maintain sync better that way.


-- 
:wq



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-24 15:41             ` Michael Mol
@ 2011-12-24 17:42               ` pk
  0 siblings, 0 replies; 17+ messages in thread
From: pk @ 2011-12-24 17:42 UTC (permalink / raw
  To: gentoo-user

On 2011-12-24 16:41, Michael Mol wrote:

> Though...hm. One thing you might try is keeping the 'video' streams in
> 'copy' mode, but transcode the audio streams to something like 256kb/s
> MP3. It'll increase your file size slightly, but the tools may be
> clever enough to maintain sync better that way.

If I remember correctly Avidemux has an option to calculate the original
video file audio length (if the audio is VBR). Not sure how this would
work with two files though; perhaps you would need to do this for each
file first and then adjust accordingly? I guess the only way to find out
is to play with it...

Merry xmas!

Peter K



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Re: Video editing advice on formats and size of file
  2011-12-24  1:55   ` Dale
@ 2012-01-01 18:56     ` Mick
  2012-01-04  3:14       ` Claudio Roberto França Pereira
  2012-05-03 23:07       ` David Haller
  0 siblings, 2 replies; 17+ messages in thread
From: Mick @ 2012-01-01 18:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: Text/Plain, Size: 1680 bytes --]

On Saturday 24 Dec 2011 01:55:43 Dale wrote:
> Grant Edwards wrote:
> > On 2011-12-23, Dale<rdalek1967@gmail.com>  wrote:
> >> Howdy,
> >> 
> >> I been trying to get this to work right for a goooooood while now.  I'm
> >> confused here.  I have some videos that I download that are split up.
> >> Some have two or three parts and a few 4 or 5.  What I can't get is
> >> this, I can't seem to take say two 250Mb videos and make it come
> >> anywhere near 500Mbs when spliced together.
> > 
> > This always works for me with avi and mpeg files:
> >   mencoder -oac copy -ovc copy -quiet infile1.avi infile2.avi -o
> >   outfile.avi
> 
> I tried this but it made my video pixelated for some reason.  The one I
> tested was a .flv so that may have a LOT to do with it.  Maybe it needed
> different options.  I tried the man page but it looked like Greek to
> me.  I mostly watch videos but no idea on how to make them or even do
> much editing, tho I am sort of learning.  My lady friend likes to watch
> videos so I have to put them together and burn them to a DVD.
> 
> Things women make us guys do.  lol

Hmm ... more likely she decided to keep you busy (quiet) and prove to herself 
that you care enough to do things for her?  No doubt you let slip that you 
like playing with computers ...   ;-)

Anyhow, have a look again at the mencoder man page.  There's a few settings in 
there for video called "extreme" and "insane".  You may want to try them.

Alternatively you may find that ffmpeg will do what you want.  There's a "copy" 
option whereby it just copies the source with zero processing on video or 
audio inputs.

-- 
Regards,
Mick

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Re: Video editing advice on formats and size of file
  2012-01-01 18:56     ` Mick
@ 2012-01-04  3:14       ` Claudio Roberto França Pereira
  2012-05-03 23:07       ` David Haller
  1 sibling, 0 replies; 17+ messages in thread
From: Claudio Roberto França Pereira @ 2012-01-04  3:14 UTC (permalink / raw
  To: gentoo-user

Ok, I know what to do. I played a little with ffmpeg and avconv
(ffmpeg's fork, libav, conversion utility) converting 3D YouTube
videos to play at the Nintendo 3DS.
Anyways, I'll pretend you're using ffmpeg, I prefer libav but ffmpeg
is much more common (both are made available by portage, there is
virtual/ffmpeg now). Their syntax is a little different by the way, if
you prefer using libav just look at libav changelog
(/usr/share/doc/libav-version/CHANGELOG.bz2, or something close to
that).

ffmpeg -i file1.avi -i file2.avi -vcodec copy -acodec copy -async 12
-o output.avi

You can use multiple input files, not just 2. If their codec match,
you can copy, if they don't match then you'll need to re-encode the
files (or the just the ones with the different codec).
The -async 12 option do the synchronization trick. The 12 indicates
that ffmpeg should try to correct synchronization at most 12 times per
second. You could use less, try and see the results yourself. I'd say
that even 5 or 3 would give great results, but 12 doesn't seem to
increase file size either.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Re: Video editing advice on formats and size of file
  2012-01-01 18:56     ` Mick
  2012-01-04  3:14       ` Claudio Roberto França Pereira
@ 2012-05-03 23:07       ` David Haller
  1 sibling, 0 replies; 17+ messages in thread
From: David Haller @ 2012-05-03 23:07 UTC (permalink / raw
  To: gentoo-user

Hello,

On Sun, 01 Jan 2012, Mick wrote:
>Anyhow, have a look again at the mencoder man page.  There's a few
>settings in there for video called "extreme" and "insane".  You may
>want to try them.

I use 

-ovc x264 -x264encopts \
crf=22:trellis=1:qcomp=0.8:weight_b:8x8dct:subq=6:threads=1:nr=750

or the same with crf=23 for lower quality input and nr=500 (for clean
input). That gives me for DVD MPEG2 input output of the same quality
(and yes, I've looked at very difficult parts of both input and output
basically "frame by frame" while finding those settings ;)

Those settings give quite small files at times, esp. due to the 'nr'
noise reduction filter (which makes files 20-50% smaller with no
visual impact and little impact (<6%) on encoding speed. I get e.g. a
mere 241MiB video track for a 41:19min series-episode in PAL
(720x576@25fps progessive anamorphic (=> 1024x576) with crf=22). The
MPEG2 original is 1.16GiB for the video track...

For me, depending on input, above settings are the "sweet spot"
regarding quality (no difference I can see, either at 1:1 or
fullscreen at 1280x1024 with black bars) and file size.

HTH,
-dnh

-- 
Never put off till tomorrow what you can avoid all together.
                                               -- fortune file



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [gentoo-user] Video editing advice on formats and size of file
  2011-12-24  3:50       ` Michael Mol
  2011-12-24  8:54         ` Dale
@ 2012-05-03 23:30         ` David Haller
  1 sibling, 0 replies; 17+ messages in thread
From: David Haller @ 2012-05-03 23:30 UTC (permalink / raw
  To: gentoo-user

Hello,

On Fri, 23 Dec 2011, Michael Mol wrote:
>I'd suggest you give the other tools a try, too. The other tools
>brought up will do essentially the same thing as avidemux; they're
>just ripping the audio and video streams out of the source container
>files and placing them into a new container file.

mkvmerge has the -y option where you can specify

- an offset for a specific track (e.g. delay the audio track by
  1000ms)
- and specify a ratio how one track is faster/slower than the other.

For example: I recently had a subtitle track declared as PAL (25fps)
but it was actually NTSC (23.97fps). Additionally, there was an
offset. So, I used:

mkvmerge -o output.mkv --language 1:en input1.avi --language 0:de \
    -D input_sound2.ac3 \
    -y 0:-7000,23.97/25 subtitle1.srt
       | ^^|^^ ^^^^^^^^- delay ratio / skew
       |   `- absolute offset (-7s)
       `- track 0 of the input file (i.e. subtitle1.srt), with the
          usual video+audio in one file, it'd be Track 1: for the
          audio, use mkvinfo/mediainfo on the input to find out.

(or the other way around resp. PAL/NTCS rates, anyway, according to my
~/.bash_history the above gave me the correct output ;)

By that feature, you can offset one track (e.g. sound or subs) by an
absolute time and skew it at a relative ratio (when one track is
"faster" than the other, usually PAL vs. NTSC or 24fps. Anyway, try
those ratios ,23.97/25 or ,25/23.97 first ;) After determining the
"absolute offset" as early in the file as possible.

When stitching files together, it might be that just one file has that
problem, so, remux that one file with an -y 0:offset,skew into a
temp-file and then append the temp to the other input (or vice versa).

Takes a bit of testing etc., but you should be able to solve all
"stable" desyncronizations.

You're lost if the desync varies over one file (e.g. +1s at the start,
+2 at 25%, in sync at 50%, +3s at 60%, -2s at 75%, +1s at the end...)

HTH,
-dnh

-- 
> Good. now let's bash PHP.                                    -- Satya
I thought we were talking about programming languages? -- Peter Corlett



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-05-03 23:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-23 14:18 [gentoo-user] Video editing advice on formats and size of file Dale
2011-12-23 14:45 ` Michael Mol
2011-12-24  1:52   ` Dale
2011-12-24  3:26     ` Dale
2011-12-24  3:50       ` Michael Mol
2011-12-24  8:54         ` Dale
2011-12-24 10:36           ` Dale
2011-12-24 15:41             ` Michael Mol
2011-12-24 17:42               ` pk
2012-05-03 23:30         ` David Haller
2011-12-23 14:49 ` [gentoo-user] " Grant Edwards
2011-12-24  1:55   ` Dale
2012-01-01 18:56     ` Mick
2012-01-04  3:14       ` Claudio Roberto França Pereira
2012-05-03 23:07       ` David Haller
2011-12-23 16:29 ` [gentoo-user] " David Haller
2011-12-24  1:57   ` Dale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox