[MEncoder-users] knowhow: convert flash h264/aac video (e.g. from Youtube) to workable formats
Miroslav Rovis
m.rovis at inet.hr
Tue Mar 1 12:42:32 CET 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, folks!
I wanted to learn this for long, and today I finally got it.
FILE.flv is a file you find in a place like /tmp/ usually in awkward
name like FlashKsb97c, whatever, after you've watched a video on
Youtube or somewhere in your Firefox (I don't go online with my
Mickeysoft, no, so can't tell where you find it in Windoze).
To be able to deal with it, e.g. cut'n'paste particular parts of it,
you can try what I found out today, read on.
First of all, the Flash file from the web, FILE.flv, these days,
mostly is in h264/aac format, I believe all this is to no avail for
Mickeysoft wmv or any similar bad ole formats...
midentify FILE.flv
will give you enough info about it. If it gives you, among other
useful info,
ID_VIDEO_CODEC=ffh264
and
ID_AUDIO_CODEC=ffaac
lines, than all this applies.
ffmpeg -i FILE.flv FILE.aac
This gives you fine FILE.aac advanced audio codec file that feeds
readily into MP4Box or mkvmerge.
ffmpeg -i FILE.flv -vcodec copy -vbsf h264_mp4toannexb -an FILE.h264
This gives you the video h264 stream for MP4Box or mkvmerge.
If the file is 25fps then leave out "-fps 23.976" from the MP4Box and
" --default-duration 0:23.976fps" from mkvmerge line below.
MP4Box -add FILE.h264 -fps 23.976 -add FILE.aac FILE.mp4
mkvmerge -o FILE.mkv --default-duration 0:23.976fps FILE.h264 FILE.aac
You don't need both.
Steve Jobs's mp4 format, FILE.mp4, is fine, but I prefer mkv, as I
always prefer Open Source...
I had to use -fps 23.976 and the respective mkvmerge option because,
regardless the video is European, the tech used (I only found the
video, others produced it), is in NTSC short of 24 fps...
It's like the world can and never really will agree on standards...
It's like brand new whichever flavour Linuces always have to write in
American style to the whole world.
E.g.
date
Tue Mar 1 12:06:04 CET 2011
Instead of ISO which is international standards... Isn't ISO better
worldwide like after I stuck
alias ls='ls --time-style=long-iso'
somewhere in /etc/bash/bashrc in my Gentoo, now I get:
myBox # ls -l
- -rw-r--r-- 1 miro users 56103437 2011-03-01 10:08 FILE.flv
myBox #
But I really thought lately all the standards now should be reinvented
to Chinese, because they're now buying out the whole world, and not
just the US, aren't they? And on the backs of their dissidents (a
couple million conc camp workers), as well as whole nations that have
to bow down to their empire (Uighurs and Tibetians and others)...
Excuse the ramblings, I didn't mean much really.
I'm just happy I finally learned how to get any, well most any, web
flash video (like from Youtube or Facebook) into workable format, and
I decided to put the knowhow on mencoder users list. I know it's
ffmpeg stuff, apart from midentify, but the encoders, and most of
seasoned encoders (the people) are familiar with mencoder, will find
it here just the same...
Cheers, folks!
God bless!
Miro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk1s26YACgkQ5NaGZVDan0rOgwCfRdurXN3B44wbUxZjzZlVy+Un
4noAnji59vM8VeU8ZMaGxAPfGBDRZyMz
=FYtm
-----END PGP SIGNATURE-----
More information about the MEncoder-users
mailing list