Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

Video editing advice on formats and size of file

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


rdalek1967 at gmail

Dec 23, 2011, 6:18 AM

Post #1 of 17 (900 views)
Permalink
Video editing advice on formats and size of file

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"


mikemol at gmail

Dec 23, 2011, 6:45 AM

Post #2 of 17 (894 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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.


grant.b.edwards at gmail

Dec 23, 2011, 6:49 AM

Post #3 of 17 (891 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

On 2011-12-23, Dale <rdalek1967 [at] gmail> 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


gentoo at dhaller

Dec 23, 2011, 8:29 AM

Post #4 of 17 (884 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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


rdalek1967 at gmail

Dec 23, 2011, 5:52 PM

Post #5 of 17 (880 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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"


rdalek1967 at gmail

Dec 23, 2011, 5:55 PM

Post #6 of 17 (884 views)
Permalink
Re: Re: Video editing advice on formats and size of file [In reply to]

Grant Edwards wrote:
> On 2011-12-23, Dale<rdalek1967 [at] gmail> 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"


rdalek1967 at gmail

Dec 23, 2011, 5:57 PM

Post #7 of 17 (878 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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"


rdalek1967 at gmail

Dec 23, 2011, 7:26 PM

Post #8 of 17 (877 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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"


mikemol at gmail

Dec 23, 2011, 7:50 PM

Post #9 of 17 (878 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

On Fri, Dec 23, 2011 at 10:26 PM, Dale <rdalek1967 [at] gmail> 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


rdalek1967 at gmail

Dec 24, 2011, 12:54 AM

Post #10 of 17 (876 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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"


rdalek1967 at gmail

Dec 24, 2011, 2:36 AM

Post #11 of 17 (886 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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"


mikemol at gmail

Dec 24, 2011, 7:41 AM

Post #12 of 17 (869 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

On Sat, Dec 24, 2011 at 5:36 AM, Dale <rdalek1967 [at] gmail> 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


peterk2 at coolmail

Dec 24, 2011, 9:42 AM

Post #13 of 17 (872 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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


michaelkintzios at gmail

Jan 1, 2012, 10:56 AM

Post #14 of 17 (826 views)
Permalink
Re: Re: Video editing advice on formats and size of file [In reply to]

On Saturday 24 Dec 2011 01:55:43 Dale wrote:
> Grant Edwards wrote:
> > On 2011-12-23, Dale<rdalek1967 [at] gmail> 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
Attachments: signature.asc (0.19 KB)


spideybr at gmail

Jan 3, 2012, 7:14 PM

Post #15 of 17 (823 views)
Permalink
Re: Re: Video editing advice on formats and size of file [In reply to]

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.


gentoo at dhaller

May 3, 2012, 4:07 PM

Post #16 of 17 (648 views)
Permalink
Re: Re: Video editing advice on formats and size of file [In reply to]

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 [at] 25fp 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


gentoo at dhaller

May 3, 2012, 4:30 PM

Post #17 of 17 (639 views)
Permalink
Re: Video editing advice on formats and size of file [In reply to]

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

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.