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

burek burek021 at gmail.com
Thu Jan 31 02:05:02 CET 2013


[00:47] <obiwahn> ffmpeg -sameq -i ./input_file.mp4 -aspect 16:9 ./output_file.mp4 i found this line on the internet an dit hleps me to fix the aspect ratio of a movie
[00:47] <obiwahn> but i can not find the -sameq option in the man
[00:47] <obiwahn> what does it mean?
[00:53] <obiwahn> is there a way to set the decoding aspect ratio without reencoding?
[00:53] <obiwahn> after setting it with makemkv mplayers initila box has the right size but then snaps back to the wrong aspect
[00:57] <saste> obiwahn, -aspect and -codec copy, it might work
[00:57] <obiwahn> i have tried that as well as chaning some properties in the file
[00:57] <obiwahn> like the with but it did not help at all
[00:57] <saste> width?
[00:57] <saste> no you can't change that without re-encoding
[00:58] <saste> but you usually can set the aspect with -aspect
[00:58] <obiwahn> + Display width: 750
[00:58] <obiwahn> ill do it
[00:59] <obiwahn> it sadly blew the encoded avi up to 3 times it size
[00:59] <obiwahn> now i convert the original first
[00:59] <obiwahn> and then encode it with 2 passes again
[01:00] <obiwahn> i need to switch form mencoder to ffmpeg:)
[01:03] <obiwahn> http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide <-- where is the output file for the first pass?
[01:06] <obiwahn> ah got it:)
[01:11] <teratorn> anyone could tell me the ffplay invocation for playing raw mono audio file, S16 samples?
[01:19] <obiwahn> mh the file gets a lot bigger even thoug i just copy it using anohter aspect
[01:19] <obiwahn> why does it get bigger there is not more information
[01:21] <obiwahn> http://paste.debian.net/230289/
[01:22] <obiwahn> i am still not sure waht sameq does it does not stand for quality and it is obsolete:) but without the option the copy looks very bad
[01:22] <obiwahn> it grew from 2.
[01:23] <llogan> that paste is worthless
[01:23] <obiwahn> from 4.1 to 6.1 gb
[01:23] <llogan> seems like you're not using copy.
[01:23] <obiwahn> then the output is worthless
[01:23] <llogan> you need to include the command and the complete console output, not just a few lines
[01:24] <obiwahn> http://paste.debian.net/230290/
[01:24] <llogan> do not use sameq.
[01:25] <obiwahn> what should i use instead?
[01:25] <llogan> you're re-encoding, so of course the size will be different
[01:25] <obiwahn> without smaeq the resulting file is 380mb big ...
[01:26] <llogan> if "-codec copy" did not work with -aspect then you will probably have to re-encode.
[01:28] <obiwahn> ffmpeg -codec copy -i ./16.video.m2v -aspect 16:9 ./16.video-fix2.m2v gives me unknown decoder copy
[01:28] <llogan> because you're using -codec copy as an input option
[01:28] <llogan> option placement matters
[01:30] <obiwahn> ah ok lets see:) it is my last try for today its too late here i was just waiting for my girl to come home:) thank you saste and llogan!
[01:32] <llogan> teratorn: ffplay -f s16le -ar 48000 input.pcm
[01:32] <teratorn> llogan: thanks yeah, turned out i needed s16be to not hear garbage
[01:36] <klaxa> can anyone tell me how to build docs for libass? i can't find it in the makefile and i also can't find where to contact devs on irc
[01:36] <klaxa> are there even docs?
[01:40] <saste> klaxa, how is libass related to ffmpeg?
[01:41] <klaxa> probably in no way, like i said i can't find where to contact the devs and i figured someone in here might also work on libass
[01:41] <saste> klaxa, maybe ask on #mplayer
[01:41] <klaxa> will do thanks
[01:41] <saste> there is just one main author of libass, you may contact him by email
[01:42] <klaxa> ah... okay i should be able to get that mail from the sourcefiles then
[03:56] <praveenmarkandu> hi guys. is there any info on performance limitations of ffmpeg
[03:56] <praveenmarkandu> like how many transcodes can be run simultaneously
[03:56] <praveenmarkandu> or is it purely limited by the hardware
[04:06] <epifanio> hi All
[04:06] <epifanio> i'm tring to make an animation for a sequence of png's images .. i'm trying with the following command : ffmpeg -f image2 -i *.png -r 25 "output.mov
[04:09] <llogan> epifanio: ok
[04:09] <epifanio> but i receive this error from the command line :  http://paste.debian.net/230330/
[04:09] <epifanio> sorry .. i tried to reduce the lines in the paste
[04:10] <llogan> try adding "-pattern_type glob" as an input option
[04:11] <llogan> -r 25 is default for inputting images, so it is redundant, and "-f image2" may not be needed either
[04:11] <epifanio> like :  ffmpeg -i *.png -pattern_type glob "output.mov"   ?
[04:12] <llogan> no
[04:12] <llogan> ffmpeg [global options] [input options] -i input [output options] output
[04:13] <epifanio> i tried :  ffmpeg -pattern_type glob -i *.png "output.mov"
[04:14] <llogan> did it work this time?
[04:14] <epifanio> i got the same error log
[04:14] <epifanio> pasting it
[04:15] <epifanio> http://paste.debian.net/230336/
[04:17] <llogan> maybe libavformat was compiled with globbing support
[04:17] <epifanio> i don't know if this help .. i'm on osx using ffmpeg installed with homebrew
[04:18] <llogan> you can try cat instead
[04:18] <llogan> cat *.png | ffmpeg -y -f image2pipe -c:v png -i - output
[04:19] <epifanio> terrific!
[04:20] <llogan> i meant "maybe libavformat was *not* compiled with globbing support"
[04:20] <epifanio> it worked .. super fast
[04:20] <llogan> what are you using the output in?
[04:20] <epifanio> it is an animation of wave height in the gulf of main
[04:20] <llogan> i mean are you going to edit it in FCP or something?
[04:21] <epifanio> no, i'll embed it in a html page
[04:21] <epifanio> without editing it
[04:22] <llogan> why mov?
[04:23] <epifanio> i used mpeg
[04:23] <epifanio> no ?
[04:23] <epifanio> i means :  cat *.png | ffmpeg -y -f image2pipe -c:v png -i - output.mpeg   produces an mpeg i guess
[04:23] <epifanio> correct ?
[04:23] <llogan> oh, it's bigger than i thought. 1200x1200. i assumed you were wanting it to play in borwser, but i guess viewers will just download it?
[04:24] <epifanio> no i was supposed to publish it in browser
[04:24] <epifanio> humm ..
[04:24] <epifanio> the final size is 3.4 mb
[04:25] <epifanio> do you have any hints to decrease the size without loosing too much resolution ?
[04:25] <llogan> mpeg probably won't play in a browser. H.264 in mp4 is generally used (with a flash player).
[04:25] <llogan> file size?
[04:25] <llogan> or frame size?
[04:26] <epifanio> filesize in mpged is 3.4 mb
[04:26] <llogan> i don't know what you mean by "size"
[04:28] <epifanio> how "big" is the video in megabyte
[04:29] <llogan> see https://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide
[04:29] <epifanio> thanks, i was looking on how to change the output format to : H.264  mp4
[04:29] <llogan> then add "-movflags +faststart" as an output opyion
[04:29] <llogan> now i must go
[04:31] <epifanio> llog thanks! i'm trying
[04:32] <mattt55> hi all :-)  i'm using the deb-multimedia version of ffmpeg on debian squeeze to encode some audio tracks... i'm having trouble getting reliable ogg's (with libvorbis) - specifically, ffprobe shows (for some files) a rediculous duration, and ff shows NaN in html5 players despite that apache is serving byte-ranges... any ideas?
[04:32] <mattt55> the files do play, btw... but frequently only for a few (seemingly random amount of) seconds
[04:32] <mattt55> also encoding same files to mp3, which seems to be going swiimingly :-)
[04:34] <mattt55> (errr... i mean same origin files - a mixture (usually flac, mp3 or ogg))
[05:58] <leo2013> hello
[05:59] <leo2013> I want to add one encoder for h264 on hardware but not x264.
[05:59] <leo2013> I'm meeting one problem about how to calculate the time stamp for h264 in ffmpeg,
[05:59] <leo2013> in which one after one frame comes continously.I try to use
[05:59] <leo2013> pkt->pts = frame->pkt_pts;
[05:59] <leo2013> pkt->dts = frame->pkt_dts;
[05:59] <leo2013> but it's not correct.
[05:59] <leo2013> Who could help me about this,thanks!
[07:23] <praveenmarkandu> does FFMpeg support encoding WEBVTT subtitles into mpegts streams yet?
[07:23] Action: praveenmarkandu referencing https://datatracker.ietf.org/doc/draft-pantos-http-live-streaming/?include_text=1
[07:24] <praveenmarkandu> section 4. Media Segments
[07:27] <tomahawk> I am new to FFmpeg. I want to know how to set sample aspect ratio (SAR) in cli
[07:29] <tomahawk> Please someone help me. Currently I am working in a Vindoz machine. Using ffmpeg-20130103-git-43adc62-win32-static
[07:31] <tomahawk> I have read the docu already. Tried the same commands in console. None working. Here is the command I tried.
[07:31] <tomahawk> http://pastebin.com/CmZgNVHn
[07:38] <wakoinc> I am working on a project that involves processing audio from multiple microphones and cancelling background noise. Is FFmpeg a good fit for processing the audio streams and outputting a single stream?
[07:43] <praveenmarkandu> tomahawk, whats the output
[07:43] <praveenmarkandu> pastebin
[07:49] <tomahawk> Praveenmarkandu, here is the output: http://pastebin.com/NcLuhRBV
[08:05] <K-Rich> hi all, i am having an issue with well, i guess tearing, blue and white flashes when recording my desktop. I am using linux mint 13, kernel 3.2.0-36, ffmpeg 0.8.5-4:0.8.5-0ubuntu0.12.04.1, ndivia driver 304.64.... i am using the command line: ffmpeg -acodec pcm_s16le -f alsa -i pulse -s 1280x800 -qscale 1 -r 30 -vcodec rawvideo -f x11grab -i $DISPLAY -s 640x356 -vf pad=640:360:0:2:000000 ~/Desktop/`date +%F_%T`.avi'    ---   Any ideas?
[08:07] <K-Rich> cinnimon desktop
[08:16] <tomahawk> praveenmarkandu, I can't even determine the source video's par with -i option.
[08:32] <K-Rich> http://www.youtube.com/watch?v=sphlXIJp-vU   sample of my issue
[08:33] <K-Rich> anyone?
[08:33] <K-Rich> i mean i'd hate to make a screencast and some epileptic have a seizure
[08:35] <K-Rich> brb, please memo if you kno a solution in the mean time
[08:38] <K-Rich> same with vsync on or off in nvidia drive, same with cinnamon2d
[08:42] <praveen> tomahawk, par? you mean sar or dar?
[08:42] <tomahawk> I mean SAR
[08:43] <praveen> i normally use ffprobe
[08:44] <praveen> try ffprobe -v quiet -print_format json -show_format -show_streams <inputfile.mp4>
[08:44] <tomahawk> Let me try that
[08:44] <praveen> you should pipe that to less or something
[08:45] <tomahawk> That works.
[08:45] <praveen> or | grep aspect
[08:45] <K-Rich> praveen or tomahawk would you know anything about my issue?
[08:46] <tomahawk> Thanks. The source video's SAR and DAR is 0:1. So can I change it to 1:1? Which command to use?
[08:46] <praveen> im a noob at ffmpeg. but wouldnt your -aspect command conflict with your setsar
[08:47] <tomahawk> So should I remove the -aspect command
[08:48] <praveen> not only that, the way setsar is used seems wrong. it says invalid argument
[08:49] <tomahawk> Can you tell me how to use the setsar command? I have read the whole docu several times. But nothing works...
[08:54] <praveen> try -vf setsar="1:1"
[08:54] <praveen> im just guessing
[08:54] <praveen> probably wrongg
[08:54] <tomahawk> Thanks. Let me try that.
[08:55] <praveen> i just googled ffmpeg setsar and thats how people have written it
[08:55] <praveen> seem to get more output than you
[08:57] <tomahawk> I have been googling about this for a couple of days. Reading the docu. Trying examples. Ok.
[08:58] <tomahawk> My main issue is that I have to upload some files to vimeo. Vimeo has the clear spec that the video should have 1:1 Pixel Aspect Ratio (aka Sample Aspect Ratio).
[09:02] <tomahawk> praveen, here is the output: http://pastebin.com/qGxULavs
[09:18] <praveen> tomahawk, sorry mate. way beyond me
[09:33] <tomahawk> Ok. Thanks for your help. I think I'll find out the rest myself. Thanks alot
[09:48] <tomahawk> praveen, through your lead, I could finally fix it. Here is the command: http://pastebin.com/a0Tc99FF  / thanks alot
[10:42] <praveen> Hi. quick question. does ffmpeg support full multithreading for decoding and encoding?
[10:45] <Mavrik> yes
[10:45] <Mavrik> it depends on encoder / decoder
[10:45] <Mavrik> but ffmpeg does support multithreaded encoders / decoders :)
[10:47] <praveen> Mavrik, specifically the x264 encoder?
[10:47] <praveen> yes?
[10:47] <Mavrik> x264 supports multithreaded encoding very well :)
[10:54] <praveen> Mavrik, thanks
[10:55] <praveen> actually, another question. is the performance of FFmpeg just limited to the amount of hardware i have
[10:55] <praveen> does it scale well?
[11:01] <Mavrik> praveen: um
[11:01] <Mavrik> praveen: depends on what you're doing
[11:01] <Mavrik> x264 scales well to about 4-6 cores
[11:01] <Mavrik> after that more cores don't actually give more performance
[11:01] <Mavrik> so having as high CPU clock as possible is important
[11:01] <Mavrik> everything else is secondardy
[11:01] <Mavrik> *secondary
[11:04] <praveen> Mavrik, but what happens if I have multiple transcodes going on?
[11:05] <praveen> would more than 6 cores help?
[11:06] <Mavrik> probably
[11:06] <Mavrik> but usually buying more machines for that use case is cheaper
[11:06] <praveen> hmmm yep. company looking to buy hardware for our transcodes
[11:07] <praveen> btw, are you a dev?
[11:07] <JEEB> Mavrik, that depends on the settings you're using btw @ x264 scaling, and lately'ish after D_S made the lookahead multithreaded as well
[11:07] <Mavrik> JEEB: possibly
[11:07] <Mavrik> I've tested that about 3 months ago
[11:07] <JEEB> also the development tree has new optimizations now in general :3
[11:07] <Mavrik> and it stopped scaling at about 6 cords
[11:07] <Mavrik> *cores
[11:07] <Mavrik> for "slow" preset 720 transcodes
[11:07] <JEEB> make sure you're not restricted by the decoding
[11:08] <JEEB> and yes, I remember at one point the slower presets didn't scale as much
[11:08] <JEEB> but after lookahead multithreading it should be better off
[11:09] <JEEB> I would like to test at some point with a beefy machine :V
[11:09] <JEEB> too bad people generally don't have 12-core CPUs available for some testing
[11:09] <JEEB> and/or 4xquad core machines
[11:10] <praveen> JEEB, would help test, but dont plan on buying such high specs.
[11:11] <JEEB> well, yeah -- in general a nice ivy quad core would already handle what you need nicely, and then just buy more of them when needed
[11:11] <Mavrik> yeah, I test on 6-core Xeon
[11:12] <Mavrik> 8-cores are fricking expensive
[11:12] <Mavrik> cheaper to just get another 1U unit
[11:12] <JEEB> yes
[11:12] <JEEB> haswell optimizations are also incoming IIRC, although some of it ended up being rather... derpy from the instruction set specifications
[11:13] <JEEB> (and no, the x264 folk don't get new CPUs before hand, the only case of them getting some was when a rather big company poked Intel -- and even then the machine was gotten very close to release date for testing)
[11:14] <Mavrik> mhm
[11:21] <praveen> lol
[13:51] <cousteau> in which version were filters (-vf) introduced?
[13:52] <burek> did you check git log
[13:53] <burek> http://git.videolan.org/?p=ffmpeg.git&a=search&h=HEAD&st=commit&s=-vf
[13:53] <burek> i think this one is the one you are looking for: "rename -vfilters cli option to -vf"
[13:57] <cousteau> So what version is that?
[13:57] <burek> it says there
[13:57] <cousteau> mine is so incredibly old that it doesn't even have a -vfilters option
[13:57] <burek> the exact commit version
[13:58] <burek> what does your ffmpeg say in the version text?
[13:58] <cousteau> 0.6 or so
[13:58] <cousteau> (yeah, so old it hurts)
[13:59] <cousteau> I think I'll just use imagemagick for the resizing operations
[14:00] <burek> :)
[14:00] <cousteau> I was just converting a video to frames and then resizing the frames; I can use imagemagick for that  (which involves adding extra commands and a for loop, but anyway)
[14:01] <cousteau> wait, no need for a for loop if I use mogrify
[14:03] <burek> cousteau
[14:03] <burek> could you try static builds of ffmpeg?
[14:07] <cousteau> could be an option
[14:09] <cousteau> "static" = "no lib dependencies", right?
[14:10] <cousteau> anyway, I have already fixed it using imagemagick mogrify.  It's an ugly workaround but it works.  Anyway, good to know I can get static builds.
[14:11] <jeje34> Hi to all;-)
[14:12] <jeje34> I have a problem when I use av_image_alloc function, it return me error -22 "Invalid data found when processing input"
[14:13] <jeje34> In my code, I use avcodec_alloc_frame to get my AVFrame* pointer
[14:14] <jeje34> and jsut after, I call av_image_alloc to allocate the AVFrame data buffer
[14:14] <jeje34> but it return me -22
[14:17] <jeje34> the calling code is av_image_alloc(m_lpFrame->data, m_lpFrame->linesize, AV_PIX_FMT_RGB32, m_lpCodecCtx->width, m_lpCodecCtx->height, 32);
[14:18] <jeje34> with width=720 and height=576
[14:24] <burek> did you check the docs for avcodec_alloc_frame
[14:26] <jeje34> burek > yes: Allocate an AVFrame and set its fields to default values.
[14:27] <burek> http://ffmpeg.org/doxygen/trunk/group__lavc__core.html#gad5f9212dec34c9fff0124171fa684a18
[14:28] <jeje34> burek > yes and so, it return me a valid pointer
[14:28] <jeje34> burek > but it doesn't allocate the buffer of the AVFrame
[14:29] <jeje34>  burek > so I need to call av_image_alloc just after it seems
[14:29] <burek> it allocates AVFrame struct, not buffer
[14:29] <burek> zes
[14:29] <burek> yes
[14:31] <jeje34>  burek > but if I make my call to av_image_alloc(m_lpFrame->data, m_lpFrame->linesize, AV_PIX_FMT_RGB32, m_lpCodecCtx->width, m_lpCodecCtx->height, 32); just after, the av_image_alloc return me an error and the buffer (data pointers in my AVFrame) are not allocated
[14:32] <burek> jeje34, did you check examples
[14:32] <burek> related to that function
[14:32] <burek> (on that page)
[14:33] <jeje34> burek > when looking this example:http://ffmpeg.org/doxygen/trunk/doc_2examples_2decoding_encoding_8c-example.html#a34
[14:34] <jeje34> In the decoding video part (it's my case, decoding H264 from an IP camera) I just see the avcodec_alloc_frame and never see he av_image_alloc
[14:37] <burek> just follow the examples
[14:37] <burek> People spent time creating time, now you spend time understanding them :)
[14:38] <jeje34> yes but if I'm true, I never have to call the av_image_alloc
[14:38] <jeje34> I can't understand this
[14:40] <jeje34> or the avcodec_decode_video2 allocate them for me...
[14:43] <suzaru> ffmpeg supporting concat for m4a files?
[14:43] <suzaru> or have to demux
[14:48] <burek> suzaru, isn't it faster to just test it? :)
[14:54] <zmode> hi. i'm unable to play .flac files with mplayer2 and to my understanding this has to do with ffmpeg1 on my system. i get this output: http://bpaste.net/show/4olrx4S4mEUNeeubl9oS/ . is there something i need to change in my make options?
[14:55] <durandal_1707> there is no ffmpeg1
[14:56] <durandal_1707> this is not mplayer2 support channel
[14:57] <durandal_1707> you are using old mplayer2 with new lavf/lavc
[14:57] <zmode> i meant ffmpeg-1.0.1
[15:00] <ubitux> does it play with ffplay?
[15:00] <ubitux> if so, you should ask #mplayer2
[15:00] <zmode> ubitux: no, i get a "could not open codecs" error
[15:00] <jeje34> burek> if I do the same thing than in decoding video example, at the end, it just call avcodec_free_framebut in the documentation, there's a warning:this function does NOT free the data buffers themselves. So, the buffer themselves are never free?
[15:01] <zmode> i also couldn't get mpd to play .flac files which is why i asked here first
[15:01] <ubitux> zmode: pastebin the full output of ffplay
[15:02] <zmode> ubitux: http://bpaste.net/show/A9SfVjYuHht8RpONMVOm/
[15:02] <ubitux> that is very old
[15:03] <ubitux> 0.7& we release 0.8, 0.9, 0.10, 0.11, 1.0 and 1.1 since then
[15:05] <burek> jeje34, im not a developer, so im not of much help :S
[15:05] <burek> you might ask in ffmpeg-devel, but be patient, because people there dont have much spare time for chit-chat
[15:06] <someone-noone1> Hello! I'm writing video player based on libav* (Yes, I know about ffplay). Currently, I'm implementing a\v syncing (Yes, I saw how it's implemented in ffplay).
[15:06] <someone-noone1> I have strange thing while decoding video and calculating PTS values with next code:
[15:06] <someone-noone1> http://ideone.com/75nWG5
[15:07] <durandal_1707> burek: do not direct people that ask for user help to dev channel
[15:07] <durandal_1707> i may kick you next time there if I'm in really bad shape...
[15:07] <burek> ok..
[15:08] <someone-noone1> If for each frame I will find prev_pts - current_pts (value is directly in milliseconds) sometimes it's 41ms, which is exactly equal 1000ms\24fps
[15:08] <jeje34> durandal_1707>I'm ok with you but where can I find an answer to my question
[15:08] <someone-noone1> But sometimes, it's more then 100ms and more over, sometimes it's NEGATIVE/
[15:08] <someone-noone1> How can you explain it?
[15:08] <jeje34> I think I'm in the right chatroom
[15:09] <someone-noone1> btw, stream is mpeg-ts (h264+aac)
[15:09] <burek> someone-noone1, does prev_pts - current_pts have to be constant?
[15:09] <durandal_1707> jeje34: did you carefuly read documentation and read examples?
[15:10] <someone-noone1> burek, no but why it can be negative?
[15:10] <durandal_1707> jeje34: i can provide my limited hely to you in my spare time
[15:10] <someone-noone1> Sorry, not prev_pts-current_pts, but current_pts-prev_pts
[15:10] <durandal_1707> s/hely/help
[15:10] <jeje34> durandal_1707> yes but there is the memory part of the AVFrame I don't understand...
[15:11] <burek> someone-noone1, frame ordering is arbitrary, that's why there are pts/dts
[15:11] <someone-noone1> Looks like frames are ordered in decoding order, but doesn't avcodec_decode_video2 should order them in play order?
[15:11] <burek> not really
[15:11] <burek> it makes sense in some cases
[15:11] <burek> to decode some future frames first
[15:12] <burek> in order for other (delta) frames to have their needed data available
[15:12] <burek> (some delta frames might reference the frames in the future, not only in the past)
[15:12] <someone-noone1> burek, I know about I,P and friends frames
[15:13] <someone-noone1> But again, shouldn't avcodec_decode_video order them in play order?
[15:13] <burek> isn't it faster and more convenient if you order them in decode order?
[15:13] <burek> (doesn't require seeking)
[15:14] <someone-noone1> burek, then how should I draw those frames? Pre-buffer and make valid order?
[15:14] <burek> if you have I1,B1,B1,P1,I2
[15:14] <burek> B2*
[15:14] <burek> isn't it obvious that you might need I2 decoded (together with I1) in some point in time
[15:16] <someone-noone1> burek, yes it's obvious. But why is there in avcodec_decode_video2(& ,int *got_picture,&) parameter? If decoding fails(need more frames), I just should be notified and continue decoding, but frames should be in play order. Isn't it?
[15:17] <burek> couldn't you check how did ffplay do it?
[15:17] <Mavrik> because you're not always giving full frames to decoder
[15:18] <Mavrik> so if you have certain formats
[15:18] <Mavrik> you'll feed decode_video2 with data but it won't be able to return you a frame
[15:18] <Mavrik> and no, decode_video2 will not reorder frames for you, it wouldn't make sense on that level
[15:19] <someone-noone1> Mavrik, that is what I wanted to hear. Thanks
[15:19] <someone-noone1> I thought, it makes reordering..
[15:19] <Mavrik> nope, it just decodes frames as soon as it can
[15:19] <Mavrik> usually you get them out in the same order as you add them to the queue... that's in DTS order most cases
[15:19] <Mavrik> so you'll need a queue to reorder frames by PTS if your format has B frames
[15:21] <someone-noone1> Mavrik, thanks
[15:29] <Aziroshin> Hello. :o
[15:30] <Aziroshin> I am trying to stream to twitch.tv using ffmpeg. My problem is that the audio gets horribly out of sync. When using -async 1, the audio goes away completely.
[15:30] <Aziroshin> (there might be some audio fragments left, however)
[15:30] <suzaru> i cant seem to join .h264 files into 1
[15:31] <suzaru> ffmpeg -i 1_Output.h264 -i 2_Output.h264 -i 3_Output.h264 -i 4_Output.h264 -i 5_Output.h264 -i 6_Output.h264 -c copy -bsf h264_mp4toannexb final.h264
[15:31] <suzaru> that's wrong i guess?
[15:31] <Mavrik> suzaru: yeah, that creates 6 streams in file :)
[15:31] <suzaru> only needed one -i ?
[15:32] <Aziroshin> The command that I use goes somewhat like this: ffmpeg -async 1 -f x11grab -s <inres> -r 30 -i :0.0 -f alsa -ac 2 -i <card> -vcodec libx264 -s <outres> -acodec libmp3lame -ab 128k -ar 44100 -threads 0 -f mp4 test.mp4
[15:32] <Mavrik> ffmpeg really can't handle concating files well :\
[15:32] <Mavrik> I suggest you find a better tool
[15:32] <Mavrik> Aziroshin: you should probably move async parameter after "-async"
[15:32] <ubitux> < Mavrik> ffmpeg really can't handle concating files well // ???
[15:32] <ubitux> it has at least 3 ways of concatening files
[15:33] <durandal_1707> protocol, demuxer and filter
[15:33] <Mavrik> yes, and most of them don't work well
[15:33] <Aziroshin> Mavrik: What exactly do you mean?
[15:33] <Mavrik> unless there have been significant code changes in latest gits
[15:34] <ubitux> what doesn't work?
[15:34] <ubitux> https://ffmpeg.org/faq.html#How-can-I-concatenate-video-files_003f
[15:34] <durandal_1707> Aziroshin: you sure your machine is really fast so it can encode h264 real time?
[15:34] <durandal_1707> btw how fast it should be to encode it realt time?
[15:35] <Mavrik> ubitux: that was not there a stable version ago, no need to get hostile -_-
[15:35] <durandal_1707> where is prey?
[15:35] <ubitux> how am i hostile?
[15:36] Action: durandal_1707 likes predators (movies)
[15:36] <Aziroshin> durandal_1707: To be honest, I am not sure how fast a machine should be for that. The idea is, however, that in case the machine should slow down temporarily during a stream, that this would not damage synchronicity anyway.
[15:37] <Aziroshin> So, I have to find a way to force it to be synchronous without the audio quality suffering, which means that I would like to make ffmpeg drop frames when required.
[15:37] <Aziroshin> The audio has to stay in sync and top quality at all costs.
[15:37] <durandal_1707> Aziroshin: i dunno how you machine is fast, did you try ultra fast preset?
[15:38] <suzaru> i seem to lose sync when i mux .aac files back to m4a with ffmpeg. i demuxed them from m4a
[15:38] <suzaru> when i mux it with the video it is out of sync somewhat
[15:39] <suzaru> if it possible when it joins the .aac files it introduces some sort of minor delay at the points where it joins
[15:39] <suzaru> is it*
[15:40] <durandal_1707> pastebin commands
[15:41] <Aziroshin> durandal_1707: AMD Phenom II 955, it's a quad core processor. It has some of the best single core performance AMD CPUs offer today. Not sure whether that should be enough.
[15:41] <durandal_1707> Aziroshin: i dunno either, you are only one that can test it....
[15:41] Action: durandal_1707 brb
[15:42] <Aziroshin> Yeah, but as said, that's not that much the problem. If the processor should be too slow, either naturally, or because other processes take up too much CPU, the idea is that the audio does not go out of sync.
[15:42] <Aziroshin> That's what I am trying to figure out.
[15:42] <Aziroshin> What I forgot to say is, that the audio goes out of sync when recording to a file as well.
[15:42] <Aziroshin> That was when I tried with flv, though. Let's do that with mp4...
[15:43] <Aziroshin> (-async kills the synchronicity in both cases, flv and mp4)
[15:43] <Aziroshin> kills the sound, sorry. Mistake.
[15:44] <suzaru> i did something like this i believe
[15:44] <suzaru> ffmpeg -i 1_Output.m4a -c:a copy -bsf:a aac_adtstoasc 1.aac
[15:44] <suzaru> ffmpeg -i 2_Output.m4a -c:a copy -bsf:a aac_adtstoasc 2.aac
[15:44] <suzaru> ffmpeg -i concat:"1.aac|2.aac" -c:a copy -absf aac_adtstoasc final2.m4a
[15:48] <Aziroshin> Okay, it seems it doesn't record my audio properly anymore at all. I've already invested so much time in finding a solution to these issues some days before, it's ridiculous. I am taking a break here.
[15:48] <Aziroshin> Probably I'll have to somehow shoehorn in a third sound interface, maybe via USB, to run a dedicated pulseaudio process. I hear it syncs things properly.
[15:51] <Aziroshin> At least someone reported that, if he uses -i pulse, things get in sync. Also, all help available through google on that subject is purely pulse centric.
[15:52] <Aziroshin> The problem is, though, that that will likely help me little with streaming wine based games. But maybe with some loopback trickery, something can be done.
[16:23] <someone-noone> Hello! I'm developing video player based on libav* (Yes, I know about ffplay). I'm trying to reorder(by pts value) decoded video frames with next code: http://ideone.com/P0FN5G
[16:23] <someone-noone> But looks like they're misordered! But if I do not make any reording, they're coming in right(playing) order. Why is it happening?
[16:33] <Mavrik> someone-noone: use "av_frame_guess_best_effort_pts" to get frame pts
[16:33] <Mavrik> it's not always the same as packet pts
[16:33] <Mavrik> not to mention the fact that decoder may buffer data
[16:33] <Mavrik> check the decoding samples
[16:34] <someone-noone> Mavrik, btw, I just realized, thet avcodec_decode_video2 ALWAYS returns video in PTS order!
[16:34] <someone-noone> https://github.com/mpenkov/ffmpeg-tutorial/issues/7 here is explained
[16:34] <someone-noone> you have confused me :(
[16:36] <Mavrik> there's nothing in the source of that function that would assure that
[16:37] <someone-noone> Mavrik, I don't see any reorder stuff in ffplay.c
[16:37] <someone-noone> pict_windex is always incrementing by 1
[16:57] <gmag> hi, is it possible to decode a stream from a container and output one yuv file for each frame?
[17:11] <navaismo> Hi, im trying to stream my webcam using ffmpeg and ffserver but when I ran the command:  ffserver -f /etc/ffserver.conf & ffmpeg -v verbose -r 5 -s 640x480 -f video4linux2 -i /dev/video0 http://10.0.1.103:8000/webcam.ffm
[17:11] <navaismo> i get the error: Unknown input format: 'video4linux2
[17:17] <durandal_1707> gmag: yes, see image2 muxer and rawvideo encoder
[17:23] <zmode> hi. i was here a while ago, unable to play .flac files. i was running and older ffplay version, but i'm having no luck with 1.0.1 either http://dpaste.com/900471/ . the folks over at #mplayer2 asked me to try compiling ffmpeg with avresample, but i still get no sound
[17:23] <durandal_1707> mplayer2 indeed need avresample
[17:23] <durandal_1707> zmode: why not use mpv instead
[17:24] <durandal_1707> you know, mplayer2 main developer develops on libav only
[17:24] <zmode> zmode: because i use mplayer2, but this doesn't seem to be an mplayer2 issue now, since ffplay can't play it
[17:24] <durandal_1707> ffplay can play flac just fine
[17:25] <zmode> not on my box
[17:26] <durandal_1707> looks like you actully have some audio driver problem
[17:26] <durandal_1707> what OS are you using and what audio driver?
[17:27] <durandal_1707> or you have very old sdl version which doesnt play well...
[17:27] <durandal_1707> because ffplay use sdl to play audio ....
[17:30] <zmode> i have sdl 1.2.15 which is the latest stable from what i gather. and indeed ffplay has trouble with .mp3 files (just tested actually). i'm using FreeBSD 9.1 and 'cat /dev/sndstat' returns 'FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)'
[17:32] <durandal_1707> zmode: does any other audio app works/plays ok?
[17:32] <zmode> durandal_1707: yeah, i do have audio
[17:33] <durandal_1707> perhaps sdl is miscompiled/misconfigurated
[17:33] <durandal_1707> or you compiled ff* without sdl support...
[17:35] <durandal_1707> or if other sdl apps on your system works ok then you miscompiled ffmpeg
[17:40] <zmode> ffmpeg doesn't seem to even make ffplay if sdl is disabled; but yes, i compile it with SDL.
[17:41] <zmode> doesn't seem to depend on sdl_mixer or sdl_sound packages though
[17:44] <durandal_1707> why you have some strange stuff in your configuration?
[17:44] <durandal_1707> try to disable all that and see if ffplay works
[17:44] <zmode> disable all what?
[17:45] <durandal_1707> your ./configure --arguments
[17:46] <zmode> i was saying it _doesn't_ depend or pull any of these
[17:48] <durandal_1707> so if you compile static ffplay it have same problem?
[17:57] <zmode> durandal_1707: i'm sorry, it's been about 4 hours on this now. i might try later. thanks for your time
[18:15] <gmag> durandal_1707, I am having a hard time extracting yuv frames from a container with ffmpeg. I can only extract one single file (ffmpeg -i x_video.mp4 -r 25 -pix_fmt yuv420p ./outs/foo-%03d.yuv). Any idea how to change this to output every single frame?
[18:15] <Diogo> hi i need to compile libxvp8
[18:15] <Diogo> http://pastebin.com/DFD0g70q
[18:15] <Diogo> appear this error
[18:16] <Diogo> my SO is debian..
[18:16] <gmag> SO?
[18:16] <gmag> where you from Diogo
[18:17] <gmag> country
[18:19] <antonello> hi, I want Know the differenceerence betwen sample format and pcm .... Is it the same ?
[18:28] <durandal_1707> antonello: sample_fmt says what kind of pcm is it about
[18:36] <antonello> ok , So .. if i Want obtain a stream pcm i can stop at the decoding and possibly make a swr_convert() .Is it correct?
[18:42] <gmag> durandal_1707, the output is a single file called "foo-%03d.yuv"
[18:46] <durandal_1707> gmag: i cant help you if you ignore me, read what ffloger (bot) said
[18:50] <epifanio> hi All, do you kniw if pyffmpeg is able to make videos from an image sequence ? at the moment i'm using a system call to ffmpeg from inside a python script
[18:50] <epifanio> the command i'm using is : os.system('cat *.png | ffmpeg -y -f image2pipe -c:v png -i - -c:v libx264 -preset ultrafast -qp 0 -movflags +faststart time.mkv')
[20:07] <barque> When I encode videos with ffmpeg the duration of FormatContext comes out wrong/bad
[20:08] <barque> any idea how to force/workaround this issue?
[20:08] <barque> ffmpeg and vlc give the right numbers
[20:08] <barque> when executed
[20:08] <barque> however with libavcodec the duration part of formatcontext comes out wrong
[20:29] <barque> Hello?
[22:24] <edmund_> hello -- i am trying to a 'data' stream from an ASF container. i have tried `ffmpeg -i stream.asf -map 0.2 -f rawvideo sub.txt` and `ffmpeg -i stream.asf -map 0.2 -f srt sub.txt`, both of which fail for different reasons.. can anyone help?
[22:24] <edmund_> this what what the stream (that i want) is reported as: "Stream #0.2(eng), 0, 1/1000: Data: [0][0][0][0] / 0x0000, 10 kb/s"
[22:25] <edmund_> trying to +extract a data stream
[22:27] <edmund_> in the case of `-f srt`, i get the error "Output file #0 does not contain any stream".
[22:28] <edmund_> and in the case of `-f rawvideo`, i get "Codec type mismatch for mapping #0.2 -> #0.0"  (understandably -- but i was following some suggestions online for subtitle extraction)
[22:29] <edmund_> and this is what ffprobe says: http://pastebin.com/3GnJ1UEe
[22:35] <edmund_> should i go to the mailing list instead? :)
[22:45] <llogan> edmund_: you're not using ffmpeg from FFmpeg.
[22:46] <llogan> we support ffmpeg from FFmpeg here.
[23:22] <ashes> hello
[23:23] <ashes> i want to do 2 pass xvid encoding to reduce the size of videos, to be displayed on a 7 inch tablet. is it possible for me to set the display size when i'm encoding?
[23:37] <ashes> nm
[23:45] <edmund_> this article is not very illuminating.
[23:45] <edmund_> but, i get it.
[00:00] --- Thu Jan 31 2013


More information about the Ffmpeg-devel-irc mailing list