[Ffmpeg-devel-irc] ffmpeg.log.20111217

burek burek021 at gmail.com
Sun Dec 18 02:05:02 CET 2011


[00:09] <ArktischWalder> I am trying to use ffmpeg to convert some .mkv files (with subtitles) to mpg or mpg4 (and keep the subtitles) so I can play them on my PS3. 
[00:10] <mantas322> Hi guys
[00:10] <ArktischWalder> But I have no idea how to do this.
[00:10] <mantas322> how to do what>?
[00:11] <ArktischWalder> I'm trying to convert some .mkv files to mpg or mpg4 without losing the subtitles so I can play them on my PS3
[00:11] <mantas322> ah.
[00:12] <ArktischWalder> Is it even possible with ffmpeg?
[00:12] <ArktischWalder> Or should I be using a different tool?
[00:12] <mantas322> I dont know
[00:14] <mantas322> I just made a post about how to programmatically make thmbnails of images using ffmpeg
[00:14] <mantas322> juss sayin'
[00:14] <ArktischWalder> That's pretty cool.
[00:16] <mantas322> yeah, i've recently become a big fan of ffmpeg when I need to do media conversion
[00:16] <ArktischWalder> Ya, I like it too. I just don't know much about the media world, so it's hard to know where to start.
[00:17] <mantas322> all i know is download CCCP codec pack
[00:17] <mantas322> and use ffmpeg
[00:17] <mantas322> programmatically
[00:19] <mantas322> oh and find appropriate arguements
[00:20] <relaxed> ArktischWalder: you can use the ass filter to hardsub subtitles
[00:22] <mantas322> sounds like a proper filter
[00:22] <ArktischWalder> That's not a joke? The "ass filter"?
[00:23] <relaxed> no
[00:23] <relaxed> http://ffmpeg.org/libavfilter.html#ass
[00:24] <mantas322> ass filter is serious business
[00:25] <ArktischWalder> Ok. I'm really demonstrating my media noobness, but if I have asd.mkv and want it to be asd.mp4, how do I do that using the ass filter?
[01:13] <davidOmatic> hi everybody
[01:13] <davidOmatic> can somebody explain me some concepts?
[01:14] <davidOmatic> I have a file with a tbr 50
[01:14] <davidOmatic> I want to convert it to 25 fps
[01:15] <davidOmatic> I made -vcodec copy -r25 -acodec copy, resulting in a still frame video
[01:16] <davidOmatic> isn't that the correct way?
[01:21] <pasteeater> davidOmatic: you can't use -r and -vcodec copy. they are mutually exclusive because you have to re-encode to change frame rate.
[01:21] <davidOmatic> I supposed that...
[01:22] <davidOmatic> so I need to reencode the video pasteeater ?
[01:26] <exaboy> im on debian using the package version but am struggling to get webm to work
[01:28] <exaboy> i dont have webm in my -formats
[01:28] <exaboy> i should try the ubuntu compile i guess
[01:29] <pasteeater> exaboy: see channel topic for compile guide link
[01:29] <pasteeater> davidOmatic: yes
[01:30] <davidOmatic> thanks pasteeater 
[01:32] <exaboy> for debian i take it universe = unstable apt source?
[01:40] <pasteeater> i don't remember, but if you're just interested in vp8/webm then all you'll need is libvpx and libvorbis for external encoding libraries.
[01:44] <exaboy> If you really want to compile without asm, configure with --disable-asm.
[01:53] <exaboy> magic adding the multimedia source added the extra webm libraries
[01:54] <pasteeater> why would you want to disable asm?
[02:18] <davidOmatic> pasteeater I set the -r to 25 and -b to something really low and vlc says the video is at 50 fps
[02:19] <davidOmatic> and my NLE says is 25 fps but at a data rate of 104kbits/s
[02:19] <davidOmatic> I tried this with ffmpeg F:\01-CAPTURAS\JACRIS\TRADICION\CRIS\manana>c:\FFMPEG\ffmpeg.exe -i MA_00000.MTS
[02:19] <davidOmatic>  -vcodec mpeg2video -r 25 -b 2k -an MA_00000-25-b25k-an4.MPG
[02:20] <davidOmatic> any clue?
[02:26] <burek> davidOmatic, maybe it's interlaced
[02:27] <davidOmatic> should I deinterlace it?
[02:27] <burek> also -vcodec copy -r 25 don't go together
[02:27] <davidOmatic> ok I see
[02:28] <davidOmatic> I just wanted to get the same codec/quality
[02:28] <burek> anyway, is it possible to use -vcodec copy and just renumber timestamps to make video faster/slower?
[02:29] <burek> davidOmatic, maybe your video already is 25fps
[02:29] <burek> but is interlaced, so vlc says it's 50 fps
[02:29] <davidOmatic> its possible
[02:29] <burek> try using some video editor and run 'statistics'
[02:29] <burek> or something
[02:30] <burek> to see what the actual average fps is
[02:30] <davidOmatic> yep my old pinnacle liquid say its 25fps
[02:30] <burek> anyway, what is your overall goal
[02:30] <burek> what are you trying to achieve
[02:31] <davidOmatic> I want to edit it on pinnacle liquid
[02:31] <davidOmatic> but it cant show it
[02:31] <davidOmatic> it says the video is 104 kbits/s
[02:32] <burek> try another video editor maybe
[02:32] <davidOmatic> no matter what bitrate I set on ffmpeg -b
[02:32] <davidOmatic> Im considering it...
[02:33] <burek> can you please use pastebin.com, to show your command line and its output?
[02:33] <burek> for example just ffmpeg -i file
[02:34] <davidOmatic> yep
[02:36] <davidOmatic> this is the original video clip
[02:36] <davidOmatic> http://www.pasteall.org/27474
[02:37] <burek> oh i see
[02:37] <burek> can your liquid handle mp4 files
[02:37] <burek> or avi
[02:37] <burek> ffmpeg -i file -f mp4 output.mp4
[02:37] <burek> no no
[02:37] <davidOmatic> no, Im trying to convert to mmp2
[02:37] <burek> ffmpeg -i file -acodec copy -vcodec copy -f mp4 output.mp4
[02:37] <davidOmatic> mpeg2
[02:38] <burek> what format does your video editor support the best
[02:38] <burek> matroska?
[02:38] <davidOmatic> haha
[02:38] <davidOmatic> no, mpeg2
[02:39] <davidOmatic> well I made this http://www.pasteall.org/27475
[02:40] <davidOmatic> with this line ffmpeg.exe -i MA_00000.MTS
[02:40] <davidOmatic>  -vcodec mpeg2video -r 25 -b 2k -an MA_00000-25-b25k-an4.MPG
[02:40] <burek> ffmpeg -i file -acodec copy -vcodec copy -f mpeg output.mpeg
[02:41] <burek> no need to touch video/audio codec, just remux it
[02:42] <davidOmatic> hope it woks ( I dont want to change my nle I need to make it fast )
[02:55] <davidOmatic> It seems I have to switch to another video editor
[02:56] <davidOmatic> thank you
[12:36] <Nagy> where should I upload samples of files that ffmpeg cannot play?
[12:36] <Nagy> I have a few dnxhd files which ffmpeg cannot find a decoder for
[13:49] <blez> what's the minimum chunk of 2 files that I must have, to compare if they're the same video?
[13:50] <burek> what kind of question is that
[13:52] <blez> smart, lol
[13:53] <burek> well :) if we all judge our own intelect, then I guess this world would be intelligent, wouldn't it :)
[13:54] <burek> anyway, try with md5sum
[13:55] <blez> no, I know how to compare the files, I just need to know can I compare for example the first 5kb of the videos
[13:55] <blez> or they can be the same
[13:55] <burek> well you take first 5kb of files and you compare them :=
[13:57] <blez> yea, and can the headers be the same for 2 different files?
[13:58] <blez> I'm talking about flv/mp4
[13:58] <burek> yes they can
[13:59] <blez> so I need a bigger chunk
[14:00] <burek> http://osflash.org/flv
[15:53] <BW^-> i'm converting a .m4v to .avi using the x264 codec. for audio i specify -codec copy . even so, the output file doesn't include the source file's audio, but none. the source file audio is MP3.  any idea how i can resolve this?
[16:18] <sprayd> hello michaelni 
[16:18] <Mavrik-> BW^-, as usual: put your command line and ffmpeg output to a pastebin and link here.
[16:19] <BW^-> : "C:\Documents and Settings\Gabriela\My Documents\Downloads\ffmpeg-0.5\ffmpeg-git-7d531e8-win32-static\bin\ffmpeg" -i "MAB-02-content-vs-context.m4v" -vcodec libx264 -acodec copy -cqp 35 -s 336x240 "MAB-02-Content-vs-Context.compr.avi"
[16:19] <BW^-> it's with the very latest win32 build from online.. 10 days old or so
[16:20] <BW^-> ffmpeg output, 2min
[16:20] <Mavrik-> why are you trying to save H.264 format into an avi file?
[16:20] <BW^-> i could save it to some other format too. just wanted it to be a persistent format.
[16:20] <BW^-> do you have any better suggestion?
[16:21] <Mavrik-> putting h264 in an avi is a BAD idea
[16:21] <BW^-> aha. how come?
[16:21] <Mavrik-> and could be the cause of your problems
[16:21] <BW^-> yes
[16:21] <Mavrik-> what are you trying to achieve?
[16:21] <BW^-> i have a video file, and want to make it smaller
[16:21] <BW^-> the mp3 audio content is small enough already
[16:21] <BW^-> the goal is to make the output video readable (it's a guy who sometimes writes on a whiteboard)
[16:21] <Mavrik-> ah
[16:22] <BW^-> but not much more than that.. so to get a 10x size reduction or so
[16:22] <Mavrik-> well, H264 is usually stored into mp4 (m4v,m4a) files
[16:22] <BW^-> actually i'm succesful with this, just want the aduio into it :)
[16:22] <Mavrik-> which are also more widely supported than .avi files ;)
[16:23] <Mavrik-> BW^-, so if you rename file to mp4 it should encode OK... if not, then re-encode audio as well
[16:23] <sprayd> michaelni, i tried to contact the appropriate section of the organization but did not get any reply..
[16:24] <BW^-> http://pastebin.com/cmefGDuN
[16:24] <BW^-> mavrik: ok, got you. .m4v is fine too right?
[16:29] <sprayd> michaelni, do you think I contacted the appropriate section of the organization? http://www.iso.org/iso/standards_development/technical_committees/list_of_iso_technical_committees/iso_technical_committee.htm?commid=45316
[16:31] <Mavrik-> BW^-, yeah, m4v/m4a is just another name for mp4 files
[16:32] <Mavrik-> BW^-, oh and BTW, the audio in your file is AAC not MP3
[16:39] <michaelni> sprayd, yes looks like one possible point to start at
[16:40] <michaelni> if they dont reply, try someone somewhere else 
[16:41] <sprayd> i searched other comittees and found none, i spent a great deal of time to find this
[16:41] <sprayd> and decided that this was the best one
[16:42] <sprayd> i couldn't contact the secretary general, could I?
[16:43] <sprayd> couldn't = didn't
[16:44] <michaelni> its worth a try i think
[16:44] <sprayd> ok i will then
[16:44] <sprayd> but i would need more time
[16:45] <sprayd> only some minutes are left
[16:46] <michaelni> sprayd, you have 2 days more time :)
[16:46] <sprayd> thanks !
[16:48] <sprayd> michaelni, can I have your email address?
[16:49] <michaelni> michaelni at gmx.at
[16:50] <sprayd> thanks, i will mail you the letter that i wrote for you to see whether I have described the situation properly or not.
[16:51] <michaelni> ok
[16:53] <sprayd> did you get the mail michaelni ?
[16:54] <michaelni> yes, moment i have to read it ...
[16:56] <michaelni> sprayd, well written, i like the text
[16:57] <sprayd> thanks mi
[16:57] <sprayd> thanks michaelni 
[16:57] <sprayd> :)
[16:58] <sprayd> brb
[17:43] <Loof> What's a good way to cut commercials with minimal/no re-encoding and without losing sync. all over the place?
[17:44] <Loof> I tried using mencode + comskip, but I keep getting a nice mix of bad cuts & losing sync.
[17:44] <Mavrik-> Loof, that's mostly impossible
[17:44] <Mavrik-> Loof, unless you have a format that's made for that
[17:44] <Loof> I tried comskip manually, and lost sync completely (several seconds off)
[17:44] <Mavrik-> what's your input video format?
[17:45] <Loof> MPEG-2 off  Tivo
[17:45] <sprayd> michaelni, do you think i can contact ITTF <http://www.iso.org/iso/standards_development/supporting_services/information_technology_task_force.htm>    and ISO/IEC JTC 1 - Information Technology Standards' Secretary?
[17:46] <sprayd> the latter committee here http://www.iso.org/iso/jtc1_home.html
[17:46] <Mavrik-> Loof, MPEG-2 wasn't made for cutting so what you're asking is kinda hard
[17:46] <Loof> Now, the other odd thing I ran into was when I used kmttg (which automates much of the process) using ffmpeg to do MPEG-2 to MPEG-4 resulting in a much larger file... obviously my bps must be way off for the input quality
[17:47] <Mavrik-> Loof, keeping MPEG-2 files in sync while cutting on arbitrary barrier without reencoding is mostly impossible :)
[17:48] <Mavrik-> Loof, why don't you calculate your input bitrate?
[17:48] <Loof> I thought you could drop between... i frames I think it was
[17:48] <Loof> Well, this is the 1st time I really mess around with transcoding at this level of detail
[17:49] <Loof> I usually just let the tools do their thing and only tweak if the quality is funky
[17:49] <Loof> but I'm trying to archive these shows
[17:49] Action: JEEB usually re-encodes video and cuts audio
[17:49] <JEEB> anyways, if you only care about quality, find the highest crf value that still looks good with libx264 >_>
[17:50] <Mavrik-> Loof, which means you need to cut on I-frame barriers and rebuilt timestamps on whole video to correct holes, then correct audio samples so you keep in sync
[17:50] <Mavrik-> I don't think there's alot of tools that can do that
[17:50] <Loof> JEEB: That's fine except that it's a little silly to have the mp4 output be 1.5x bigger than the input... you can't create data
[17:50] <Mavrik-> of course you can
[17:50] <JEEB> you are doing something wrong :P
[17:51] <Loof> JEEB: -clearly- :)
[17:51] <JEEB> I mean, yes -- if you set the crf value ridiculously low
[17:51] <JEEB> then you will get a BIG file
[17:51] <JEEB> but the idea was to find the HIGHEST value that still looks good
[17:51] <JEEB> and in most cases if your libx264 settings are sane that is smaller than the source
[17:51] <Loof> Is there a tool to cut while transacoding... I didn't see any options in ffmpeg for that
[17:52] <Loof> I think that makes the most sense... if I can't re-sync... then avoid the issue and drop them while they're decoded/raw :)
[17:52] <JEEB> those TV things are most probably interlaced too (and depending on the material you'll either have to inverse telecine or "just" deinterlace)
[17:52] <michaelni> sprayd, sure, cant hurt ...
[17:52] <Mavrik-> JEEB, what's the difference?
[17:53] <JEEB> Mavrik, inverse telecine has you making pictures of two fields and then possibly dropping the double'd fields
[17:53] <JEEB> "just" deinterlacing means that you just make a picture out of a field, since "truely interlaced" stuff consists of "one picture per field"
[17:54] <JEEB> and no, nothing will automate checks for you to see what is actually in the interlaced stream :P
[17:54] <Mavrik-> I see.
[17:54] <Mavrik-> Field is analogous to "frame" on progressive material?
[17:54] <JEEB> not really
[17:54] <Loof> I'm not sure if they're interlaced or if the Tivo handles de-interlacing in hardware on record
[17:55] <sprayd> michaelni, do you think this would serve some purpose for the task if it has atleast something that could be of some use to the project and more importantly if no one replies?
[17:55] <sprayd> http://standards.iso.org/ittf/PubliclyAvailableStandards/index.html
[17:55] <JEEB> interlaced material doesn't really have frames, but two fields are usually "put onto each other" for viewing on progressive screens
[17:55] <Mavrik-> I see.
[17:56] <JEEB> and one field is basically width of a frame, half the height
[17:56] <Mavrik-> Right now I'm having trouble just detecting interlaced material with ffmpeg, so I mostly just gave up on deinterlacing
[17:56] <sprayd> and michaelni  this http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_tc_browse.htm?commid=45020&published=on&includesc=true
[17:56] <Loof> JEEB: These are not films btw, just a few tv shows... so I doubt there was a non-30 fps source on t'em
[17:56] <JEEB> Loof, oh you have no idea how many things get shot not in 30i nowadays :V
[17:57] <Loof> They'd still potentially need to be de-interlaced... but I don't think inverse telecine applies :)
[17:57] <sprayd> the latter one may contain proprietary ones michaelni 
[17:57] <JEEB> and I dearly hope that your hardware box didn't rape them already :)
[17:57] <Mavrik-> 30i? as in... 30 fields/s?
[17:57] <JEEB> 30i as in 60 fields per second
[17:57] <Loof> Well, at this point what feels safest is to archive them as mpegs, decrypted and /w commercials
[17:58] <JEEB> 30 "fps", interlaced
[17:58] <Loof> 30i = 30/fps interlaced
[17:58] <JEEB> since most applications ask you for a frame rate
[17:58] <JEEB> (even if really interlaced material has no frame rate)
[17:58] <Loof> film is usually... 24
[17:58] <JEEB> 24/1.001 mostly
[17:58] <Loof> those new red cameras are... I don't know... something silly... 120p I think
[17:58] <JEEB> (which is then shown as 23.98whatever which I hate)
[17:59] <Mavrik-> ah, yeah, around here we're still using some cams that record interlaced video at 25 or 30 fps
[18:00] <JEEB> I just had a person ask on the support forums for a playback package I manage why his new camcorder's clips were playing badly
[18:00] <Loof> It's just odd... when you, well... obtain a show from online. The commercials are cut fairly cleanly... the quality is high, the files are not huge...and I've very very rarely seen one that's out of sync.
[18:00] <Loof> So, there must be a trick to doing this without too much hassle
[18:00] <JEEB> ended up that he had a Core 2 Duo and his camcorder by default recorded at 1080p60
[18:00] <Loof> I can't imagine they're manually doing these
[18:00] <JEEB> Loof, I do it with avisynth and it doesn't really take long :P
[18:00] <JEEB> encoding itself is the longest part of it
[18:01] <sprayd> michaelni, replace the latter link with this and consider
[18:01] <JEEB> index the transport stream -> find cut points -> cut audio while you have the times out (indexer outputs the audio stream as separate and mkvmerge(gui) can cut the stream) -> deal with video as per the source's nature -> encode -> mux with cut audio, complete
[18:01] <sprayd> http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_tc_browse.htm?commid=45316
[18:02] <JEEB> and for the audio cutting there are even automated scripts that read your trim()s from avisynth scripts
[18:02] <JEEB> but I like my manual work >_>
[18:02] <Loof> Hmm, but I'd need to get it from mpeg2 to an avi package 1st and do this on windows...
[18:02] Action: Loof shrugs.
[18:03] <JEEB> eh
[18:03] <JEEB> > mpeg2 to an avi package
[18:03] <JEEB> wat
[18:03] <JEEB> also, yes -- I'm doing this on windows
[18:04] <Loof> Does avisynth work on raw .mpeg2 or does it have to be in an .avi stream/packaging
[18:04] <Loof> whatever you call it
[18:04] <JEEB> depends on the source filter
[18:04] <JEEB> I use dgindex and dgdecode for mpeg-2 sources
[18:04] <michaelni> sprayd, the first link (with all the free specs) is nice, i knew about these but didnt know there was a page listing all of them
[18:04] <JEEB> it can read either raw m2v or mpeg-ts/ps
[18:04] <JEEB> in which most sources are
[18:04] <Loof> What do you use for the actual encoding?
[18:04] <JEEB> x264?
[18:04] <michaelni> the 3rd link seems to be not so free specs ...
[18:05] <michaelni> CHF 208,00 ...
[18:05] <michaelni> ISO/IEC 11172-2:1993 as random pick
[18:05] <JEEB> x264 derp.avs --my-settings derp -o output.mkv
[18:05] <JEEB> of course you could as well encode the avs in ffmpeg as well
[18:05] <sprayd> yeah the third one is a problem.. michaelni ; i do nit understand the CHF 208,00 thing too
[18:05] <sprayd> *not
[18:05] <JEEB> I've just been around x264 long enough that it's just easier for me to handle it that way :P
[18:06] <Loof> Ok... thanks... gotta run
[18:06] <JEEB> anyways, if you need to do proper deint/IVTC avisynth is the way to go, but if you are looking just for an easy solution without any learning curve you might want to seek something else
[18:06] <Loof> BTW, what do you use to mark the cuts for avisynth?
[18:06] <JEEB> I mean, it's easy once you've done it a few times
[18:06] <JEEB> Loof, I open the source in avisynth with AvsPmod as the previewer
[18:06] <JEEB> (and script editor)
[18:06] <Loof> k
[18:06] <JEEB> and then scroll and add trim()s as needed
[18:07] <JEEB> trim()++trim()++trim()
[18:07] <Loof> I might play with that later... I figured that mencode and/or ffmpeg could simply 'do this' and I was just using them wrong
[18:07] <JEEB> trim() basically says "I want frames X to Y"
[18:07] <JEEB> Loof, you should be able to "just hit the source with yadif and encode it with libx264"
[18:07] <JEEB> with ffmpeg
[18:07] <JEEB> which is fine if that's the level you want to keep it on :3
[18:08] <sprayd> michaelni,  a coincidence - i picked ISO/IEC 11172-2:1993 too out of random but te part 2 one :)
[18:08] <JEEB> in other words, forget about possible telecined sources and just hit it all with yadif
[18:08] <JEEB> of course
[18:08] <JEEB> I have no idea how to cut things in ffmpeg
[18:08] <JEEB> that you'd have to find out by yourself
[18:14] <Mavrik-> yadif causes horrible ghosting on non-interlaced sources though, so beware :)
[18:14] <JEEB> well, it should of course only be used on interlaced sources
[18:15] <JEEB> that much you can see from the bitstream tho
[18:15] <JEEB> so it shouldn't be a problem
[18:16] <Mavrik-> hmm, you do?
[18:16] <Mavrik-> last I checked ffmpeg couldn't reliably detect interlaced input
[18:20] <sprayd> So michaelni do you think the first link would be okay enough for the task to be closed if all of the people/organization who I approached do not reply until the task's deadline ends? If so I'll upload the first link to the task page - do you think I should do that as it seems useful to you?
[18:24] <darkstarbyte> How would I get ffmpeg to accept multiple files at once?
[18:24] <hi117> darkstarbyte as in merge inputs or batch processing?
[18:25] <darkstarbyte> ?
[18:25] <darkstarbyte> I want to make a claymation
[18:25] <darkstarbyte> and my camera named them after with time stamps
[18:25] <hi117> oh, then you are merging inputs (lots of pictures go into one file)
[18:26] <darkstarbyte> merge the pictures into one file then?
[18:26] <darkstarbyte> I was wondering how to do it
[18:26] <darkstarbyte> ffmpeg -i *.jpg did not work
[18:27] <sacarasc> If they're sequentially numbered, you can use blah%0Xd.jpg. If they're not, you'll have to pipe them in to ffmpeg.
[18:28] <hi117> ^
[18:28] <darkstarbyte> how would I pipe them?
[18:28] <hi117> "cat *.jpg | ffmpeg -i -" ?
[18:28] <darkstarbyte> ffmpeg -i $(cat *.jpg)
[18:28] <darkstarbyte> ?
[18:29] <sacarasc> "cat *.jpg | ffmpeg -f image2pipe -i -"
[18:30] <michaelni> sprayd, please upload the link
[18:30] <darkstarbyte> ok
[18:34] <darkstarbyte> How does the rest of that work
[18:40] <sprayd> ok michaelni 
[18:41] <sprayd> i have uploaded it michaelni 
[19:23] <woden> Is this the correct command to delete the audio stream from a video file?  ffmpeg -i input.webm -an output.webm
[19:24] <Tjoppen> don't forget -vcodec copy
[19:25] <Nagy> I've got a DNXHD file which ffmpeg cannot find a decoder for, should I simply upload it to the MPLayer FTP and send a mail to the mailing list. Do I need to do a bug report as well?
[19:26] <Mavrik-> woden, as Tjoppen said, you need -vcodec copy as well
[19:30] <woden> Tjoppen, Mavrik, What does the -vcodec copy do?
[19:31] <woden> Because the video stream is already VP8
[19:31] <Tjoppen> remuxes instead of transcoding
[19:32] <woden> Tjoppen, Sorry I am ignorant...what is the difference between remux and transcode?
[19:32] <Tjoppen> remux = copy the data. no quality loss
[19:33] <Mavrik-> woden, if you don't pass the -vcodec, ffmpeg will attempt to re-encode video with some default settings
[19:33] <woden> Mavrik, Got it.  Thanks.
[19:33] <Mavrik-> woden, with -vcodec copy you explicitly tell ffmpeg not to change the video stream, only to copy it
[19:33] <woden> Thanks again
[19:57] <redbal> all, anyone had any luck getting ffmpeg working on Oracle Solaris 11?
[22:37] <praedo> hello
[22:37] <praedo> is it possible to merge 2 mp4 files using ffmpeg?
[22:37] <praedo> i did MP4Box -add file1 -add file2 out.mp4
[22:37] <sacarasc> You can try, but results might not work.
[22:37] <praedo> but when i play it with a flash player it only shows the first one
[22:38] <praedo> what's the best working method?
[22:38] <praedo> i tried mencoder and i got many errors
[22:38] <praedo> but i couldn't find any ffmpeg example to do the same
[22:38] <praedo> how would that be?
[22:39] <praedo> maybe it's needed to specify the tracks
[22:47] <monstaRtruck> hi how do i rotate video 90 deg
[22:47] <monstaRtruck> i was a noob and recorded upright
[22:48] <relaxed> monstaRtruck: use the transpose filter http://ffmpeg.org/libavfilter.html#transpose
[22:49] <monstaRtruck> what about in vlc
[22:49] <relaxed> ask in #videolan
[22:50] <praedo> is it possible to merge 2 mp4 files using ffmpeg?
[22:50] <redbal> has anyone gotten ffmpeg working on oracle solaris 11?
[22:50] <relaxed> praedo: No but you can with MP4Box
[23:00] <praedo> relaxed
[23:00] <praedo> i did MP4Box -add file1 -add file2 out.mp4
[23:00] <praedo> but when i play it with a flash player it only shows the first one
[23:03] <relaxed> -cat
[23:04] <jasta> can anyone point me to an example using ffmpeg to encode raw video frames that were collected with a variable framerate?
[23:04] <jasta> i'm having issues with matching the video clock with the wall clock (the frames playback much too fast)
[23:05] <jasta> specifically i'm using the libavformat/codec APIs to do the encoding, but just an ffmpeg command-line would probably help me figure out why my code is wrong
[23:06] <jasta> x264 has the --tcfile-in parameter that lets me specify the timestamps that go with each frame and that works perfectly.
[23:07] <relaxed> jasta: ffmpeg -f rawvideo -r $framerate -s $Wx$H -pix_fmt $color -i
[23:07] <jasta> relaxed: as mentioned, there is no constant framerate here.
[23:07] <relaxed> I don't think ffmpeg handles VBR very well
[23:07] <jasta> so, it must handle VBR in some capacity.  i'm specifically using ffmpeg to output RTP.
[23:08] <jasta> but my RTP stream has strange timing behaviour.  the video plays back at abnormally high speeds and then lags slowly behind the wall clock.  it's peculiar.
[23:09] <Mavrik-> jasta, if you're using libav APIs
[23:09] <Mavrik-> are you taking both stream and container time bases in consideration?
[23:10] <jasta> Mavrik-: i believe i am, but of course i may be doing it incorrectly.  specifically i am taking the relative walltime in usec and scaling it with av_rescale_q(frameTime, AV_TIME_BASE_Q, outputCodec->time_base)
[23:10] <jasta> and assigning that to the frame->pts value before i encode it.
[23:10] <jasta> then, after encoding i take codec->coded_frame->pts and rescale it from the outputCodec->time_base to stream->time_base.
[23:11] <jasta> the stream time base is 1/90000 (RTP), and the codec's is 1/24 (i've tried both MPEG4 and H264 codecs with this time base)
[23:11] <jasta> curiously, MPEG4 doesn't have the anamolous behaviour when i play it back with mplayer, but _DOES_ have that behaviour when i use the 
[23:11] <jasta> the Android media player
[23:12] <Mavrik-> jasta, hmm... now that's funny
[23:12] <jasta> H264 (via x264) encoding has the same behaviour on both mplayer and the android media player (laggy, unexpected playback)
[23:12] <Mavrik-> did you set PTS on packet as well?
[23:12] <jasta> it's very peculiar how it plays back.  it "drifts" over time to be further and further from the wall clock (i've seen it up to 10 seconds behind realtime)
[23:12] <jasta> but that it plays back "fast", so like if i hold my hand and count to 5 with my fingers, watching the stream makes it look like i counted to 5 seconds in about 2 seconds.
[23:13] <jasta> Mavrik-: yes, i set the AVPacket pts to the result of: av_rescale_q(outputCodec->coded_frame->pts,  outputCodec->time_base, stream->time_base);
[23:14] <Mavrik-> huh.
[23:14] <Mavrik-> jasta, sorry, I'm out :\
[23:14] <jasta> i can post source code if it would help to review that way
[23:14] <jasta> i'm really stumped.
[23:14] <Mavrik-> it's been awhile since I was coding that so I'm out of ideas how to debug that
[23:14] <monstaRtruck> how do i check if i have rotate
[23:15] <jasta> i thought it might be a good idea to go back to basics and simply try to encode a video from raw, VFR frames.
[23:15] <jasta> unsurprisingly, im struggling with that as well.
[23:15] <jasta> again tho, using x264 on the command-line with --tcfile-in (lets me specify the timestamp with each frame), my video is encoded perfectly.
[23:16] <Mavrik-> mhm
[23:17] <jasta> one thought i had a while ago was that im not encoding the packet duration at all
[23:18] <jasta> but upon testing, it doesnt seem the value of this field matters at all
[23:18] <jasta> (even if i feed in junk, or 0, it still behaves the same way)
[23:18] <Mavrik-> I'm not even sure all those timestamp values are even considered
[23:19] <monstaRtruck> im geting unrec option vf
[23:19] <jasta> yeah, kinda doesnt sem like it.
[23:19] <Mavrik-> since I've been encoding videos without setting timestamps at all
[23:19] <monstaRtruck> :~~~~~~
[23:19] <Mavrik-> and the players just somehow inferred it
[23:19] <Mavrik-> of course that posed a problem when I had to sync it
[23:19] <jasta> Mavrik-: well, if you doint set pts timestamps or anything, they appear to just autoincrement with each written frame
[23:19] <jasta> which works great if you have a constant framerate :)
[23:19] <Mavrik-> jasta, other thing is... maybe ffmpeg sets FPS or something like that on container for you which confuses the players
[23:20] <jasta> Mavrik-: i would have no idea.  i'm just learning here :)
[23:20] <jasta> actually, i was only using ffmpeg because i thought it would be simpler than manually doing the encoding and RTP muxing
[23:20] <jasta> maybe i was wrong
[23:20] <Mavrik-> probably you were :)
[23:20] <Mavrik-> even though, RTP muxing is pain in the neck
[23:20] <jasta> at this point i could probably just switch to using libx264 directly and build my own RTP library
[23:21] <Mavrik-> jasta, other thing... are you sure the RTP control channel is accessable?
[23:21] <jasta> i dont know what means?
[23:21] <Mavrik-> I had problems with RTP sync because control port wasn't open
[23:21] <Mavrik-> jasta, RTP uses one port to send video and another to control transfer (usually its stream port + 1)
[23:21] <jasta> oh yes, i have confirmed packets are transmitting as expected with wireshark.  i'm also testing on a local wifi network
[23:21] <Mavrik-> jasta, or just grab libx264 and take some other RTP library
[23:21] <Mavrik-> without the ffmpeg inbetween
[23:21] <jasta> i also looked into ffmpeg source code to even understand how the RTCP control port would affect timestamps.
[23:22] <jasta> in my case, that code would not even engage.
[23:22] <monstaRtruck> what is the latest ffmpeg version
[23:22] <Mavrik-> monstaRtruck, check the topci
[23:23] <monstaRtruck> i did apt get upgrade
[23:23] <monstaRtruck> and i only at 0.6
[23:24] <jasta> Mavrik-: yeah, i think that might be the right way to go at this point.
[23:24] <jasta> at least i still have use for libswscale :)
[23:32] <jasta> Mavrik-: hey, here's an interesting observation...
[23:32] <jasta> Mavrik-: i took out my code that even tries to provide the input frame pts values and just let ffmpeg assume a constant framerate of 25fps of my packets...
[23:32] <jasta> and compared the two resulting videos...
[23:34] <Mavrik-> and?
[23:34] <jasta> the video with pts fiddling and the other playback at the same apparent speed...
[23:34] <jasta> except that mplayer prints that debug showing the presentation timestamps relative to wall time in seconds
[23:34] <jasta> like counting up from 0.0 to the duration in seconds of the video
[23:34] <jasta> the video with pts fiddling increments that number at a much faster speed.  it gets to 5.0 in about 2 seconds.
[23:36] <monstaRtruck> is the default configure gona supoert rotate
[23:37] <monstaRtruck> 0.9
[23:38] <monstaRtruck> do i need yasm
[23:39] <JEEB> yes
[23:40] <Mavrik-> jasta, hmm, I'm not even sure ffmpeg actually passes PTS value through the encoder, maybe that's the problem
[23:40] <Mavrik-> maybe JEEB knows more about that ;)
[23:40] <JEEB> no idea
[23:41] <jasta> Mavrik-: it does, i can see libx264.c uses it.
[23:41] <JEEB> the problem then is what gets pushed I guess?
[23:41] <JEEB> printf time?
[23:42] <jasta> well one sec, i need to fix something with my environment to give me more reliable results
[23:42] <jasta> im currently encoding my video with the MPEG4 codec and i really should be using x264 for a more fair test
[23:42] <monstaRtruck> omg
[23:42] <monstaRtruck> its asking me for mp3lame ver .3 but i have .4
[23:42] <monstaRtruck> omgomgomgomg
[23:43] <jasta> oh wait a minute...
[23:43] <monstaRtruck> its only 1 point
[23:43] <monstaRtruck> what can i doooooooooo
[23:44] <JEEB> monstaRtruck, huh?
[23:44] <monstaRtruck> ./configure --enable-libmp3lame
[23:44] <monstaRtruck> ERROR: libmp3lame >= 3.98.3 not found
[23:45] <monstaRtruck> 3.98.4-0ubuntu1
[23:45] <monstaRtruck> is what i have installed
[23:45] <monstaRtruck> wtf
[23:45] <JEEB> check config.log
[23:46] <jasta> hmm, *scratches head*
[23:46] <jasta> seems like only some avformat encoders understand variable framerates
[23:46] <JEEB> very much possible
[23:46] <jasta> RTP, oddly, is not one of them by its declaration?  that cant be right
[23:46] <JEEB> lol
[23:46] <jasta> JEEB: there's an AVFMT_VARIABLE_FPS flag here, only set on a small handful.
[23:46] <JEEB> sounds like fun
[23:47] <Mavrik-> monstaRtruck, you need the -dev versions of the libraries
[23:47] <JEEB> the dev package contains headers and such IIRC
[23:47] <Mavrik-> jasta, huh... that could be a problem yea :\
[23:47] <monstaRtruck> haha i was about to ravage the config script
[23:47] <Mavrik-> variable FPS is not something people would widely support
[23:47] <jasta> now we're getting somewhere.  if i try to encode as mkv (one that claims to support VFR), things start changing in behaviour drammatically
[23:48] <Mavrik-> jasta, try mpeg2-TS
[23:48] <jasta> still not correct, tho :)
[23:48] <monstaRtruck> Mavrik- it worked dood
[23:48] <monstaRtruck> !!!!!!!!!!!!!!
[23:49] <monstaRtruck> ur the master of all masters
[23:49] <monstaRtruck> of all temples
[23:50] <JEEB> unsurprising
[23:50] <JEEB> I was of course thinking that you knew what you were actually doing :3
[23:50] <JEEB> although was having you check the config.log
[23:50] <JEEB> which would have then told you that you didn't have the header file
[23:50] <JEEB> or something similar
[23:50] <jasta> Mavrik-: ok, one sec.
[23:51] <Mavrik-> jasta, at least that way you can fix the PTS counting and then tackle the format issues :)
[23:51] <JEEB> and without the header file there's no real way of using or "finding" the library now is it?
[23:55] <jasta> Mavrik-: well, interesting...
[23:55] <jasta> so it looks like my code was not incorrect afterall.  just selecting a different format and codec made it work.
[23:57] <monstaRtruck> ok now i have to ffmpegs lol
[23:58] <monstaRtruck> how do i uninstall the old one 
[23:58] <jasta> well this is not helpful though.  because my RTP encoding is still broken and i dont understand how or why
[00:00] --- Sun Dec 18 2011


More information about the Ffmpeg-devel-irc mailing list