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

burek burek021 at gmail.com
Sun Nov 3 02:05:01 CET 2013


[01:59] <vl4kn0> Hi, is there a way for ffmpeg to set constant quality so that movies that are already of bad quality won't get any worse, but movies that are of HD quality will get worse?
[02:02] <sacarasc> -crf!
[02:06] <vl4kn0> sacarasc: thanks!
[02:10] <vl4kn0> sacarasc: is it possible to use that option when capturing a screenshot or do I need to re-encode the input to libx264 first?
[02:10] <sacarasc> -crf is an x264 option. Though it might work with vpx too.
[02:12] <vl4kn0> sacarasc: I'll re-encode the video first then.
[02:12] <sacarasc> There is -q (I think) which works with other codecs, IIRC.
[02:12] <sacarasc> But I'm a little busy at the moment, so can't look it up.
[05:38] <funyun> hi. i'm using -ab 224k to transcode my 384k audio to a lower bitrate but ffmpeg keeps giving me 448k. can anyone tell me why this is and how can i fix it?
[05:50] <funyun> sacarasc: http://pastebin.com/FvvhmUPs
[05:57] <LithosLaptop2> maybe -target ntsc-dvd overrides your choice. not sure
[05:59] <funyun> LithosLaptop2: so there's no way to get 224k with -target ntsc-dvd?
[06:50] <LithosLaptop2> hmm not sure
[07:30] <UnderSampled> Hello
[07:31] <UnderSampled> Is there a good way (doesn't have to be with ffmpeg) to take a bunch of video files and automatically split each different camera angle (or scene change, same thing) into separate files?
[12:40] <snooky> hi all
[12:40] <tommycannady> hi :)
[12:40] <snooky> how i can set a targetsize in ffmpeg?
[12:40] <snooky> i dont really good speak englich
[12:40] <snooky> english
[12:41] <KnightHawk3> When I use ffmpeg to hardcode subs into a series of png's (I am converting it to a gif later), the subs start from the begining; not the point I start the video (AKA -ss 600, the subs start at 0 seconds and the video is at 600) how would I go about syncing them so they match up with what is being said? (Example of my command http://pastebin.com/HX2iyuGR)
[12:41] <KnightHawk3> Wow that is long anyway if anybody gets what I am asking and knows the flags (I can't seem to find them because I suck at research...) let me know heh
[12:41] <snooky> i want transcode an mkv file with 7,28GB size from 1080p to 720p mkv file with MAX 3,5GB filesize
[12:43] <KnightHawk3> snooky: So you want to resize it and compress it?
[12:43] <KnightHawk3> snooky: to meet a certain size
[12:43] <snooky> KnightHawk3: yes
[12:44] <snooky> -s hd720
[12:46] <KnightHawk3> snooky: http://www.helyar.net/2009/how-to-set-target-file-sizes-in-ffmpeg/ and http://www.helyar.net/2009/ffmpeg-target-file-sizes-again/ have scripts he uses to calculate bitrate to meet a size, and it converts it. You can probably modify the commands to do it.
[12:46] <KnightHawk3> snooky: Thats my unhelpful advice atleast.
[12:46] <snooky> ok
[12:47] <snooky> you know ripbot?
[12:47] <snooky> there i say target size and it runs automatical
[12:47] <KnightHawk3> I do now
[12:47] <KnightHawk3> Okay
[12:47] <snooky> in 2pass mode
[12:47] <snooky> avidemux too
[12:47] <snooky> but is all with gui. and i run it on a server in a shell
[12:48] <KnightHawk3> I see
[12:49] <KnightHawk3> snooky: Its probably doing what the python scripts do, except wtih a gui and delphi
[12:49] <KnightHawk3> snooky: as a guess
[12:50] <snooky> so, i want
[12:50] <snooky> extract the mkv, delete the english audio source, edit the video file with X target size and 720p, merge the video and german audio file to a new mkv
[12:52] <KnightHawk3> Other than the changing target size, I have a vague idea of how to do that
[12:56] <KnightHawk3> ffmpeg -i source.mkv -i new_audio.mp3 -vcodec copy -acodec copy -vf scale:-1:720 -acodec video.mkv -newaudio
[12:56] <ubitux> -newaudio doesn't exist anymore since ages
[12:56] <ubitux> learn to use -map
[12:56] <snooky> KnightHawk3: ok, but that dont set a target size, or?
[12:56] <KnightHawk3> I never claimed to know what I am doing
[12:56] <KnightHawk3> Hehe
[12:57] <KnightHawk3> snooky: I am not qualified help you haah, I can't really help sorry
[14:11] <burek> how to solve this problem:
[14:11] <burek> if i want to extract a single audio channel and save it as a standalone stream, i would do: ffmpeg -i input.wav -map_channel 0.0.0 -map 0 out.mkv
[14:11] <burek> if i want to do the same, but selecting 2 channels as 2 separate audio streams, i would do: ffmpeg -i input.wav -map_channel 0.0.0 -map 0 -i input.wav -map_channel 0.0.1 -map 1  out.mkv
[14:12] <burek> in which case i get an error like: Option map_channel (map an audio channel from one stream to another) cannot be applied to input file input.wav -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
[14:13] <burek> how to tell ffmpeg that i want -map option to be applied to the output and not to the next input
[14:26] <burek> hm, i solved it using this: ffmpeg -i 6_Channel_ID.wav -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map 0:0 -map_channel 0.0.0:0.0 -map_channel 0.0.1:0.1 -map_channel 0.0.2:0.2 -map_channel 0.0.3:0.3 -map_channel 0.0.4:0.4 -map_channel 0.0.5:0.5 out.wav
[14:27] <burek> i'm just not sure why there has to be "-map" options before "-map_channel" options.. i guess that way we tell ffmpeg that our output will have 6 streams or so..
[14:28] <burek> geez... the output of out.wav, when played with ffplay is so scary :S
[15:29] <AlVal> freebsd - portmaster keeps wanting to Re-install ffmpeg-2.1,1
[15:30] <AlVal> even though I read UPDATING and did portmaster -o multimedia/ffmpeg multimedia/ffmpeg1
[15:30] <AlVal> (The port ffmpeg was updated, ffmpeg1 and ffmpeg-devel were removed in   favor of ffmpeg)
[15:51] <slooth> Hello. While doing: ffmpeg -f video4linux2 -i /dev/video0 -s wxga -i /dev/video0 -sameq output.avi, I'm getting "Unknown input format: video4linux2". This worked on Debian Wheezy as it is, but I upgraded to debian jessie (ffmpeg version: 0.8.6) and it stopped working. The video camera is working alright (with luvcview, for example). Any ideas? Thanks
[16:01] <Jan-> is there a way we can get expanded information about an h.264 file, more than we get from just ffmpeg -i file.mp4?
[16:01] <Jan-> we suspect there's a glitch with the way the colour space is specified in a particular file.
[16:02] <zap0> histogram that mofo
[16:02] <Jan-> it has the "grey blacks" problem.
[16:03] <Jan-> this we know
[16:03] <burek> slooth, are you sure you are using ffmpeg and not avconv?
[16:03] <Jan-> we're just not sure if this is due to misflagging of the colourspace, or if it was encoded like that
[16:04] <zap0> what does -i  report?
[16:04] <Jan-> well, the usual stuff, but it doesn't include colourspace information
[16:07] <zap0> http://ffmpeg.org/ffmpeg-filters.html#histogram  for getting a histogram
[16:07] <slooth> burek, I've installed the package ffmpeg, /usr/bin/ffmpeg is not a symlink.
[16:07] <slooth> burek, how would I check that?
[16:08] <burek> slooth just run ffmpeg and see if it says copyright by ffmpeg or copyright by libav something
[16:08] <Jan-> I love the way open source works
[16:08] <Jan-> people just... randomly claim copyright on things. Because they feel like it.
[16:08] <burek> even worse..
[16:09] <Jan-> This is what I get from -i http://pastebin.com/MA8nETCg
[16:09] <slooth> Copyright libav..
[16:09] <burek> they claimed copyright for distributing something named also ffmpeg, which was modified to output "this program is deprecated"
[16:09] <burek> it's too mild to say idiots.. but still.. its too many of them im afraid..
[16:09] <Jan-> It says yuv420p but I'm not sure if that implies a colourspace or just sampling.
[16:09] <slooth> It does say "copyright libav developers"
[16:09] <burek> slooth, that's a 3rd party software.. not ffmpeg
[16:10] <Jan-> ahh.
[16:10] <Jan-> does the (tv) in brackets mean anything?
[16:10] <Jan-> yuv420p(tv)
[16:11] <zap0> yes
[16:11] <Jan-> can I change it without reencoding the video?
[16:11] <zap0> 420 is the layout of the y u v in the file.
[16:11] <Jan-> Yes I understand that.
[16:12] <Jan-> I'm just not sure if the (tv) indicates luminance level encoding.
[16:12] <Jan-> that's an ffmpeg thing, I don't know what that means
[16:12] <zap0> (tv) will be like the BT601  etc.  color range
[16:12] <Jan-> are you sure or are you just surmising?
[16:12] <Jan-> because I would assume that's what it meant
[16:12] <Jan-> but I don't know for sure.
[16:13] <JEEB> no, tv/pc range has nothing to do with BT.601 or BT.709
[16:13] <zap0> i'm guessing.  but i feel it's a strong guess.
[16:13] <JEEB> it's just the set (or default) range of the content
[16:13] <Jan-> Is there a way I can change the flag from TV range to whatever full range would be?
[16:13] <Jan-> I suspect it's wrong.
[16:13] <Jan-> Or at least it would be an interesting diagnostic step.
[16:14] <slooth> burek, what ./configure options are needed for my little problem
[16:14] <JEEB> I'm pretty sure it's not possible in ffmpeg as-is, if the info is actually written in the bit stream instead of just being the implicit default, then you could hex edit your way through it :P
[16:15] <Jan-> eurgh.
[16:15] <Jan-> man this problem is too common.
[16:15] <JEEB> anyways, you should be able to do the YCbCr->RGB conversion as if the stuff is PC range in avisynth or something if you really want to test :P
[16:15] <Jan-> if we were to use ffmpeg to do the encoding, is there a way we can inform it how to behave?
[16:15] <JEEB> yes
[16:15] <JEEB> you could set the full range flag
[16:15] <JEEB> in libx264
[16:15] <Jan-> Obviously it's quicker and easier to just spit h.264 out of the editing application
[16:15] <zap0> if you change it, and the data then exceeds the range permissable by the playback code, it might crash.
[16:16] <Jan-> but it seems to cause this problem.
[16:16] <JEEB> zap0, the encoder/decoder do the same thing whichever range you're using
[16:16] <Jan-> Yeah zap, I think we can risk that :)
[16:16] <JEEB> so you can't have invalid values because of that anywhere :P
[16:16] <burek> slooth, take a look at our wiki
[16:16] <burek> there is a section for compilation examples
[16:16] <Jan-> even in studio range, which is what I assume ffmpeg means by "tv", you are permitted to use wider range for "super whites" etc.
[16:17] <JEEB> I mean, if you have values below or over the TV range the encoder does not give a damn
[16:17] <JEEB> the encoder just encodes
[16:17] <zap0> i mean like,  if you hex edited the header, and changed it only in the header..  the data, when decoded might then exceed safe limits (cause the playback has used the wrong range as set in the header).
[16:17] <JEEB> uhh
[16:17] <JEEB> no
[16:17] <JEEB> the decoding and encoding is exactly the same
[16:18] <JEEB> there's no change in actual decoding or encoding because of the range
[16:18] <JEEB> go look at the H.264 specification :P
[16:18] <Jan-> there certainly are codecs that could in theory object to out of range data
[16:18] <Jan-> so you're right to be cautious
[16:18] <Jan-> but I don't think avc is one of them
[16:19] <JEEB> if the format supports both (and in theory, why not?), then you most probably have no difference in the algorithms used :P
[16:19] <JEEB> it would be just idiotic to try and "optimize" the TV range side of things
[16:20] <Jan-> well, it might not.
[16:20] <Jan-> but I don't think it has been done.
[16:21] <Jan-> Meh this is why we work in DPX sequence.
[16:21] <Jan-> Does ffmpeg support dpx sequence for input?
[16:22] <zap0> maybe this is useful?      http://forum.doom9.org/archive/index.php/t-158840.html
[16:23] <Jan-> there's a lot of threads like that on the net
[16:23] <Jan-> the answer tends to be "I uhoh, maybe this combination of tools used to work"
[16:23] <Jan-> also that's from 2011, whereas anything in open source is outdated if it was written last week :)
[16:24] <zap0> color space isn't exactly a new science.
[16:38] <GRMrGecko> Has anyone else noticed that ffmpeg cannot eat all of the CPU in OS X Mavericks?
[16:38] <slooth> burek: thanks, it works with my original line with sameq removed.
[16:39] <GRMrGecko> Is this a x264 issue or ffmpeg?
[16:42] <slooth> burek, the recorded video is "too" fast somehow. What can cause this? Weird line: The driver changed the time per frame from 1/25 to 1/30
[16:46] <slooth> burek, http://pastebin.com/G12NgYwb
[16:47] <AlVal> anyone? http://pastebin.com/4w0sek4i
[16:47] <AlVal> can't understand why it keeps wanting to reinstall ffmpeg
[16:48] <AlVal> something got to do with ffmpeg1 now being deprecated
[16:48] <JEEB> AlVal, might want to poke the distro side of things
[16:48] <JEEB> since that sounds like something package management-specific
[16:49] <AlVal> JEEB: thanks, I'll keep harrassing them :D not getting much, but will be patient. I think you're right, just tried here on the offchance someone already knew the score with this on FreeBSD
[16:49] <burek> slooth, try this: ffmpeg -f x11grab -s 1280x768 -r 25 -i :0.0 -c:v copy output.avi
[16:49] <burek> it will generate huge avi file
[16:49] <burek> but just check if it plays correctly
[16:51] <burek> and if it does, then try to encode it also, while recording, with: ffmpeg -f x11grab -s 1280x768 -r 25 -i :0.0 -c:v libx264 -preset superfast -tune zerolatency output.avi
[16:51] <slooth> It doesn't play correctly. [IMGUTILS @ 0xb5d76de0]Picture size 0x0 is invalid Error while decoding frame!
[16:51] <burek> pastebin?
[16:53] <slooth> burek, pastebin of the mplayer output?
[16:54] <burek> why mplayer?
[16:54] <burek> ffplay?
[16:54] <slooth> Okay, I used ffplay: it opens a window, scrambled screen, no errors
[16:57] <burek> pastebin of ffmpeg?
[16:57] <burek> no errors?
[16:58] <slooth> burek, no errors. This info is printed only: [x11grab @ 0xaef2dc0] shared memory extension found
[16:58] <slooth> The rest is not important
[18:54] <cryptopsy> what compile option do i need to convert mkv to mp4 ?
[18:59] <cryptopsy> it says "file.mkv: Invalid data found when processing input"
[19:00] <klaxa> are you sure your file is valid?
[19:01] <cryptopsy> yes, i checked it for integrity after the download finished
[19:01] <MX2> hi, is this the chatroom where i might be able to get a little help?
[19:02] <cryptopsy> no, this is the ffmpeg chatroom
[19:02] <MX2> i went in the devel one before..
[19:02] <cryptopsy> klaxa: there's a tool "mkvalidator", gonna run it now
[19:03] <MX2> haha yes im meaning ffmpeg help
[19:03] <mark4o> cryptopsy: did you check the other ffmpeg messages prior to the invalid data message?
[19:05] <cryptopsy> mark4o: there are no errors
[19:05] <cryptopsy> no other errors ..
[19:07] <MX2> im using ffmpeg version 0.10.7 which i know is OLD but i do know that it DOES do segmenting to HLS streams as i have done it on a stream before. however this time i am reading in an rtsp stream using openRTSP but am getting what is probably a very simple error : Could not write header for output file #0 (incorrect codec parameters ?) - this is my command line : /usr/bin/ffmpeg -r 10 -i - -an -c:v libx264 -b:v 500k -bsf h264_mp4toannexb -map 0 -f segment -segment_
[19:08] <MX2> it is just video stream so i have set -an to remove audio
[19:09] <MX2> im guessing i need to specify more in the libx264 parameters but not sure what
[19:12] <MX2> ok few mins thanks
[19:24] <flarunt> im trying to encode things from a transport stream.. every time i open the input file the stream numbers change.. why is this?
[19:31] <MX2a> hi ok i have managed now to put my code into pastebin if someone could advise whats probably the stupid mistake ive made... http://pastebin.com/PFgaQ8Ba
[19:32] <MX2a> i know my version of ffmpeg is old but i do know it segments output from a regular rtmp input as ive done it before
[19:33] <MX2a> i guess i am just missing something needed from the libx264 output parameters here
[19:34] <MX2a> this is first time i have tried with an rtsp input piped through openRTSP so im guessing some adjustments needede
[19:40] <mark4o> MX2a: did you try a current version?  you can download a static build so that there are no complex dependencies and try it
[19:47] <MX2a> oo i have a static build i put on a few days ago i just tried but slightly different error... http://pastebin.com/65h0Uc1i
[19:48] <MX2a> is interesting as i have used the same openRTSP part to then push direct to flash media server as an rtmp stream
[19:51] <MX2a> 1 thing i see from that ooutput is it doesnt look like it has recognised the -r 10 on the input frame rate which it did on the rpm version i was using
[19:55] <mark4o> MX2a: try -bsf:v h264_mp4toannexb -flags -global_header
[20:02] <MX2a> ahh mark4o !!! thanks i also downloaded the latest static from johnvansickle.com and along with your extra parameter it seems to be working! it comes up with warning : [segment @ 0x25bf000] Codec for stream 0 does not use global headers but container format requires global headers - but its just run for a few mins before i stopped it. can you tell me what that global_header does?
[20:04] <mark4o> MX2a: http://ffmpeg.org/ffmpeg-codecs.html#Codec-Options "Place global headers in extradata instead of every keyframe."
[20:07] <MX2a> i wont pretend to understand that completely but im happy its working thank you !!! ive also got something else from coming in here to find johnvansicke static builds which include the libfreetype option which i sometimes use but end up using the rpm version for as the static builds on ffmpeg.org dont include it
[20:10] <mark4o> MX2a: build it yourself and you can include whatever features you like http://trac.ffmpeg.org/wiki/CompilationGuide
[20:13] <MX2a> yes i have done that on centos 1 time before but there are so many components and versions of each element to be different that its near on impossible to have the same version as anyone else. and to be honest you basically confirmed that here today by asking me to use a static build XXXX as then you know im on a level playing field if you know what i mean?
[20:15] <snooky> hi all
[20:16] <snooky> i trancode an h264 file, but it was very very slow
[20:16] <snooky> in 45 minutes he has transoce 1min 46 seconds
[20:16] <snooky> any ideas?
[20:18] <mark4o> snooky: try -preset ultrafast
[20:18] <snooky> i transcode so: ffmpeg -i movie.h264 -vcodec libx264 -s hd720 -b "$bitrate"k movie.new.h264
[20:20] <mark4o> snooky: see http://trac.ffmpeg.org/wiki/x264EncodingGuide for some hints
[20:24] <mark4o> snooky: also check your cpu capabilities (should be part of the libx264 ffmpeg output); ensure you haven't built it without yasm or optimization or something
[20:24] <snooky> mark4o: but -preset ultrafast make the quality bad, or?
[20:24] <snooky> i dont really good speak english
[20:25] <snooky> it runs debian squeeze, 2GHZ, 2GB Ram
[20:25] <mark4o> snooky: yes, -preset ultrafast will be lower quality
[20:26] <snooky> ok
[20:26] <snooky> very lower?
[20:26] <snooky> the source was an 1080p file
[20:26] <snooky> and i want convert in an 720p file with other bitrate (target size)
[20:27] <mark4o> snooky: try it and see; use the fastest setting where the quality is good enough for you
[20:28] <mark4o> snooky: you can use -t 10 or something to just encode 10 seconds to try it
[20:28] <snooky> ok, i want to test it
[20:29] <snooky> so want create from the 10GB source file an 4GB target file
[20:29] <mark4o> see http://trac.ffmpeg.org/wiki/x264EncodingGuide
[20:29] <snooky> yes, i have bookmarked
[20:29] <MX2a> quick jump in. these guys are good they will help you!! thanks mark4o its working here http://shoutcast.drumandbasslines.com/dominionge_play.m3u8 thank you very much for your help !!!
[20:29] <snooky> and google translate :)
[20:30] <mark4o> MX2a: np, just build it yourself; you don't need the same versions as anyone else
[20:31] <snooky> what would ffmpeh here?
[20:31] <snooky> [dts @ 0x95d95e0] max_analyze_duration 5000000 reached at 5002667 [dts @ 0x95d95e0] Estimating duration from bitrate, this may be inaccurate
[20:31] <MX2a> yeah ok i will try if i need to but for now i am liking the static builds if they do what i need
[20:31] <MX2a> thanks again !
[20:32] <MX2a> ^^ i ignore that warning snooky
[20:32] <MX2a> i get it all the time haha
[20:39] <snooky> ok, thanks and bye
[21:45] <wawrek> can we detect vocal activity (speech) in the audio track with ffmpeg?
[22:08] <DrBenway> anyone has ever tried to setup a hardware decoder with dxva? it seems to work fine except that it doesn't seem like my decoder settings are getting set properly to the hardware decoder
[22:09] <DrBenway> as in i'm passing nal coming from the network
[22:09] <DrBenway> and it's throwing errors about the header not having reference picture
[22:09] <DrBenway> this doesn't happen if i use software decoder
[22:10] <DrBenway> with roughly the same code, i can decode something coming from a file using avformat
[22:10] <DrBenway> but feeding encoded frames manually one by one doesn't seem to work
[00:00] --- Sun Nov  3 2013


More information about the Ffmpeg-devel-irc mailing list