FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-23-2011, 01:18 PM
Dale
 
Default 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"
 
Old 12-23-2011, 01:45 PM
Michael Mol
 
Default Video editing advice on formats and size of file

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.
 
Old 12-23-2011, 01:49 PM
Grant Edwards
 
Default Video editing advice on formats and size of file

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
 
Old 12-23-2011, 03:29 PM
David Haller
 
Default Video editing advice on formats and size of file

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
 
Old 12-24-2011, 12:52 AM
Dale
 
Default Video editing advice on formats and size of file

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"
 
Old 12-24-2011, 12:55 AM
Dale
 
Default Video editing advice on formats and size of file

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"
 
Old 12-24-2011, 12:57 AM
Dale
 
Default Video editing advice on formats and size of file

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"
 
Old 12-24-2011, 02:26 AM
Dale
 
Default Video editing advice on formats and size of file

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"
 
Old 12-24-2011, 02:50 AM
Michael Mol
 
Default Video editing advice on formats and size of file

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
 
Old 12-24-2011, 07:54 AM
Dale
 
Default Video editing advice on formats and size of file

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"
 

Thread Tools




All times are GMT. The time now is 06:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org