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

burek burek021 at gmail.com
Sat Sep 19 02:05:01 CEST 2015


[00:14:54 CEST] <kyleogrg> i have a video database, and each video has a corresponding info file.  i'd like to add a tag that gives the quality of the video.  for instance, the file might contain the line "quality=200" or whatever.
[00:15:25 CEST] <kyleogrg> i'd like this info to be useful when batch encoding this database to another codec/format.
[00:16:14 CEST] <kyleogrg> for instance, i can't assign a flat bitrate to all videos, because some need it more than others.  i can't do CRF (with x264) because then file size is unpredictable.
[00:16:57 CEST] <xodd> hi :)
[00:17:11 CEST] <kyleogrg> if i had a quality rating for each video, i could use that to calculate the bitrate for each video, and the total size of all the videos could be predicted ahead of time
[00:17:23 CEST] <xodd> how do i use ffmpeg to create an iso from a copyright protected dvd?
[00:18:06 CEST] <kyleogrg> So basically - what is the best method for outputting a quality rating for an individual video?
[00:18:35 CEST] <DHE> kyleogrg: I don't think you can do it after the fact. quality parameters are available during encoding, and x264 will log a whole bunch of stats on shutdown
[00:19:47 CEST] <kyleogrg> DHE: I'm not thinking x264 per se... I want ffmpeg to read a file frame by frame (as if encoding) but output an objective quality rating, without actually encoding.  later, i can use this data however i need to
[00:20:59 CEST] <kyleogrg> later, in my programming, i can determine which video deserves more or less bitrate and achieve an exact batch output size...
[00:21:28 CEST] <xodd> when i insert a dvd and uses dd to make an iso it fails because of these copyright protected encryption
[00:21:31 CEST] <xodd> can u help me?
[00:22:52 CEST] <DHE> xodd: fire up a DVD player that can decrypt. while the vidoe is playing, pause your dvd player. while it's paused do your 'dd'
[00:24:54 CEST] <xodd> thats just great :) will try it DHE
[00:25:54 CEST] <tlhiv_laptop> how do i rebuild (with -vcodec copy) a video by normalizing the audio so that the peak is 0dB?
[00:28:58 CEST] <jasom> tlhiv_laptop: ffmpeg -i input.mp4 -af "volumedetect" -f null /dev/null to find the max_volume
[00:29:00 CEST] <DHE> tlhiv_laptop: first figure out how high you can set it. then transcode the audio with the volume filter
[00:29:21 CEST] <tlhiv_laptop> no way to have ffmpeg do it "automagically" in one command?
[00:30:11 CEST] <jasom> tlhiv_laptop: not that I know of, but it wouldn't be significantly faster than doing it in two steps anyway.  You can always write a script to do it for you
[00:30:26 CEST] <tlhiv_laptop> jasom: yeah that's what i'm doing :-)
[00:31:28 CEST] <jasom> tlhiv_laptop: If you want to set the perceived loudness, consider using something that implements r128 metering
[00:32:36 CEST] <tlhiv_laptop> jasom: thank you
[00:39:19 CEST] <kyleogrg> i'm looking at psnr and ssim, and they seem to be useful for comparing the same video at different qualities.  i'm looking for a way to take one video and independently get a quality score, without comparing it to any other video.  is this possible?
[00:43:14 CEST] <Mavrik> kyleogrg, that would only make sense if you'd have original/raw video to compare it to :/
[00:43:24 CEST] <kyleogrg> hmm
[00:44:21 CEST] <kyleogrg> let's say i have a folder of 100 distinct videos, and i want them all to have a consistent quality, and i folder the encoded folder size to be 50 GB.  How can I do this?
[00:46:14 CEST] <Mavrik> Not easily :)
[00:46:34 CEST] <Mavrik> You can use crf quality setting for e.g. H.264 to keep consistent quality.
[00:46:41 CEST] <Mavrik> But that won't enforce a size limit.
[00:46:49 CEST] <Mavrik> You can enforce a size limit and then not have consistent quality.
[00:47:00 CEST] <kyleogrg> right, that's the problem i'm facing
[00:47:08 CEST] <Mavrik> You could perhaps do some kind of pass1 preprocessing... but making that over 100 videos is going to require some coding :)
[00:47:29 CEST] <kyleogrg> and what are you talking about exactly?
[00:48:50 CEST] <DHE> run a pass 1 on every video, do something to judge a good bitrate for each based on the whole collection's stats, then encode each's pass 2
[00:49:07 CEST] <kyleogrg> that's kind of what i was thinking
[00:49:20 CEST] <DHE> that said I don't know that such a tool exists
[00:49:56 CEST] <kyleogrg> what stats would be outputted from pass 1?
[00:49:58 CEST] <Mavrik> DHE, ideally, generate a pass1 file for each video so the encoders will do stuff globally :)
[00:50:27 CEST] <kyleogrg> will pass1 just output a suggested bitrate for each video?
[00:50:45 CEST] <Mavrik> there's no such thing
[00:50:55 CEST] <Mavrik> bitrate is not a global parameter
[00:51:11 CEST] <kyleogrg> no... but average bitrate for the whole video.  right?
[00:51:18 CEST] <Mavrik> pass1 outputs data on which then later encoder can decide the quality parameters per-frame to hit a bitrate mark with most quality kept
[00:51:31 CEST] <Mavrik> it just contains frame parameters
[00:51:34 CEST] <kyleogrg> okay
[00:52:00 CEST] <kyleogrg> well... you guys know a little more about x264 than i do
[00:52:22 CEST] <kyleogrg> how would you take pass1 stats and convert that into bitrate (given the batch size limit)?
[00:52:34 CEST] <Mavrik> That's not possible.
[00:52:37 CEST] <Mavrik> It doesn't work like that.
[00:53:58 CEST] <kyleogrg> what if a rapid encode at a given crf was done, but instead of an output video, you get the bitrate
[00:54:39 CEST] <kyleogrg> if you know what bitrate x264 wants to use on each file, couldn't that be moved up or down in proportion to the desired batch size?
[00:54:41 CEST] <jasom> kyleogrg: I would just pick a random N minutes from the videos, find a crf that is slightly less than 50GB*N/M (where M is the total minutes), and then hope for the best
[00:56:39 CEST] <kyleogrg_> back
[00:57:29 CEST] <kyleogrg_> jasom: how can you calculate a crf based on desired file size?
[00:57:29 CEST] <jasom> kyleogrg_: did you see my suggestion?
[00:57:37 CEST] <kyleogrg_> yes, i did
[00:57:44 CEST] <kyleogrg_> but i don't totally understand it
[00:57:53 CEST] <jasom> kyleogrg_: I'm saying, if you pick e.g. 20 minutes of video, you could just try all sane values for the crf
[00:58:29 CEST] <kyleogrg_> and see how the file size comes out for each crf?  and then pick the one that's closest?
[00:58:34 CEST] <jasom> kyleogrg_: yeah
[00:59:02 CEST] <jasom> kyleogrg_: if it's more important that it's less than 50GB than you get the absolute maximum quality, then you can even bump the crf up by one
[00:59:04 CEST] <kyleogrg_> yeah... that may be how i have to do it.  it's just less predictable.  some videos are hd, some are sd
[00:59:12 CEST] <jasom> oh, that will be hard then
[00:59:33 CEST] <kyleogrg_> that's what i wanted (at least a rough) rating for each video.  then i can calculate the rest
[01:00:00 CEST] <jasom> encoding at superfast should give you an upper bound of the size for a given crf
[01:00:33 CEST] <kyleogrg_> so could i "encode" like that without outputting a video, but just the bitrate data?
[01:00:54 CEST] <jasom> kyleogrg_: right, to a a pipe that measures the size, for example
[01:01:14 CEST] <Mavrik> Of course that will take a huge amount of time.
[01:01:32 CEST] <kyleogrg_> so, as it's being fed to the pipe, that program would get the bitrate for each second of video and do whatever...
[01:01:41 CEST] <jasom> Mavrik: but it can be automated.  There's a lot to be said for hit "go" and forget about it for a week
[01:01:49 CEST] <Mavrik> jasom, well, then sillier idea
[01:01:52 CEST] <Mavrik> concat all HD videos
[01:01:54 CEST] <jasom> kyleogrg_: no
[01:01:54 CEST] <Mavrik> concat all SD video
[01:02:03 CEST] <Mavrik> take a ratio of lengths
[01:02:09 CEST] <Mavrik> calculate sizes and set absolute bitrate for each
[01:02:16 CEST] <Mavrik> encode 2-pass, cut
[01:02:26 CEST] <jasom> haha
[01:02:36 CEST] <kyleogrg_> Mavrik: wow... never thought of that
[01:02:40 CEST] <kyleogrg_> yikes
[01:02:52 CEST] <Mavrik> It's dumb, not optimal, but not terrible either :P
[01:02:55 CEST] <Mavrik> Could even work ;)
[01:03:05 CEST] <kyleogrg_> Mavrik: it could :D
[01:03:37 CEST] <kyleogrg_> jasom: so ffmpeg pipes to another program.  that program gets what?  the bitrate data for the whole video?
[01:05:25 CEST] <kyleogrg_> i mean, can i have ffmpeg output one final bitrate number?  or does my program have to calculate that based on the second-by-second bitrate data...
[01:05:54 CEST] <Mavrik> bitrate is just filesize / length in seconds
[01:06:07 CEST] <Mavrik> That's also what second-by-second data shows
[01:07:14 CEST] <jasom> kyleogrg_: CBR encoding with h264 is typically very suboptimal
[01:09:07 CEST] <jasom> kyleogrg_: how many minutes of video are we talking here, and any idea the ratio for SD to HD?
[01:09:18 CEST] <Gromgrom> hello. anyone on? i'm having trouble with concatenating in windows
[01:10:58 CEST] <kyleogrg__> back :P
[01:11:41 CEST] <thasp> if I use the same qp=1 in libx264, would the quality change using main vs high profile? or would I have same video quality with a different filesize?
[01:12:37 CEST] <kyleogrg__> okay, i was disconnected.  so, how can i pipe the x264 bitrate to a txt file?
[01:14:38 CEST] <jasom> thasp: I don't know for certain.  I know changing levels may affect the quality as there are rate limits that could you prevent from achieving the same quality
[01:15:58 CEST] <Gromgrom> when trying to concatenate videos of the same codec, i get an unknown keyword error
[01:16:14 CEST] <Gromgrom> i believe i have input text file in the right format
[01:16:42 CEST] <Gromgrom> unknown keyword '  f'
[01:19:55 CEST] <thasp> Thanks jasom
[01:21:49 CEST] <Gromgrom> any ideas on my error?
[01:22:03 CEST] <Gromgrom> it seems like there are extra characters that i can't see on my first line
[01:31:46 CEST] <Gromgrom> can anyone replicate my error?
[02:53:05 CEST] <gramble> is this the place to try and debug an error?
[05:32:38 CEST] <gustavo> http://pastebin.geany.org/0Wtbg/
[05:32:41 CEST] <gustavo> any idea?
[08:40:31 CEST] <jjimenez> I'm using media server mediatomb with my ps3 to stream videos and I have been successful
[08:40:47 CEST] <jjimenez> but some of my videos are .mov
[08:41:03 CEST] <jjimenez> and am trying to convert to .mp4 using the command
[08:41:30 CEST] <jjimenez> ffmpeg -i input.mov output.mp4
[08:42:46 CEST] <jjimenez> The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
[08:43:19 CEST] <relaxed> ffmpeg -i input.mov -c copy output.mp4
[08:45:30 CEST] <jjimenez> Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
[08:47:17 CEST] <relaxed> pastebin the command and all output
[08:50:11 CEST] <jjimenez> http://pastebin.com/ArRQ8XTt
[08:53:00 CEST] <relaxed> oh, ffmpeg -i input.mov -c:v copy -c:a aac -strict -2 -b:a 128k out.mp4
[08:54:54 CEST] <jjimenez> heres a better past bin
[08:54:56 CEST] <jjimenez> http://pastebin.com/aW5qUUHU
[09:02:29 CEST] <jjimenez> I used the command
[09:03:00 CEST] <jjimenez> ffmpeg -i input.mov -strict -2 output.mp4
[09:03:05 CEST] <jjimenez> and it worked
[09:03:28 CEST] <jjimenez> tested on my mediaserver mediatomb and streamed on my ps3
[09:03:44 CEST] <jjimenez> thank you very much sir
[10:42:04 CEST] <cousin_luigi> Greetings.
[11:42:44 CEST] <cousin_luigi> Does anyone use libkvazaar?
[13:25:06 CEST] <waressearcher2> I want to make video with "silent" audio track, and then concatenate it with other normal video, but its not working the right way
[13:25:10 CEST] <waressearcher2> so I have one normal "video.avi" video and I'm creating another one using this command: "ffmpeg -f lavfi -i aevalsrc=0 -i video.avi -c:v mpeg4 -vb 10000k -ab 128k -ar 44100 -ac 2 -acodec libmp3lame -map 0:0 -map 1:0 -shortest -t 2 -y -f avi silent_video.avi", but now when I concatenate them and play that concatenated video first part that contains
[13:25:15 CEST] <waressearcher2>  "video.avi" is played normally but the second half that contains "silent_video.avi" is not played at all its just freeze
[13:26:08 CEST] <waressearcher2> and I also getting a lot of these messages while concatenating those 2 videos: "Non-monotonous DTS in output stream 0:0; previous: 1845"
[13:27:29 CEST] <waressearcher2> why its not working that "silent" video is compeletely normal video with audio track, why should ffmpeg care if the track itself silent or has some stuff in it ?
[13:44:02 CEST] <durandal_1707> waressearcher2: how you concatenate?
[14:05:20 CEST] <waressearcher2> durandal_1707: I have file list.txt with two lines 1) "file 'video.avi'" 2) "file 'silent_video.avi'" in it and then I run that command: "ffmpeg -f concat -i list.txt -c copy -y -f avi out.avi"
[14:06:07 CEST] <durandal_1707> and codecs are same in all files?
[14:08:40 CEST] <waressearcher2> same "-c:v mpeg4 -vb 5000k" for video and "-ab 128k -ar 44100 -ac 2 -acodec libmp3lame" for audio
[14:30:29 CEST] <waressearcher2> and what is that "Non-monotonous DTS in output stream 0:0" anyway
[15:32:20 CEST] <durandal_1707> waressearcher2: I'm not sure you can concat mp3 like that
[15:33:30 CEST] <durandal_1707> try with only video and only audio which one works points to problem
[15:34:15 CEST] <fritsch> it won't work for mp3
[15:34:17 CEST] <fritsch> without recoding
[15:34:22 CEST] <fritsch> cause of the psycho accustic
[15:34:57 CEST] <fritsch> the reservoir is only flushed on end
[15:35:11 CEST] <fritsch> so the very moment you concat you will get new headers
[15:35:19 CEST] <fritsch> with at least one big pssst noise :-)
[15:35:25 CEST] <fritsch> and the parse won't like it
[15:35:33 CEST] <fritsch> if the sample rate is variable :-)
[15:35:38 CEST] <fritsch> no fun at all anymore
[15:35:44 CEST] <waressearcher2> fritsch: yes there is pssst noise
[15:35:47 CEST] <fritsch> yeah
[15:35:58 CEST] <fritsch> you don't by chance code something for a job application ? :-)
[15:36:04 CEST] <waressearcher2> no
[15:36:07 CEST] <fritsch> okay
[15:36:32 CEST] <fritsch> good - cause there is a company arround that asks those that apply to implement such a thing
[15:41:25 CEST] <waressearcher2> concatenate videos ?
[15:45:11 CEST] <fritsch> nope
[15:45:16 CEST] <fritsch> writing a multithreaded lame encoder
[15:45:32 CEST] <fritsch> that uses #cpus*100 cpu time most of the time
[15:45:33 CEST] <fritsch> :-)
[15:45:44 CEST] <durandal_1707> fritsch: what company?
[15:45:59 CEST] <fritsch> they are called: optimus search
[15:46:02 CEST] <fritsch> it's a head hunter
[15:46:17 CEST] <fritsch> if you google lame multithread you will find a lot of people asking for a solution
[15:46:38 CEST] <fritsch> you need to implement own threads using pthreads and use lame (untouched)
[15:46:45 CEST] <fritsch> shall run on linux and windows
[15:47:00 CEST] <fritsch> i implemented it, cause I thought they were serious
[15:47:04 CEST] <fritsch> just4fun
[15:47:22 CEST] <fritsch> but yeah - after that I realized, there was not customer, no job offer nothing
[15:47:31 CEST] <fritsch> i think I will gpl out this code
[15:47:32 CEST] <fritsch> haha
[15:47:49 CEST] <fritsch> so they need to find another thing to go on people's nerves
[15:48:01 CEST] <iive> :E
[15:48:28 CEST] <iive> is there mp3 encoder in ffmpeg?
[15:48:58 CEST] <durandal_1707> why are you so ignorant?
[15:49:24 CEST] <durandal_1707> there are wrappers
[15:57:21 CEST] <iive> hum?
[15:58:07 CEST] <fritsch> durandal_1707: me, ignorant?
[15:58:17 CEST] <fritsch> all things that you'd like were not allowed
[15:58:33 CEST] <fritsch> stdlib, pthreads, lame, that's it - no c++1
[15:58:34 CEST] <fritsch> 1
[15:59:06 CEST] <durandal_1707> fritsch: not you
[16:00:03 CEST] <fritsch> yeah that other question was funny :-)
[16:00:51 CEST] <fritsch> ffmpeg likes mp3 so much, that is also tries to decode ac3 as mp3 :-)
[16:00:57 CEST] <fritsch> #4864
[16:00:58 CEST] <waressearcher2> it like can mplayer play media files ?
[16:01:00 CEST] <iive> i was asking about native encoder.
[16:01:35 CEST] <fritsch> iive: https://trac.ffmpeg.org/wiki/Encode/MP3
[16:01:48 CEST] <waressearcher2> mp3 is not patented anymore right ?
[16:01:49 CEST] <fritsch> first line - no native mp3 encoder
[16:01:58 CEST] <waressearcher2> so its free to use as ogg right ?
[16:04:12 CEST] <iive> mp3 is release in 1993... 22 years have passed.
[16:04:39 CEST] <iive> patents usually last from 20 to 25 years...
[16:05:49 CEST] <iive> fritsch: that question was just a lead to prompt you to implement the threading mp3 encoding in ffmpeg.
[16:06:28 CEST] <iive> not to be shout at.
[16:08:16 CEST] <iive> hum, the initial draft is from 1991, so it's 24 years. so in year or two mp3 should be completely safe
[16:10:23 CEST] <iive> "If only the known MP3 patents filed by December 1992 are considered, then MP3 decoding may be patent-free in the US by 22 September 2015"
[16:11:54 CEST] <BtbN> Why use mp3 when there is a rapidly improving aac encoder in ffmpeg?
[16:12:16 CEST] <iive> is aac patent free?
[16:12:29 CEST] <BtbN> No, but royality free in most cases
[16:12:46 CEST] <BtbN> No codec is patent free, so i wouldn't bother.
[16:13:39 CEST] <iive> BtbN: codecs older than 25 years are patent free.
[16:14:01 CEST] <BtbN> And bad.
[16:14:51 CEST] <iive> well, that depends on the encoder too.
[16:22:19 CEST] <iive> don't get me wrong. I'm quite happy with the improvements of the aac encoder. It's great that we have developer who works on it.
[16:25:12 CEST] <fritsch> iive: as said, it's not that easy, i got it all done besides the reservoir
[16:25:28 CEST] <fritsch> therefore you need to parse mp3 frames and fine one where no information is spread from preceeding frames
[16:25:35 CEST] <fritsch> this I did not do
[16:25:57 CEST] <fritsch> i made a comment there: Happy to discuss with developers
[16:26:03 CEST] <fritsch> but yeah never met one :-)
[16:26:37 CEST] <iive> i'm not familiar with audio codecs, but almost all audio codecs are intra-only,
[16:27:02 CEST] <iive> i know that ac3 uses overlapped mdct, so there might be a problem...
[16:27:11 CEST] <iive> don't remember is mp3 had such thing.
[16:27:52 CEST] <iive> is/if...
[16:29:18 CEST] <fritsch> iive: http://wiki.hydrogenaud.io/index.php?title=Bit_reservoir
[16:29:25 CEST] <netek> has anybody ever used the php-ffmpeg class before?
[16:34:45 CEST] <iive> fritsch: bitrate control. hehe.
[17:20:06 CEST] <fred1807> On a batch process I need to reduce videos bitrate Only if they are too big, and leave acceptable bitrates (~8mega/s or less) untouched, is this possible?
[17:25:39 CEST] <akae_> Hello. Anybody can help me with h264_qsv encoding under Linux? I've managed to compile ffmpeg with QSV and --enable-libmfx support but I get an awesome "[h264_qsv @ 0x20984a0] Error initializing the encoder" error when I try  ffmpeg -i video.ts -acodec ac3 -vcodec h264  output.h264
[17:38:57 CEST] <LanDi> [mp4 @ 0x7bfc40] Non-monotonous DTS in output stream 0:1; previous: 36003713, current: 36003168; changing to 36003714. This may result in incorrect timestamps in the output file.
[17:39:06 CEST] <LanDi> what this message means?
[17:39:24 CEST] <LanDi> I'm converting a 1080p file to 720p...
[18:10:42 CEST] <akae_> have a nice weekend
[18:11:37 CEST] <waressearcher2> he forgot to add "b**ches" at the end
[18:11:53 CEST] <waressearcher2> or I just in a wrong network
[18:19:12 CEST] <fred1807> is it possible to set a bitrate/target quality that is only processed if video has a too high bitrate?
[19:19:51 CEST] <zylthinking> hi, I readed aac stream using avformat get the first bytes of aac is 0000000: 0132 15ae 4c3b 0a06 c2e3 b0a0 ac52 140d
[19:20:22 CEST] <zylthinking> it indeed is not an adts packet, nor a LATM packet
[19:21:05 CEST] <zylthinking> can anybody give me some advice?
[19:21:50 CEST] <zylthinking> if it is a aac stream without any header, then I don't know any information of it and can't decode it
[19:34:36 CEST] <Cryp71c> Having issues with a webcam video on a server + ffmpeg. Ffmpeg gives me this: http://paste2.org/86acdUVF
[19:40:13 CEST] <Cryp71c> I'm trying to decipher that output
[19:40:44 CEST] <DHE> you seem to have a space breaking your "-f" parameter
[19:41:17 CEST] <pzich> it also looks like your input duration is 00:00:04.27, but you're seeking to 00:00:09?
[19:57:37 CEST] <zylthinking> avctx->extradata have 5 bytes for aac, what it is? audio specific config? or adts without 0x1fff?
[19:59:18 CEST] <zylthinking> seems both are wrong, the first 2 bytes are 0x08 0x15, match neither
[22:20:27 CEST] <LanDi> can someone help me to make a video smaller?... I want to fit it in about 700 mb
[22:37:56 CEST] <DHE> probably want 2-pass encoding then
[00:00:00 CEST] --- Sat Sep 19 2015


More information about the Ffmpeg-devel-irc mailing list