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

burek burek021 at gmail.com
Wed Dec 14 03:05:01 EET 2016


[08:28:35 CET] <julienff> Hello all, i'm looking for a ffmpeg command to create x number of thumbnails, anyone for help ?
[08:34:11 CET] <julienff> whatever the duration of the video i would like to extract x number of thumbnails
[08:35:56 CET] <thebombzen> julienff: if you're looking at evenly spaced intervals, you can use -frames:v X, and set the framerate of the output appropriately
[08:36:11 CET] <thebombzen> so if you're looking for 1 per second, you can do -r 1 -frames X
[08:36:43 CET] <thebombzen> if you're looking for a smarter method, you could check out the thumbnails filter
[08:41:10 CET] <julienff> thebombzen: sorry i don't understand, what are v and X, i just want to specify for example 15 thumbnails, spaced calculated by the total duration
[08:42:08 CET] <thebombzen> what is X?
[08:42:14 CET] <thebombzen> whatever the duration of the video i would like to extract x number of thumbnails
[08:42:16 CET] <thebombzen> that's x
[08:42:23 CET] <thebombzen> so it depends on the duration
[08:42:31 CET] <thebombzen> if the duration, were say, 617 seconds
[08:42:47 CET] <thebombzen> you could do -r 15/617
[08:42:56 CET] <thebombzen> which makes the framerate 15 frames per 617 seconds
[08:43:02 CET] <thebombzen> and just transcode it like that
[08:43:20 CET] <julienff> yes but can i have a uniq command line to do that?
[08:43:30 CET] <julienff> or does a script exist ?
[08:43:31 CET] <thebombzen> that doesn't reference the duration? I don't know
[08:43:56 CET] <julienff> because ffmpeg doesn't know the total duration ?
[08:45:14 CET] <julienff> thebombzen could you give me an example of command please ?
[08:45:25 CET] <thebombzen> well if you know the duration
[08:45:37 CET] <thebombzen> which I'll use as 617 for this example
[08:46:11 CET] <thebombzen> you could do ffmpeg -i input_file -r 15/617 frame_%4d.png
[08:46:15 CET] <thebombzen> or something like that
[08:46:22 CET] <thebombzen> where 15 is the number of frames you want to generate
[08:46:40 CET] <julienff> exact yes i have this command but i don't have the duration
[08:46:42 CET] <thebombzen> cause if you're trying to generate a 15 thumbnails over the duration, you will need to reference the duration
[08:47:00 CET] <julienff> this is the problem do i need a special script ?
[08:47:06 CET] <thebombzen> because if you don't know how much video you'll receive, say if it's from a live device, you cannot generate 15 thumbnails evenly spaced on the duration
[08:47:14 CET] <thebombzen> if you do not know what the duration is
[08:47:26 CET] <thebombzen> the thing you're asking is impossible to do without knowing the duration
[08:47:33 CET] <thebombzen> you can find the duration by doing ffmpeg -i input_file
[08:47:35 CET] <thebombzen> and it'll say
[08:48:14 CET] <julienff> so i need to make a script to automatize it ?
[08:48:19 CET] <julienff> because i have various videos
[08:48:24 CET] <thebombzen> yes
[08:48:52 CET] <julienff> there is no script which ever exist ?
[08:49:12 CET] <thebombzen> well why would it exist
[08:49:24 CET] <thebombzen> if you're trying to get the duration of a file you can use this:
[08:49:24 CET] <julienff> some people maybe ever coded it
[08:49:33 CET] <julienff> i m not very good at coding
[08:49:41 CET] <thebombzen> ffprobe -show_format input_file 2>/dev/null | grep duration= | cut -d '=' -f 2
[08:50:04 CET] <thebombzen> that would be a primitive way of doing it
[08:50:29 CET] <thebombzen> and then if you wanted X thumbnails
[08:50:31 CET] <thebombzen> like 15
[08:51:56 CET] <julienff> so i have to stock the result of ffprobe in a variable
[08:51:57 CET] <thebombzen> you could do inputfile=input the filename here; DUR=$(ffprobe -show_format "$inputfile" 2>/dev/null | grep ^duration= | cut -d '=' -f 2); ffmpeg -i "$inputfile" -r 15/$DUR "$inputfile_%2d.png"
[08:52:02 CET] <thebombzen> yes
[08:52:03 CET] <julienff> and then use it in ffmpeg command
[08:52:07 CET] <thebombzen> yes
[08:52:50 CET] <julienff> ok
[08:53:29 CET] <julienff> thanks a lot
[09:02:06 CET] <julienff> thebombzen: how can i resize the thumb directly in the command without deform the thumb ?
[12:38:08 CET] <zpc> Hi! I use "ffmpeg -i test.flv -acodec aac  -vn test.aac" to extract audio from flv, but the duration of test.aac is shorter than test.flv. Could you help?
[12:39:03 CET] <zpc> Duration of test.flv is "00:06:52.07", but the duration of test.aac is "00:06:06.91"
[12:39:52 CET] <zpc> I want to get subtitle from the audio, so I want the duration of aac just the same as flv
[12:49:12 CET] <BtbN> use a proper container, not raw aac.
[12:49:23 CET] <BtbN> the duration of that is probably just a wild guess
[12:49:40 CET] <zpc> what's a proper container?
[12:50:01 CET] <BtbN> anything that's not raw aac works.
[12:52:18 CET] <zpc> Thanks !
[13:03:53 CET] <cry0> I need help syncing 2 streams in C. One is audio AAC over RTP, the other is video h264 over RTP. I issue an SDP file. Each stream works correctly, but audio is always ahead of video when testing with VLC.
[13:04:10 CET] <zpc> I run this command "/bin/ffmpeg -i test.flv -q:a 0 -map a test.mp3 -y", but the duration of test.mp3 is "00:06:10.63", still different from test.flv
[13:15:54 CET] <nonex86> zpc: check the actual duration of streams in source flv file (using ffprobe for example)
[13:16:32 CET] <nonex86> zpc: usually video and audio stream has different duration, but in your case the gap is to big, so, check the source file to be sure
[13:17:05 CET] <zpc> Input #0, flv, from 'test.flv':   Metadata:     encoder         : Lavf57.41.100   Duration: 00:06:52.07, start: 0.000000, bitrate: 715 kb/s     Stream #0:0: Video: h264 (Baseline), yuv420p(tv, smpte170m/bt709/bt709), 668x376, 15 tbr, 1k tbn     Stream #0:1: Audio: adpcm_swf, 44100 Hz, mono, s16, 176 kb/s
[13:17:08 CET] <thebombzen> also, you should try streamcopy if you're extracting. e.g. -map 0:a -c copy output.m4a
[13:17:32 CET] <zpc> Duration: 00:06:52.07, start: 0.000000, bitrate: 715 kb/s
[13:18:24 CET] <nonex86> looks like they are even match :)
[13:18:42 CET] <nonex86> or
[13:18:45 CET] <zpc> that's the test.flv
[13:18:48 CET] <nonex86> wait a minute
[13:19:00 CET] <nonex86> bitrate is the same?
[13:19:04 CET] <nonex86> for video and audio? :)
[13:19:31 CET] <nonex86> guess second paste are wrong
[13:21:05 CET] <nonex86> check duration of BOTH streams - audio and video
[13:21:32 CET] <nonex86> not just video stream
[13:22:27 CET] <zpc> Ok! I paste it here, http://pastebin.com/Zfv58Bq2
[13:23:40 CET] <nonex86> try to copy audio stream like thebobmzen advised
[13:23:52 CET] <nonex86> and check the duration of result file
[13:27:16 CET] <zpc> http://pastebin.com/EM8rGRYc
[13:27:56 CET] <zpc> nonex86: i'm very confusing
[13:29:23 CET] <nonex86> ah... audio is adpcm_swf
[13:29:59 CET] <nonex86> looks like it cannot be written into the mp4a
[13:31:56 CET] <zpc> is adpcm_swf the reason?
[13:32:32 CET] <nonex86> well, at least the reason ffmpeg cant write it into the m4a
[13:32:48 CET] <nonex86> wait a second, ill check random flv myself
[13:33:19 CET] <zpc> sure
[13:34:15 CET] <nonex86> well, in my case everything is ok
[13:34:26 CET] <nonex86> even i had several errors
[13:34:31 CET] <nonex86> source file was
[13:34:50 CET] <nonex86>   Duration: 00:01:37.12, start: 0.000000, bitrate: 444 kb/s
[13:34:50 CET] <nonex86>     Stream #0:0: Video: h264 (Main), yuv420p, 640x480, 25 fps, 25 tbr, 1k tbn, 50 tbc
[13:34:50 CET] <nonex86>     Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp
[13:34:55 CET] <nonex86> result file
[13:35:11 CET] <nonex86>   Duration: 00:01:37.31, start: 0.025057, bitrate: 230 kb/s
[13:35:11 CET] <nonex86>     Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 230 kb/s
[13:35:19 CET] <nonex86> 1:37
[13:35:32 CET] <zpc> so my source file has some problem
[13:35:42 CET] <nonex86> well, its possible
[13:35:54 CET] <nonex86> did you notice any errors
[13:36:01 CET] <nonex86> while converting to mp3?
[13:36:15 CET] <zpc> doesn't work either
[13:40:37 CET] <zpc> http://pastebin.com/Rcip1KWh
[13:41:47 CET] <zpc>  Duration: 00:06:10.47, start: 0.025057, bitrate: 119 kb/s
[13:45:11 CET] <zpc> I will upload my flv onto github, wait a minute
[13:48:14 CET] <zpc> https://github.com/pc-zhang/test
[13:48:16 CET] <zpc> here it is
[13:49:14 CET] <zpc> beautiful girl of my company
[13:51:56 CET] <nonex86> same result as yours
[13:52:01 CET] <nonex86> 6:10
[13:52:14 CET] <nonex86> on ffmpeg 3.1.4
[13:54:19 CET] <nonex86> even if ill try to copy audio stream from the file
[13:54:23 CET] <nonex86> it still 6:10
[13:54:28 CET] <zpc> paste my result here again, http://pastebin.com/3TSEMBWS
[13:54:50 CET] <zpc> the duration of test.flv and generated test.mp3 is different
[13:55:06 CET] <nonex86> yeah, looks like it is
[13:55:09 CET] <zpc> :-(
[13:59:57 CET] <zpc> My job is to recognize subtitle from the audio, and add the subtitle back to video
[14:00:56 CET] <zpc> nonex86: I will try some other flv files
[14:01:39 CET] <zpc> nonex86: thank you very much for your helping :)
[14:05:56 CET] <cry0> so I am using the libs to implement a C program that streams from mic/webcam. I can't seem to be able to sync audio and video. I am missing something. The audio time base is 1/44100, the video one is 1/30. why is my audio lagging behind the video?
[14:14:27 CET] <nonex86> zpc: not at all, i did nothing :)
[14:14:59 CET] <nonex86> cry0: because you supplied wrong pts for audio and video streams?
[14:15:46 CET] <nonex86> as long as your real pts is correct for audio and video the output will be in sync
[14:22:04 CET] <cry0> nonex86 but here is the thing I don't understand. If the audio and video streams have different time bases, how can I pass them absolute PTS values? That should not work either?
[14:22:36 CET] <nonex86> you can always convert time units to real time
[14:22:38 CET] <nonex86> isnt it?
[14:22:45 CET] <nonex86> using its timebase
[14:22:49 CET] <cry0> yes, but what do I do with those?
[14:23:17 CET] <nonex86> depends, i dont know how does your software works
[14:23:40 CET] <nonex86> also
[14:23:48 CET] <nonex86> you said "i am using the libs"
[14:23:54 CET] <nonex86> which one? does this mean
[14:23:58 CET] <nonex86> i am using ffmpeg
[14:24:07 CET] <nonex86> for capture and streaming
[14:24:09 CET] <cry0> nonex86 yes, I am using ffmpeg libraries, pretty recent ones
[14:24:14 CET] <nonex86> or something else?
[14:24:18 CET] <nonex86> well, ok
[14:24:27 CET] <nonex86> so you have incoming streams from somewhere
[14:24:32 CET] <nonex86> which you are capture
[14:24:40 CET] <cry0> nonex86 yes, from webcam and mic
[14:24:53 CET] <nonex86> then, you write them to file
[14:24:57 CET] <nonex86> or something else?
[14:25:11 CET] <cry0> no, I stream them to RTP with mpegts container
[14:25:40 CET] <nonex86> did you do anything with pts?
[14:26:09 CET] <nonex86> or your timebase equals for capture and streaming?
[14:26:19 CET] <cry0> yes, for audio, I add nb_samples to audio frame PTS. for video, I add frame counter to frame PTS. Then I convert to the respective time base of the output stream
[14:26:22 CET] <cry0> no
[14:26:56 CET] <nonex86> never used ffmpeg for rtp streaming
[14:27:15 CET] <nonex86> but from what you told
[14:27:19 CET] <nonex86> i have some questions
[14:27:27 CET] <cry0> sure
[14:27:28 CET] <nonex86> as far as i remember
[14:27:49 CET] <nonex86> every rtp stream has a standard rfc
[14:27:55 CET] <nonex86> with timebase defined
[14:27:58 CET] <nonex86> isnt it?
[14:28:03 CET] <cry0> yes, correct
[14:28:14 CET] <nonex86> dont you need to provide the conversion
[14:28:21 CET] <nonex86> for example
[14:28:50 CET] <nonex86> camera video > convert to real pts > convert to rtp output timebase > rtp streaming
[14:28:52 CET] <nonex86> ?
[14:29:10 CET] <nonex86> are you sure some kinda frame counter is enough?
[14:29:15 CET] <cry0> right, this is what I am doing, but the audio and video out streams have different time bases
[14:29:31 CET] <nonex86> well... i dont see the problem...
[14:29:37 CET] <nonex86> convert the timebase units
[14:29:39 CET] <nonex86> to real time
[14:29:42 CET] <nonex86> using time base
[14:29:45 CET] <nonex86> and then
[14:29:58 CET] <nonex86> convert real time to rtp output timebase
[14:30:21 CET] <cry0> ok, will try it out.
[14:30:23 CET] <cry0> thanks
[14:31:01 CET] <nonex86> av_q2d(streamtimebase)*timestamp
[14:31:12 CET] <nonex86> will give you time in seconds
[14:31:38 CET] <nonex86> reverse the formula, and you will get the time in timebase units
[14:32:34 CET] <nonex86> guess this should work for you
[14:34:37 CET] <cry0> thanks, will try right now
[15:05:57 CET] <Prelude2004c> hey guys.. needing some help over here. so running nginx rtmp module and i am pushing rtmp > server and that is perfectly fine. If i have hls on; the files get created all is well. Now the problem seems to be if i try to pull the stream from the server via rtmp .. .. so when i run ffmpeg -i rtmp://server/whatever/whatever it works and shows me the media info. If i control C and run again, it doesn't . It's as if the session is still wait
[15:05:57 CET] <Prelude2004c> ing for a disconnect or there is something preventing more than 1 connection from a single ip within a certain amount of time. If i kill nginx and restart it starts working again but after the first ffmpeg -i , again nothing... any ideas ?
[15:07:17 CET] <nonex86> ask about this issue on nginx channel?
[15:07:35 CET] <Prelude2004c> yes no response yet. but maybe its a linux issue ( running ubuntu 14 )
[15:08:07 CET] <nonex86> highly doubt this is an os problem...
[15:12:29 CET] <thebombzen> there's probably a keep-alive timeout in the rtmp server
[15:12:46 CET] <thebombzen> cause random short disconnects are possible and it's designed to be robust against that
[15:13:18 CET] <thebombzen> however if you actually just ^C then restart I suspect that it'll retry the handshake, which won't just reconnect the stream
[15:13:52 CET] <thebombzen> my guess is there's some sort of setting in the nginx configuration you can change
[15:14:05 CET] <nonex86> btw, what is default tcp timeout for tcp/ip on stack level?
[15:14:12 CET] <thebombzen> I have absolutely no idea
[15:14:29 CET] <nonex86> in windows it was something around 45 seconds long time ago
[15:14:34 CET] <thebombzen> wow that's long
[15:14:39 CET] <thebombzen> I would have guessed <10
[15:19:22 CET] <Prelude2004c> yes i am scratching my head too
[15:19:35 CET] <Prelude2004c> its not even a min sometimes doesn't work for several min
[15:25:46 CET] <furq> are you pulling the stream with ffmpeg
[15:26:10 CET] <furq> you could try using -rw_timeout
[15:26:15 CET] <furq> https://www.ffmpeg.org/ffmpeg-protocols.html#Protocols
[15:38:31 CET] <Prelude2004c> i am using ffmpeg rtmp://127.0.0.1/source/stream
[16:34:15 CET] <TestIrchatNICK> HI
[16:37:20 CET] <TestIrchatNICK> Does ffmpeg.exe support two watermarks to add?
[16:43:56 CET] <furq> TestIrchatNICK: -i foo.mp4 -i bar.png -i baz.png -filter_complex "[0:v][1:v]overlay[ovr];[ovr][2:v]overlay"
[16:51:08 CET] <fling> How to make a low-fps stream seekable? It is not seekable for me.
[16:51:36 CET] <fling> ff/rev are jumping +-20 minutes
[16:51:58 CET] <fling> for a video with 1/5 fps
[16:54:13 CET] <BtbN> I'd guess your gop length is too long
[16:54:57 CET] <fling> BtbN: how to channge it properly?
[16:55:23 CET] <fling> BtbN: btw the same behavior stays even if I encode with 30fps afterwards.
[16:56:12 CET] <fling> BtbN: like this -> ffmpeg -f x11grab -video_size cif -framerate 1/6 -i :0.0 -r 29.97 /tmp/single.nut
[16:56:24 CET] <fling> -r 29.97 at the end for multiple streams to be in sync
[16:59:03 CET] <TestIrchatNICK> furq Thank you
[17:24:05 CET] <fling> BtbN: set -g 12 but it does not help
[17:24:21 CET] <fling> Which flag should I try to tune?
[17:26:12 CET] <BtbN> with one frame every 5 seconds that would still be an interval of 60 seconds.
[17:28:44 CET] <fling> BtbN: right, I recorded 150 seconds and the video is not seekable
[17:29:39 CET] <BtbN> so... use a shorter one. Or maybe even Iframe-Only for that kind of low framerate
[17:32:10 CET] <fling> BtbN: Which flag to use? Notice I also encode it with -r 29.97 to be in sync with another video stream so libx264 is producing a lot of dupes for this one
[17:34:33 CET] <ircuser5678> hi. I'd like to use ffmpeg under windows to write id3 tags. It works fine as long as I use a different output name like: ffmpeg.exe -i "R:\01.mp3" -metadata title="Testtitle" -c:a copy "R:\01_new.mp3"
[17:35:16 CET] <ircuser5678> but when I want to overwrite an existing file (with -y "R:\01.mp3") it truncates the file to the first two seconds. how do I avoid this?
[17:40:57 CET] <durandal_1707> ircuser5678: you can't, overwriting isn't supported
[17:41:44 CET] <ircuser5678> oh, really? that's bad...
[17:43:23 CET] <fling> Which audio and video codecs are using less cpu?
[17:46:53 CET] <durandal_1707> raw ones?
[17:47:16 CET] <durandal_1707> but they are io heavy
[17:47:44 CET] <fling> What about mjpeg?
[17:54:43 CET] <durandal_1707> fling: it's lossy
[17:58:40 CET] <fling> durandal_1707: I just figured out I don't have much cpu for this encode.
[17:58:57 CET] <fling> I'm capturing a simple screencast with sound and webcam in another video stream
[18:18:04 CET] <durandal_1707> fling: what arch and cpu?
[18:21:37 CET] <fling> durandal_1707: x86 celeron e1500
[18:21:57 CET] <fling> durandal_1707: rawvideo is fine :>
[19:17:59 CET] <kepstin> fling: if you start running out of disk bw, look at ffvhuff or something to save a little bit without much cpu overhead
[19:33:55 CET] <fling> kepstin: thanks.
[22:23:09 CET] <edgy> Hi, I did ffmpeg -i file.wav file.aac and it worked! I am using ffmpeg from my distro and thought aac wouldn't work since ffmpeg is compiled with --enable-gpl can some one explain this please?
[22:23:40 CET] <c_14> What does that have to do with anything?
[22:23:44 CET] <c_14> Licensing != Patent regulation
[22:23:57 CET] <c_14> Or are you confused about libfdk-aac?
[22:24:07 CET] <c_14> ffmpeg has an internal aac encoder
[22:24:16 CET] <edgy> c_14: yes I don't have faac or libfdk-aac installed
[22:24:25 CET] <c_14> Which (if your version of ffmpeg is new enough) is decent in certain modes
[22:24:30 CET] <edgy> c_14: so I wondered what ffmpeg use for this
[22:24:38 CET] <c_14> the internal encoder
[22:25:34 CET] <edgy> c_14: and is it allowed to convert to aac and have the code embedded in a gpl software?
[22:25:43 CET] <c_14> the code itself is gpl
[22:25:46 CET] <c_14> (or lgpl, not sure)
[22:25:51 CET] <c_14> probably lgpl
[22:26:07 CET] <c_14> The internal aac encoder is not based off of libfdk-aac
[22:26:15 CET] <c_14> And therefore doesn't have to follow the same license
[22:26:51 CET] <c_14> I could write and put an aac encoder in the public domain, if I happened to live in a country where I was allowed to put code in the public domain.
[22:27:07 CET] <c_14> (as long as I don't base the encoder off any existing work)
[22:28:51 CET] <edgy> c_14: so any one can convert his audio to aac or it depends on his country?
[22:29:38 CET] <edgy> c_14: unlike mp3?
[22:29:40 CET] <c_14> Now you're in the murky land of patent regulation
[22:29:52 CET] <durandal_1707> on money and lawyers
[22:30:17 CET] <c_14> Depending on your country, use case and lawyers you may or may not be allowed to convert your audio to aac or mp3
[22:30:29 CET] <furq> haven't all the mp3 patents expired now
[22:30:57 CET] <edgy> furq: I don't know but heard some are still valid
[22:31:04 CET] <furq> oh, december 2017
[22:31:05 CET] <edgy> from wikipedia: However, a patent license is required for all manufacturers or developers of AAC codecs.[41] For this reason, free and open source software implementations such as FFmpeg and FAAC may be distributed in source form only, in order to avoid patent infringement.
[22:31:16 CET] <furq> well yeah that's aac
[22:31:51 CET] <furq> also that's just plain wrong
[22:31:53 CET] <edgy> ffmpeg in distros are not distributed in source only. It's binary so I am still confused
[22:32:15 CET] <furq> 21:23:44 ( c_14) Licensing != Patent regulation
[22:32:20 CET] <BtbN> the statement is just wrong, that's all.
[22:32:30 CET] <furq> you can't distribute ffmpeg binaries with fdk-aac because it has a gpl-incompatible license
[22:32:36 CET] <furq> that has nothing to do with aac patents
[22:32:50 CET] <furq> someone's just got the wrong end of the stick and then pointed it at wikipedia
[22:32:58 CET] <BtbN> You can freely distribute binaries with fdk_aac though, as its own license does not limit that in any way. It's just the GPL making it harder.
[22:33:15 CET] <edgy> BtbN: if the wikipedia statement is wrong, please correct it because this confuses a lot of people
[22:33:31 CET] <BtbN> I for sure won't touch law-speak on Wikipedia.
[22:34:28 CET] <furq> ffmpeg has a ton of builtin decoders and probably some encoders for patented codecs
[22:35:13 CET] <furq> it's your responsibility to make sure you don't break the law by using them
[22:35:22 CET] <furq> or at least you don't break the law in a way that someone cares about
[22:35:40 CET] <c_14> (someone with better lawyers than you)
[22:35:50 CET] <edgy> ok I will then leave this law/patents/licenses issues, being new to ffmpeg I just need to understand the basics: so simple questions
[22:36:04 CET] <furq> if you're just encoding for personal use it's not worth worrying about
[22:36:07 CET] <furq> especially if you're in the EU
[22:36:09 CET] <edgy> 1. there is no need to faac or fdk-aac or whatever, ffmpeg already do this, right?
[22:36:20 CET] <BtbN> If it's a recent version
[22:36:30 CET] <furq> fdk is somewhat better than the builtin encoder, but probably not enough to bother building ffmpeg yourself
[22:36:48 CET] <BtbN> at least on master there's barely any difference for AAC LC anymore.
[22:36:55 CET] <edgy> 2. ffmpeg-codecs shows: DEA.L. aac                  AAC (Advanced Audio Coding) (decoders: aac aac_fixed ) why it says decoders but doesn't tell me what encoders are used?
[22:37:30 CET] <furq> ffmpeg -encoders
[22:37:56 CET] <furq> that should show up in -codecs though
[22:38:31 CET] <durandal_1707> edgy: it says by big E
[22:38:51 CET] <furq> which ffmpeg version is that
[22:39:03 CET] <edgy> furq, durandal_1707: ah! thanks
[22:39:04 CET] <furq> actually nvm i guess it's because you only have the builtin encoder
[22:39:16 CET] <furq> it shows up in -codecs if you have an external encoder
[22:39:16 CET] <edgy> furq: 3.2.2
[22:40:22 CET] <durandal_1707> they are just 2 variants of decoders
[22:41:15 CET] <edgy> 3. I got out of questions ;)
[22:42:01 CET] <TD-Linux> ouch yeah that wikipedia text is bad
[22:43:01 CET] <edgy> TD-Linux: so I am not to be blamed for getting confused?
[22:43:23 CET] <TD-Linux> yeah. in particular the first sentence is right, the second is wrong
[22:44:59 CET] <edgy> What's this embedded aac encoder called? which one in libopus > libvorbis >= libfdk_aac > aac > libmp3lame >= eac3/ac3 > libtwolame > vorbis > mp2 > wmav2/wmav1
[22:45:13 CET] <edgy> I mean how it rated among these
[22:45:36 CET] <edgy> got that from: https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio
[22:49:03 CET] <edgy> c_14: is the embedded encoder called aac?
[22:49:47 CET] <edgy> so when I use -c:a aac then I am using the internal, right?
[22:57:06 CET] <furq> yes
[22:58:59 CET] <edgy> furq: you said [00:39] <furq> it shows up in -codecs if you have an external encoder
[22:59:18 CET] <edgy> furq: but the listed decoders aren't they internal? I haven't installed aac_fixed
[23:00:19 CET] <furq> i assume aac_fixed is a fixed-point version of the internal aac decoder
[23:01:33 CET] <edgy> furq: I don't understand this stuff but isn't if logic if ffmpeg mentioned "decoders: aac " to also mention "encoders: aac"?
[23:01:42 CET] <edgy> furq: both are internal
[23:01:49 CET] <furq> you'd think so
[23:02:27 CET] <furq> i guess you could argue it's redundant because it's always the same as the codec name and there's an E in the table on the left
[23:02:50 CET] <furq> but yeah on my build with fdk i get this
[23:02:55 CET] <furq>  DEA.L. aac                  AAC (Advanced Audio Coding) (decoders: aac aac_fixed libfdk_aac ) (encoders: aac libfdk_aac )
[23:05:23 CET] <edgy> furq: thanks
[23:08:38 CET] <edgy> I am converting a file using ffmpeg and using handbrake to see if I can just get rid of it and use ffmpeg directly
[23:09:18 CET] <furq> the only thing handbrake does which ffmpeg can't is getting titles/chapters from DVDs
[23:09:41 CET] <furq> and there are external tools which can do that
[23:10:34 CET] <furq> it did have some filters which ffmpeg didn't but i'm pretty sure those have all made it into libavfilter now
[23:10:37 CET] <edgy> furq: for now I don't need that but when I converted my avi to mp4 I noticed ffmpeg is using mp4 whereas handbrake mp4v2, what's that?
[23:10:56 CET] <edgy> furq: it showed at Codec ID                                 : mp42 (isom/iso2/mp41)
[23:10:57 CET] <furq> http://www.ftyps.com/
[23:11:01 CET] <furq> it rarely makes a difference
[23:14:31 CET] <edgy> furq: sorry couldn't tell the difference from that page. if v2 is a newer version why ffmpeg doesn't support it?
[23:14:59 CET] <agrathwohl> I have a bunch of yuv422p10le ProRes 422HQ video sources that I want to encode to h264 via libx264. What should I set the colorspace (or colormatrix?) video filter to in order to output a proper yuv420p H264 video?
[23:16:19 CET] <edgy> furq: another thing is, I used -crf 26 with both and thought that means constact quality for both video and audio but ffmpeg shows Bit rate mode                            : Constant where as handbrake showed variable, which option I need to pass for that?
[23:22:09 CET] <AppAraat> hi, I'm sorry to be barging in with a noob question like that but I'm extremely unfamiliar with digital video. I basically want to rotate the image of this video file - https://bpaste.net/show/2b1d74161e58 - As far as I've understood this, it can happen using metadata (http://stackoverflow.com/q/25031557) but sadly that doesn't seem to work for me. So is there a way to rotate the image, and then re-encode the
[23:22:11 CET] <AppAraat> video losslessly?
[23:28:40 CET] <furq> AppAraat: if you're trying to flip it 180 degrees then use -metadata:s:v:0 rotate=0
[23:28:47 CET] <furq> it already has the rotation flag applied
[23:32:06 CET] <AppAraat> furq: I tried that but it's still upside-down. I even tried -metadata:s:v:0 rotate=180
[23:33:41 CET] <furq> what player are you using
[23:34:35 CET] <AppAraat> I tried in SMPlayer v. 0.8.6 and VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28)
[23:34:51 CET] <furq> try with mpv
[23:34:51 CET] <AppAraat> (Linux 64bit)
[23:34:55 CET] <AppAraat> ok
[23:35:21 CET] <furq> i'm guessing it was recorded upside down and the phone added the rotation metadata so it'd play right-side-up
[23:35:56 CET] <AppAraat> still flipped. Original is flipped too though. It might very well be a bug in the phone though.
[23:35:59 CET] <edgy> furq: I tried ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 10 -b:v 0 -c:a libvorbis output.webm in one of my videos and noticed it's too slow (still running...) and it's using one cpu, what am I doing wrong, please?
[23:36:08 CET] <furq> you're using libvpx
[23:36:10 CET] <furq> it's slow
[23:36:20 CET] <furq> and the multithreading is somewhere between bad and broken
[23:37:23 CET] <edgy> furq: so free software does non-free x265 better than free vp9? something strange here
[23:37:35 CET] <JEEB> eh
[23:37:35 CET] <furq> AppAraat: weird, mpv should definitely respect the rotation flag
[23:37:40 CET] <furq> i just checked and it works here
[23:38:02 CET] <JEEB> edgy: you are probably mismatching the word non-free and "potentially free to use without payments"
[23:38:05 CET] <JEEB> (in all cases)
[23:38:19 CET] <AppAraat> furq: this is the full command: ffmpeg -i VID_20161213_130204.mp4 -c copy -metadata:s:v:0 rotate=0 VID_20161213_130204_rot.mp4
[23:38:29 CET] <JEEB> x264 and x265 are both FOSS under GPL
[23:38:37 CET] <JEEB> and thus they are not non-free
[23:38:56 CET] <edgy> JEEB: I meant the h.265 not the software
[23:39:04 CET] <furq> yeah that works fine here
[23:39:20 CET] <kepstin> edgy: if you add "-tile-columns 2" to that ffmpeg command, libvpx-vp9 will do a slightly better job of multithreading.
[23:39:25 CET] <TD-Linux> if you say "royalty-bearing" and "royalty-free" then it's less ambiguous
[23:39:30 CET] <AppAraat> and... ffmpeg -i VID_20161213_130204.mp4 -c copy -metadata:s:v:0 rotate=180 VID_20161213_130204_rot_180.mp4
[23:39:33 CET] <furq> you need -threads as well don't you
[23:39:35 CET] <JEEB> (possibly)
[23:39:37 CET] <kepstin> edgy: you also have to manually specify "-threads 4" or whatever, it's not autodetected
[23:39:42 CET] <furq> and yeah it depends on the frame size
[23:39:46 CET] <JEEB> because AVC at least has clear cases for free use
[23:39:49 CET] <TD-Linux> edgy, keep in mind that both x265 and libvpx are commercially developed
[23:39:51 CET] <JEEB> HEVC is a lot more murky
[23:39:55 CET] <furq> just use x264
[23:39:58 CET] <furq> it's good
[23:40:12 CET] <TD-Linux> also there is still not a good chunked encode frontend which is how most users should be threading libvpx
[23:40:17 CET] <AppAraat> mpv version: https://bpaste.net/show/b3e165ed8920
[23:40:30 CET] <furq> oh
[23:40:32 CET] <furq> that's pretty old
[23:40:33 CET] <kepstin> yeah, my conclusion last I tested was unless you're encoding 4k video and have distributed computing power and a chunked encoder, just use x264 :/
[23:40:52 CET] <TD-Linux> edgy, so besides using tiles, consider specifying -speed to ffmpeg. use a higher number for faster
[23:41:03 CET] <JEEB> edgy: also libvpx is pretty much only developed by Google so they completely ignored rate control, realtime video with any sort of OK compression and such
[23:41:07 CET] <TD-Linux> edgy, also -crf 10 is pretty high quality. a lower quality will go faster, try crf 20 or 30
[23:41:09 CET] <furq> you might need a newer mpv and/or a newer ffmpeg, since i'm guessing your distro ffmpeg is out of date as well
[23:41:11 CET] <JEEB> I hope that will improve with AOM
[23:41:20 CET] <JEEB> where google is not the only player
[23:41:22 CET] <furq> there are static builds available for both if you're on an ancient distro
[23:41:44 CET] <kepstin> google uses libvpx for webrtc live stuff in chrome, I have no idea what settings they're using. presumably the deadline mode.
[23:41:56 CET] <AppAraat> furq: ah I see, can I PM you?
[23:42:05 CET] <JEEB> yes, they don't really care about quality in that case too much. just enough to not be completely f'd up
[23:42:11 CET] <furq> you're better off asking in here really
[23:42:11 CET] <TD-Linux> they use rt at cpu-used 6+ for vp9
[23:42:12 CET] <JEEB> also vp8 encoding is a bit faster
[23:42:19 CET] <furq> everyone else in here now knows more about mpv than i do
[23:42:22 CET] <JEEB> oh, they're using vp9 for webrtc? wow
[23:42:32 CET] <TD-Linux> I recommend using a faster speed setting and vp9 instead of vp8 if possible
[23:42:47 CET] <AppAraat> uh well, I wanted someone to review whether the videos are actually flipped or normal. But they are somewhat graphic videos (muscle biopsy)
[23:42:49 CET] <edgy> JEEB, furq: tried ffmpeg -i input.avi -c:v libvpx-vp9 -threads 8 -tile-columns 2 -crf 26 -b:v 0 -c:a libopus output.webm but still very slow and one cpu
[23:43:07 CET] <furq> just check it with the latest mpv
[23:43:07 CET] <TD-Linux> okay strange that should have used more than one thread.
[23:43:17 CET] <JEEB> old version of libvpx?
[23:43:23 CET] <JEEB> I remember old versions just not doing any threading
[23:43:30 CET] <AppAraat> ok I'll see if I can get a static build
[23:43:39 CET] <TD-Linux> edgy, also try -speed 6. at least that should make a large difference
[23:43:45 CET] <JEEB> edgy: also with regards to patents and licensing http://up-cat.net/p/cd70d70b
[23:43:57 CET] <JEEB> that made me laugh at how funkily broken at least the US system is :P
[23:43:57 CET] <TD-Linux> but won't fix the threading
[23:44:11 CET] <JEEB> possibly other ones as well
[23:44:41 CET] <JEEB> AV1 being the next thing after VP9
[23:44:53 CET] <JEEB> where it's no longer google-only
[23:45:23 CET] <furq> i'll never look at my mitsubishi CRT the same way again
[23:45:23 CET] <edgy> JEEB: libvpx 1.6.0
[23:45:33 CET] <JEEB> furq: lo
[23:45:34 CET] <furq> although that's mostly because it's got a scratch in the antiglare
[23:45:34 CET] <JEEB> *lol
[23:45:38 CET] <JEEB> :D
[23:45:56 CET] <JEEB> I'm getting my first new TV in 17 years tomorrow^Wtoday
[23:46:30 CET] <JEEB> edgy: that should have threading in there...
[23:46:33 CET] <kepstin> what I ended up doing for libvpx locally was I use the same git snapshot as they use in the latest chrome release, since it's presumably reasonably well tested :/
[23:46:41 CET] <JEEB> kepstin: yeah
[23:46:49 CET] <JEEB> that's the funny thing with libvpx for years now
[23:46:50 CET] <JEEB> same for ANGLE
[23:47:06 CET] <JEEB> you don't necessarily look at the releases, but the goddamn hashes that they use in chromium
[23:47:09 CET] <JEEB> \o&
[23:47:24 CET] <kepstin> at least you can use the ffmpeg decoder, so you don't have to worry as much about the lack of security updates in libvpx decoder :/
[23:47:47 CET] <kepstin> i think even chrome uses the ffmpeg decoder now, since it's faster?
[23:47:52 CET] <JEEB> nah
[23:48:00 CET] <JEEB> they said they don't want to take in any extra dependencies
[23:48:11 CET] <JEEB> so unless you replace the whole of libvpx it's not likely :D
[23:48:13 CET] <kepstin> they *already* have all of ffmpeg in there
[23:48:21 CET] <JEEB> I know, that's the goddamn joek
[23:48:23 CET] <JEEB> *joke
[23:48:30 CET] <JEEB> but the last I heard that was the reasoning they gave
[23:48:44 CET] <kepstin> they recently switched to using ffmpeg to decode opus rather than libopus directly, which fixed a bunch of bugs :/
[23:48:58 CET] <JEEB> could be that they're not enabling the vp9 decoder
[23:49:10 CET] <JEEB> and thus consider it an added dep or something
[23:49:13 CET] <JEEB> (´4@)
[23:49:35 CET] <edgy> TD-Linux: tried -speed 6, how can I measure the speed? fps=35?
[23:49:44 CET] <TD-Linux> yeah that's pretty fast
[23:49:55 CET] <kepstin> for libvpx-vp9, that's screaming fast ;)
[23:49:56 CET] <edgy> TD-Linux: is -speed 6 means -preset ultrafast?
[23:50:20 CET] <TD-Linux> well the max is -speed 8
[23:50:35 CET] <kepstin> edgy: there's no direct mapping to x264's presets that would sense.
[23:50:36 CET] <AppAraat> furq: I added this PPA: https://launchpad.net/~mc3man/+archive/ubuntu/mpv-tests and I confirm that under this mpv version (https://bpaste.net/show/d17f0a87c9ec) the file VID_20161213_130204_rot_180.mp4 displays as expected. Thank you!
[23:50:39 CET] <kepstin> make sense.
[23:50:42 CET] <TD-Linux> but for a movie fps=35 is already faster than realtime, so quite fast.
[23:50:50 CET] <furq> good to know
[23:50:57 CET] <furq> i thought there were mpv static builds but i couldn't find any either
[23:51:09 CET] <JEEB> mpv-build creates those
[23:51:13 CET] <furq> i guess a PPA will do in a pinch though
[23:51:19 CET] <JEEB> so it makes sense that there is less builds
[23:51:19 CET] <edgy> TD-Linux: still it's single-thread, what are the disadvantage of speed?
[23:51:22 CET] <TD-Linux> kepstin, that's strange, I don't know why that would fix any bugs
[23:51:29 CET] <furq> JEEB: are they distributed anywhere
[23:51:33 CET] <furq> for linux, i mean
[23:51:36 CET] <TD-Linux> edgy, bigger file
[23:51:39 CET] <JEEB> furq: mpv-build is a repo for making those builds
[23:51:46 CET] <JEEB> which is why you don't have too many static builds as such
[23:51:46 CET] <JEEB> :P
[23:52:02 CET] <furq> oh right it builds ffmpeg as well
[23:52:05 CET] <JEEB> yup
[23:52:11 CET] <JEEB> libass, ffmpeg, mpv
[23:52:45 CET] <kepstin> TD-Linux: it fixed https://bugs.chromium.org/p/chromium/issues/detail?id=482934
[23:53:33 CET] <TD-Linux> kepstin, ah strange.
[23:53:50 CET] <TD-Linux> if they were out of space it would have made way more sense to port web audio to libopus and add ffvp9 instead
[23:53:58 CET] <TD-Linux> (though ffvp9 is bigger)
[23:53:59 CET] <kepstin> TD-Linux: issue was that the webaudio stuff was using ffmpeg decoders only, and the <audio> tag had extra code to use libopus
[23:54:02 CET] <edgy> JEEB: couldn't understand your pasted link, so what misubishi is doing exactly?
[23:54:34 CET] <JEEB> edgy: appending its patent(s) so that they match the next gen format :3 (AV1 is the thing that came out of VP10 which came out of VP9)
[23:55:10 CET] <kepstin> TD-Linux: interesting comment on that ticket, apparently they use ffmpeg to decode vp8.
[23:55:12 CET] <JEEB> thus, it pretty much makes really, really unencumbered software just not possible :D there's another thing about a thing generally being seen as having no fees of course
[23:55:18 CET] <TD-Linux> kepstin, lol.
[23:55:38 CET] <TD-Linux> JEEB, well you always have the threat of surprise patents on any software
[23:55:41 CET] <JEEB> yes
[23:55:45 CET] <JEEB> that's the point \o/
[23:55:57 CET] <TD-Linux> might as well pick the cheapest one
[23:55:57 CET] <JEEB> you can't promise that your thing is completely "free of patents" at any point
[23:56:05 CET] <TD-Linux> right that's impossible.
[23:56:18 CET] <JEEB> thus it becomes "this thing might be free to use for now"
[23:56:26 CET] <JEEB> until someone gets trolled hard enough
[23:56:36 CET] <JEEB> we'll be seeing how it goes with vp9 and av1
[23:56:41 CET] <TD-Linux> note that the opus patent license has a defensive clause, which can help with this sort of thing. you lose your right to use opus if you sue someone else over opus
[23:57:27 CET] <JEEB> and just for the record, I'm all for the fact that there's a multi-vendor AOM now
[23:57:43 CET] <JEEB> HEVC licensors going pants-on-head retarded sure helped with that
[23:57:52 CET] <TD-Linux> yeah we couldn't really have asked for more.
[23:58:12 CET] <TD-Linux> (as a royalty free shill)
[23:58:52 CET] <edgy> JEEB: so misubishi can hold patents on av1 retrospectively?
[23:59:11 CET] <JEEB> edgy: as long as it bases upon their existing patent, yes
[23:59:26 CET] <JEEB> fucking awesome system it is <3
[00:00:00 CET] --- Wed Dec 14 2016


More information about the Ffmpeg-devel-irc mailing list