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

burek burek021 at gmail.com
Tue Mar 8 02:05:01 CET 2016


[00:00:10 CET] <J_Darnley> He might mean Libav.
[00:03:38 CET] <galex-713> jookiyaya: err yeah libav sorry
[00:04:08 CET] <galex-713> So yeah Im reading wikipedia now, but Id like to know what happened again
[00:04:52 CET] <J_Darnley> Drama(TM)
[00:30:53 CET] <galex-713> A little question: when -compression-level description says better quality and slower encoding, does it mean quality as more audio quality/nice to hear or more efficient compression?
[00:31:06 CET] <TD-Linux> the latter, generally
[00:31:49 CET] <TD-Linux> to be specific, it increases the quality per bit that you get.
[00:32:02 CET] <galex-713> Ok
[00:32:14 CET] <TD-Linux> whether that means your quality is better, or your bitrate is less depends on the rate control mode you use
[00:34:36 CET] <TD-Linux> you can probably get a better answer in #opus
[00:34:42 CET] <galex-713> Ah ok
[00:34:44 CET] <TD-Linux> note that opus's slowest compression setting is still pretty fast for most purposes
[00:34:59 CET] <galex-713> Yeah I noticed that
[00:36:35 CET] <galex-713> I just noticed for a 2Gio/2 hours wav libmp3lame gave me a 5,3M file and opus gives me at minimum 70M for 80kbps/-compression_level=10, and both sounds the same at my hears, and I find this disturbing/questionning
[00:36:44 CET] <galex-713> Since I always heared that opus > vorbis > mp3
[00:38:37 CET] <TD-Linux> galex-713, I think your settings are off
[00:39:29 CET] <galex-713> are off?
[00:39:50 CET] <TD-Linux> those file sizes imply 155kbps for Opus and 12kbps for MP3.
[00:40:11 CET] <galex-713> vbr for both I think
[00:40:23 CET] <TD-Linux> yeah something is getting set wrong because neither should be that far from 80kbps
[00:40:24 CET] <galex-713> And thats just a guy speaking with pretty low sound
[00:41:23 CET] <TD-Linux> can you paste your command line? (also brb)
[00:42:41 CET] <galex-713> for opus I used ffmpeg -i file.wav -acodec libopus -vbr on -compression_level <0 or 9> -b:a <80, 96, 128 or 256 kbps> -application voip -y file.<compression_level>.<bitrate>.opus
[00:43:51 CET] <galex-713> for mp3 it was something like ffmpeg -i file.wav -acodec libmp3lame -q <0 or 9> -y file.<bitrate>.mp3 I think
[00:43:57 CET] <galex-713> Maybe I did set bitrate on it
[00:58:40 CET] <rainabba> I'm still stuck on multi-casting and I'm wondering if it's because I've made a bad assumption. If I output to udp://192.168.1.10:5501 (and this is an address on the machine running ffmpeg), I can connect using VLC and the same address. I cannot from another machine on the same lan. Should I be able to (firewalls not withstanding of course)?
[01:04:42 CET] <TD-Linux> galex-713, hmm, that looks pretty much correct. try dropping -compression_level, -vbr, and -application and see what happens
[01:05:07 CET] <TD-Linux> you could also try opusenc directly
[01:05:17 CET] <TD-Linux> note that if you're compressing voice 80kbps is overkill
[01:05:50 CET] <Burlington> Good evening folks,  I am trying to use FFMPEG to receive a UDP MpegTS and output it on a DeckLink SDI 4K.   Here is my problem:  http://pastebin.com/Szqz4PMA
[01:11:44 CET] <c_14> Burlington: [decklink @ 0xa678960] Unsupported video size or framerate! Check available formats with -list_formats 1.
[01:16:41 CET] <rainabba> Trying to get HLS setup with "-f hls -use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename %Y%m%d/%Y%m%dT%H%M%S-%s.ts playlist.m3u8", but I get "[mpegts @ 000001dc33190fe0] Could not get segment filename with use_localtime", debug makes it appear that all options are recognized and are valid. Any suggestions?
[01:17:13 CET] <rainabba> I found the following, but don't have enough context to really use it in troubleshooting: https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/hlsenc.c#L528
[01:18:49 CET] <c_14> The call to strftime is failing
[01:19:12 CET] <c_14> hmm, it should work though
[01:22:10 CET] <c_14> works for me
[01:22:16 CET] <rainabba> Linux or WIndows?
[01:22:19 CET] <c_14> linux
[01:22:47 CET] <rainabba> I'm going to bet a bad assumption was made :)  One more reason I need to setup my own compile.
[01:24:01 CET] <c_14> POSIX doesn't define %s
[01:24:09 CET] <c_14> That's a (probably GNU) addition
[01:25:42 CET] <rainabba> "-f hls -use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename foo.ts playlist.m3u8"  Works fine so it's the resolution of %s failing. That is the token for the .ts file index though right?
[01:26:28 CET] <c_14> %s is seconds since epoch
[01:26:45 CET] <rainabba> ahh
[01:27:55 CET] <rainabba> 'foo-%Y%m%d.ts' works
[01:28:19 CET] <rainabba> 'foo-%Y%m%d%S.ts' works!!!
[01:28:50 CET] <c_14> you should be able to use the one you have know just with the -%s removed
[01:29:21 CET] <rainabba> Chunk names will need more resolution. Need to add minutes in there in fact.
[01:30:17 CET] <rainabba> %Y%m%d%H%M%S.ts does it :)
[01:37:31 CET] <Burlington> @c_14 Thank you.  That seems to have corrected the problem/moved me on to the next problem!
[01:43:45 CET] <Wader8> hello
[01:45:22 CET] <Wader8> trying to figure out CRF setting for x265 since I heard it work a bit different, i'm converting from youtube's x264 and wish to use same quality for lower size (preset veryslow) and sometimes I download 720p HD, sometimes 480 and sometimes 360 depending on the type of content
[01:46:14 CET] <JEEB> re-encoding youtube stuff makes no sense due to how heavily youtube compresses while not trying to compress well
[01:46:40 CET] <JEEB> if you are the person who created those clips you should be able to still get the source, I think?
[01:46:58 CET] <JEEB> and then you can re-encode if you want a proper encode in another format
[01:47:09 CET] <JEEB> in case of already raped stuff it just doesn't matter at all
[01:47:22 CET] <JEEB> it's already bad so it doesn't matter
[01:48:06 CET] <Wader8> Why do I get this response from everyone ? No offencce, but a lot of stuff I donwload is in the range of 100-300 MB, I could lower that by 40% according to x265 capabilities right, while preserving "same" quality as the original download
[01:48:39 CET] <JEEB> because youtube is really bad at compression?
[01:48:45 CET] <Wader8> And I have a ton of videos to sort,archive, store etc, I download like 10-20 videos per week
[01:48:55 CET] <JEEB> it both bit rate starves as well as applies fast settings
[01:49:29 CET] <JEEB> like, if its output looks good enough for you and it's not your clip - sure. I just don't believe you will get a major win
[01:49:32 CET] <Wader8> JEEB, why does that matter with what I'm trying to achieve, lower size on same quality the video I got from YT ?
[01:49:47 CET] <JEEB> because the more artifacts you have the harder it is to compress
[01:50:17 CET] <JEEB> and you won't get the same quality. there will be loss no matter what, but it's not necessarily visible
[01:50:18 CET] <Wader8> According to x265 specs it should achieve 40% lower size than x264 at same bitrate I heard in headlines
[01:50:27 CET] <JEEB> that's source to output
[01:50:31 CET] <JEEB> not source to output to output
[01:50:42 CET] <JEEB> also that is theoretical, the implementations are a whole separate thing
[01:50:44 CET] <jkqxz> Have you actually tried reencoding with H.265 and compared the output?  The quoted 40% bitrate benefits of H.265 require you to have the raw source.  If very lossy compression has already been applied then it is hard to make useful improvements.
[01:51:46 CET] <jkqxz> (If the input is relatively high bitrate (i.e. closer to the raw source) then you may still be able to win, but youtube will not provide that.)
[01:53:13 CET] <Wader8> The videos are important to me but they're not like professional archiving here, as long as some key text can be read and the speech-sound heard so it can be understood it's fine, I don't might the small % of loss if I save 40% size that's huge, I have a lot of space ready, 2x2TB drives, but gosh stuff piled up in the last 5 years and in the last 2 years I downloaded like 5 thousand videos...
[01:53:14 CET] <Wader8> ...probably, ranging from 2GB to 300 MB but a lot of them are around 50 to 150 MB
[01:53:27 CET] <jkqxz> As a simple rule, if you can ever see any significant artifacts in the input (macroblock edges, say) then there will be no significant benefit (because the reencode will see the macroblock edges as detail and reproduce them rather than what you actually wanted).
[01:55:28 CET] <Wader8> jeeb well I appreciate the technical explanation, but jkqxz would ever x265 have ability to detect these and not do what it would do, shouldn't there be an option to make the codec treat input not as raw source but as bad output and apply different set of processings ?
[01:57:27 CET] <Wader8> Mostly it's 720p, but some of the stuff doesn't need that high quality, i mean, i need to save on space if I can make my personal small archive, I can't DL everything in HD, so I've started using 480p and 360p links but they're all HD source uploads that go to 1080 and these usually look good and without artifacts even on the lowest resolution links
[01:58:22 CET] <Wader8> it doesn't look like streaming, i don't see any of such artifacts when I put this 360p video into fullscreen
[02:00:28 CET] <Wader8> So if I would do this the CRF setting to use should work OK for all these qualities, cause the point is to automate this, i have like 20 thousand videos total, a lot of them from different times with different version of YT compressers over the years, i know it's a mess, http://slhck.info/articles/crf  so this page has for x264 should this also apply to x265 ?
[02:04:38 CET] <Wader8> JEEB, what if I download from the 1080p link, then put it into 360p and same bitrate/settings with x265 as YT has it for the 360p link in x264  .... workaround ;) ?
[02:05:10 CET] <jkqxz> Yes, CRF works in essentially the same way for x265.  The range is not exactly the same, but since you will need to test it to determine what value you actually want that doesn't actually matter (and it may vary significantly by the input because the compression will have different properties, making automation hard).
[02:07:03 CET] <Wader8> jkqxz, please let there be an app on the net I could sort/move video files according to metadata statistics, I can then make several groups, 720p ones got this settings and 480p gets that, separate batch file, etc
[02:07:29 CET] <Wader8> Let me see if File Menu Tools can do that
[02:07:34 CET] <Wader8> Im on Windows btw
[02:07:54 CET] <Wader8> But obviously I can put Linux live on any time just to get this done
[03:03:58 CET] <tema_> hi all
[03:04:36 CET] <tema_> I would like to know where can I report a problem with ffmpeg rss
[03:04:54 CET] <tema_> rss xml is broken
[03:05:41 CET] <tema_> feedvalidator.org reports that 'Sorry This feed does not validate'
[03:05:52 CET] <c_14> ffmpeg has an rss?
[03:06:01 CET] <tema_> surprisingly yes
[03:06:11 CET] <c_14> ah, found it
[03:06:14 CET] <c_14> it's empty
[03:06:31 CET] <c_14> open an issue on trac
[03:06:50 CET] <tema_> I don't know how to do it
[03:07:30 CET] <tema_> I used to get ffmpeg news on updates via rss a couple of years ago
[03:07:53 CET] <c_14> https://trac.ffmpeg.org/
[03:07:57 CET] <c_14> create an account and then create an issue
[03:08:03 CET] <tema_> I will try
[03:22:23 CET] <tema_> cool. round number: https://trac.ffmpeg.org/ticket/5300
[03:26:51 CET] <tema_> thanks c_14 and good night/day/...
[06:47:15 CET] <jookiyaya> why is it so hard to split a .mkv file exact seconds
[06:56:19 CET] <Akanksha_> What does index mean in streams? Sorry for naive question. I am new to all these things. Thanks in advance. :)
[06:59:48 CET] <yongyung> jookiyaya: What do you mean?
[07:02:47 CET] <jookiyaya> for example i want split the video 5 min video into  1:00 and 4:00
[07:02:58 CET] <jookiyaya> for example i want split 5 min video into  1:00 and 4:00
[07:03:47 CET] <yongyung> jookiyaya: Do you mean from 1:00 to 4:00?
[07:04:10 CET] <jookiyaya> no
[07:04:18 CET] <yongyung> Or do you mean you want to split it in 5 1:00 minute parts?
[07:04:24 CET] <jookiyaya> no
[07:04:32 CET] <jookiyaya> originalvideo = 5:00
[07:04:40 CET] <jookiyaya> video1  duration 1:00
[07:04:44 CET] <jookiyaya> video2 duration 4:00
[07:05:27 CET] <yongyung> jookiyaya: Alright, so what exactly isn't working?
[07:05:55 CET] <jookiyaya> it's splitting into  1:05  and 3::55
[07:05:59 CET] <jookiyaya> or something like that
[07:06:09 CET] <yongyung> jookiyaya: What command have you used?
[07:07:41 CET] <jookiyaya> ffmpeg -i input.mkv -vcodec copy -acodec copy -ss 00:00:00 -t 01:00:00 output1.mkv
[07:07:46 CET] <jookiyaya> is that right
[07:10:36 CET] <yongyung> jookiyaya: What happens with "ffmpeg -ss 00:00 -i input.mkv -t 60 -c copy output1.mkv"?
[07:10:48 CET] <yongyung> Or just leave the -ss away for the first one
[07:10:55 CET] <yongyung> -ss 00:00 is probably stupid
[07:13:10 CET] <jookiyaya> if the video is 1 hour and  i want from   2 min mark to  57 min mark: what do i type
[07:14:20 CET] <yongyung> "ffmpeg -ss 02:00 -i input.mkv -t 55:00 -c copy output1.mkv"
[07:15:32 CET] <jookiyaya> does that command work for every container format?
[07:16:20 CET] <yongyung> Yes
[07:17:06 CET] <yongyung> Well, every container format where you can seek and cut without reencoding I guess, also -c copy only copies the first video and audio stream I think or something like that, but basically yes
[07:19:37 CET] <jookiyaya> didn't work
[07:20:15 CET] <yongyung> jookiyaya: Could you be a bit more specific
[07:20:52 CET] <jookiyaya> especially the 57 mark
[07:21:56 CET] <yongyung> Sorry but nobody can help you with error descriptions like that
[07:22:07 CET] <jookiyaya> if the video is 1 hour and  i want from   2 min mark to  57 min mark
[07:22:32 CET] <jookiyaya> so total video duration of output.mkv =  55min
[07:22:55 CET] <jookiyaya> it did cut the 1st 2 mins but not the last 3 min
[07:24:08 CET] <jookiyaya> and it didn't cut the 1st 2 min precisely
[07:26:07 CET] <jookiyaya> do you understand or no?
[07:26:59 CET] <yongyung> jookiyaya: Well, if it doesn't cut precisely the keyframe interval of the video stream might be too big, but it should've cut the last 3 minutes regardless, what's the console output?
[07:27:06 CET] <yongyung> post on pastebin.com
[07:29:35 CET] <jookiyaya> http://pastebin.com/AZAYqcDh
[07:34:05 CET] <yongyung> jookiyaya: Yeah my guess is that the video files keyframe interval is too high, so you'd have to transcode for accurate cuts
[07:34:33 CET] <jookiyaya> yongyung before that, how come it's not cutting the last 3 min
[07:35:10 CET] <jookiyaya> if the video is 1 hour and  i want from   2 min mark to  57 min mark
[07:35:22 CET] <jookiyaya> assuming original video is 1 hour
[07:36:08 CET] <yongyung> jookiyaya: I don't know, if you could send me the file I could try it out, but it seems rather big. If you cut like a minute out of the video, and then try to cut 30s out of that cut, does it work? Because if it doesn't, just send me the 1 minute clip
[07:37:04 CET] <jookiyaya> could be the command is wrong
[07:39:28 CET] <jookiyaya> i want to cut the  1st 2min of the video and the last 3 min of the video
[07:41:11 CET] <yongyung> command isn't wrong
[07:41:20 CET] <yongyung> unless you want to transcode
[07:42:18 CET] <jookiyaya> if i do  it works:   ffmpeg64 -ss 00:00 -i 5.mkv -t 36:13 -c copy R:\5.mkv"
[07:42:55 CET] <jookiyaya> this doesn't work though:   ffmpeg64 -ss 01:10 -i 5.mkv -t 36:13 -c copy R:\5.mkv"
[07:44:23 CET] <jookiyaya> is this a bug
[07:48:31 CET] <jookiyaya> and if i do  ffmpeg64 -ss 01:10   or  ffmpeg64 -ss 01:12 or  ffmpeg64 -ss 01:13   it makes no difference
[07:51:52 CET] <jookiyaya> i don't understand why this is so difficult
[07:55:17 CET] <yongyung> jookiyaya: Frames aren't saved as pictures in a video, they're basically deltas from the previous frame. Keyframes are, though. So without reencoding, you can only cut from keyframe to keyframe. If your video does only have a keyframe every 5 seconds or so, that's where you can cut without reencoding. Some containers have features that allow you to skip frames at the start of the stream, so it seems like you cut somewhere else, but I'm not
[07:55:17 CET] <yongyung> sure about mkv
[07:55:48 CET] <jookiyaya> i don't have this problem with .wmv file
[07:56:03 CET] <jookiyaya> i can cut precisely with wmv file
[07:56:08 CET] <yongyung> Well it's a completely different file with completely different keyframes
[07:56:54 CET] <yongyung> Also not "from keyframe to keyframe", sorry, but only from a keyframe
[07:57:20 CET] <yongyung> Which is why I'm not sure why the last 3 minutes aren't cut, they should be cut, but like I said, I'd need access to an example file to fiddle with it
[07:57:28 CET] <yongyung> Because it works for every normal .mkv file just fine
[07:57:33 CET] <jookiyaya> yongyung just get any mkv file
[07:57:37 CET] <jookiyaya> and try, it won't work
[07:57:47 CET] <yongyung> jookiyaya: It works just fine
[07:58:05 CET] <jookiyaya> if i am cutting just the last 3 in, it works
[07:58:21 CET] <jookiyaya> but if am cutting beginning and the end, in one command, then it doesn't work
[07:58:30 CET] <jookiyaya> min*
[08:00:04 CET] <jookiyaya> are you doing both at the same time in one command?
[08:01:09 CET] <yongyung> yes
[08:04:52 CET] <rainabba> Possible to have ffmpeg listen for rtmp then use an input? Basically, I've got an app that can only push to RTMP and I need to grab that and handle it with ffmpeg (directly or indirectly).
[08:05:24 CET] <rainabba> I found the rtsp_flags so it seems likely enough, but I don't see rtmp equivalent.
[08:53:35 CET] <JoEMoMMa> when using the following command....i get a error during the movie scan but nothing is writing to the error.log file.
[08:53:37 CET] <JoEMoMMa> ffmpeg -v verbose -i Room.mkv -f null - > error.log
[09:34:46 CET] <relaxed> JoEMoMMa: 2> error.log
[09:43:41 CET] <JoEMoMMa> tried that and i get ....
[09:43:45 CET] <JoEMoMMa> [NULL @ 0x809052c20] Unable to find a suitable output format for '2'
[09:43:45 CET] <JoEMoMMa> 2: Invalid argument
[10:05:15 CET] <rainabba> I've got 2 BlackMagic DeckLink 4K Pro cards installed and can't figure out how to target a particular one with ffmpeg. Can anyone help?
[10:09:51 CET] <rainabba> listdevices shows them both, but with the same name: [decklink @ 000002253401bf00] Blackmagic DeckLink devices:
[10:09:51 CET] <rainabba> [decklink @ 000002253401bf00]   'DeckLink 4K Pro'
[10:09:51 CET] <rainabba>     Last message repeated 1 times
[10:58:27 CET] <Wader8> hello again
[11:01:56 CET] <Wader8> I'm suppose to lower the bitrate I would get similar quality for lower size ... i guess having the bitrate same like x264 file when putting to x265 doesn't make it smaller by much    ..... I guess bitrate doesn't mean quality i figured, it's relative to the codec, In the past I always thought bitrate to be the decoded stream, not the compressed file
[11:04:30 CET] <Hfuy> Hello.
[11:05:15 CET] <JoEMoMMa> still cant figure this out...when i run ffmpeg -v verbose -i file.mkv -map 0:1 -f null - > error.log it will scan and fit finds a error but it will not log to the error.log file.  When i try to add a "2" like so...ffmpeg -v verbose -i file.mkv -map 0:1 -f null - 2> error.log it gives me a [NULL @ 0x809052020] Unable to find a suitable output format for '2'
[11:05:42 CET] <Hfuy> Let's say I do this: ffmpeg -i foo.mov -c:v prores_ks -profile:v 4444 foo_prores.mov
[11:06:21 CET] <Hfuy> Will that maintain the 10-bit information from the 10-bit input, or will it get truncated?
[11:06:34 CET] <Hfuy> Do I need to specifically say -pix_fmt yuv444p10le?
[11:07:49 CET] <c_14> JoEMoMMa: works for me. What shell?
[11:07:52 CET] <c_14> Hfuy: check the output, it should say
[11:08:11 CET] <Hfuy> It said a lot of things.
[11:08:30 CET] <Hfuy> This is more of a generic question.
[11:09:00 CET] <Hfuy> I'm trying to understand what the internal architecture is, so I can understand how this sort of thing will behave in general.
[11:09:20 CET] <Hfuy> I mean, it's certainly producing a 10-bit output file, but I have no idea if it's really got 10 bits of information in it.
[11:10:13 CET] <c_14> If the encoder supports both bit depths, it should maintain 10bit
[11:10:41 CET] <Hfuy> Well, there wouldn't be a lot of point in supporting ProRes 4444 if it didn't, I guess.
[11:10:42 CET] <c_14> Unless a filter in the filterchain doesn't support 10bit (not sure if there are any of those)
[11:11:07 CET] <Hfuy> It doesn't seem to support RGB.
[11:11:39 CET] <Hfuy> ProRes 4444 in general should do, but I don't think the ffmpeg implementation does. Certainly it barfs on -pix_fmt gbrp10le
[11:12:07 CET] <JoEMoMMa> freenas, inside a jail
[11:12:10 CET] <Hfuy> This is slightly counterintuitive as I'm not sure what difference it would make mathematically.
[11:12:24 CET] <JoEMoMMa> so freebsd basiclly
[11:12:34 CET] <c_14> JoEMoMMa: that's not a shell. bash, ksh, tcsh, zsh, heirloom sh?
[11:12:41 CET] <c_14> csh?
[11:12:43 CET] <JoEMoMMa> tcsh
[11:13:01 CET] <Hfuy> Is r10k even a pix_fmt anymore?
[11:14:38 CET] <c_14> JoEMoMMa: tcsh afaik doesn't support 2> either use something bashy or use >&
[11:14:49 CET] <JoEMoMMa> i could try bash but have not
[11:15:09 CET] <c_14> Hfuy: it's not listed in my pix_fmts at least
[11:15:36 CET] <Hfuy> Hmm. I'm pretty sure it used to be, though I could be wrong.
[11:15:50 CET] <Hfuy> Is there a standard way of indicating codec options such as "RGB please?"
[11:17:19 CET] <c_14> you could use the format filter with pix_fmts=[a '|' separated list of all rgb pixel formats]
[11:17:33 CET] <c_14> Don't know of any other way.
[11:17:54 CET] <Hfuy> Hmm.
[11:18:05 CET] <Hfuy> It would surprise me somewhat if they'd supported YUV 444 and not RGB
[11:34:51 CET] <hyponic> I am restreaming a stream using ffmpeg but the source streams seems to have a quick drop every few minutes. i have script that respawns the connection but the problem is that the clients disconnect. is there a way to get ffmpeg to fill up the gap or keep the client connection while waiting to respawn? the respawn time is about half a second.
[12:17:54 CET] <relaxed> JoEMoMMa: read the tcsh man page or use sh
[12:19:42 CET] <jookiyaya> i cannot cut the 3 seconds of a mkv video using ffmpeg
[12:24:55 CET] <odinsbane> jookiyaya: What did you try, and what is the error?
[12:25:23 CET] <jookiyaya> it cuts 6 seconds
[12:25:43 CET] <jookiyaya> even if i choose 3/4/5
[12:27:05 CET] <odinsbane> did you use ffmpeg -i source.mp4 -ss 3 ...
[12:27:52 CET] <jookiyaya>  ffmpeg64 -ss 00:03 -i 5.mkv -t 60:00 -c copy R:\5.mkv"
[12:28:02 CET] <jookiyaya> assuming original video is 1 hour
[12:28:30 CET] <jookiyaya> when i am cutting the end , then it works fine by seconds
[12:28:39 CET] <jookiyaya> but cutting the beginning, it has problems
[12:29:00 CET] <odinsbane> http://stackoverflow.com/questions/12208639/ffmpeg-convert-video-from-specified-time-period-slowly/12208967#12208967
[12:29:33 CET] <jookiyaya> so it's a known issue?
[12:30:09 CET] <odinsbane> The location of -ss can make a difference.
[12:30:23 CET] <jookiyaya> i don't understand
[12:30:56 CET] <odinsbane> ffmpeg -ss 00:03 -i 5.mkv vs ffmpeg -i 5.mkv -ss 00:03 ...
[12:31:18 CET] <jookiyaya> oh
[12:32:04 CET] <jookiyaya> are you sure that will magically fix my issue
[12:32:27 CET] <odinsbane> no.
[12:33:31 CET] <jookiyaya> how do i fix it then
[12:37:18 CET] <odinsbane> jookiyaya: http://trac.ffmpeg.org/wiki/Seeking
[12:39:09 CET] <jookiyaya> not understanding what that page is trying to do in the first place
[12:39:29 CET] <jookiyaya> i am trying to cut 3 seconds of video in the front
[12:39:39 CET] <odinsbane> That is what the -ss parameter does.
[12:39:53 CET] <odinsbane> It is called seeking, that is what that page is about.
[12:40:37 CET] <odinsbane> Scroll to the bottom, and read Seeking while doing a codec copy
[12:42:31 CET] <jookiyaya> why is this so difficult
[12:42:32 CET] <odinsbane> Using the -ss after you specify the input *can* be more accurate. Using copy will cause you to only be able to cut at keyframes, so you *most likely* cannot use copy. You will have to re-encode.
[12:43:10 CET] <jookiyaya> explain why  cutting the end of the video works fine
[12:43:24 CET] <jookiyaya> precisely to the second
[12:49:36 CET] <jookiyaya> also this does not work:  ffmpeg64 -ss 01:00 -i 5.mkv -t 59:00 -c copy R:\5.mkv"
[12:50:12 CET] <odinsbane> What doesn't work about it.
[12:50:24 CET] <jookiyaya> it cuts 1st min  but not last 1 min
[12:50:43 CET] <jookiyaya> asssuming original video is 1 hour
[12:51:00 CET] <jookiyaya> ffmpeg64 -ss 00:00 -i 5.mkv -t 59:00 -c copy R:\5.mkv"
[12:51:04 CET] <jookiyaya> that works though
[12:51:08 CET] <odinsbane> Yes, you start at minute 1 and go for 59 minutes, which means it goes to thte end.
[12:51:10 CET] <c_14> jookiyaya: 60 - 1 = 59
[12:51:32 CET] <c_14> odinsbane: using -ss after the input doesn't make it more accurate than before (assuming you don't set -noaccurate_seek)
[12:51:38 CET] <jookiyaya> so what is the command then  if i want to cut 1st min and last 1 min
[12:52:04 CET] <jookiyaya> 1 hour original video
[12:52:13 CET] <c_14> jookiyaya: either calculate the duration beforehand or use -ss after -i and -to instead of -t
[12:52:34 CET] <c_14> You need to know the duration of the file beforehand in either case
[12:52:39 CET] <jookiyaya> so if the video is 1 hour exactly,  what do i type
[12:53:29 CET] <c_14> To do what?
[12:54:18 CET] <jookiyaya> original video = 1 hour exactly:   i want to cut 1st one min  and last one min:    final video's duraction = 58 min
[12:54:38 CET] <c_14> ffmpeg -ss 1:00 -i input -t 58:00 out.mkv
[12:54:59 CET] <c_14> or ffmpeg -i input -ss 1:00 -to 59:00 out.mkv
[12:55:19 CET] <relaxed> maybe -copyinkf would help
[12:55:50 CET] <jookiyaya> oh, so i have to use -to  instead of -t
[12:57:09 CET] <c_14> you can also use ffmpeg -ss 1:00 -i input -copyts -to 59:00 out.mkv
[12:59:53 CET] <JoEMoMMa> can ffmpeg be used to repair video files that contain errors?
[13:06:37 CET] <jookiyaya> why is it that when i play the out.mkv  it doesn't play right away
[13:10:30 CET] <jookiyaya> is that have to do with slower seek
[13:24:52 CET] <hyponic> I am restreaming a stream using ffmpeg but the source streams seems to have a quick drop every few minutes. i have script that respawns the connection but the problem is that the clients disconnect. is there a way to get ffmpeg to fill up the gap or keep the client connection while waiting to respawn? the respawn time is about half a second.
[13:24:56 CET] <hyponic> anyone?
[13:28:42 CET] <Carlrobertoh> How could I listen incoming ffmpeg video in VLC? Right now I can play outcoming stream by this command ffplay -rtsp_flags listen -i rtsp://127.0.0.1:8554/live.sdp
[13:48:58 CET] <Carlrobertoh> anyone?
[14:58:47 CET] <Fyr> what, JEEB, did anybody care about the delay lag?
[15:27:39 CET] <galex-713> TD-Linux: hi, re
[15:27:45 CET] <galex-713> Sorry, I felt asleep yesterday
[15:27:51 CET] <galex-713> So here some stats I did: https://paste.debian.net/412782/
[15:28:18 CET] <galex-713> Also Id like to know& is there a way to calculate the average bitrate of an audio stream using vbr?
[15:29:56 CET] <c_14> size/length
[15:29:58 CET] <retard> divide filesize by length
[15:30:26 CET] <galex-713> oh yeah obsviously x)
[15:30:54 CET] <J_Darnley> I don't know what input you are using but please make sure it does not have an embedded cover image
[15:31:02 CET] <J_Darnley> ffmpeg likes to copy those.
[15:31:10 CET] <galex-713> it doesnt
[15:31:20 CET] <galex-713> Oh, wait
[15:31:24 CET] <J_Darnley> good
[15:31:34 CET] <J_Darnley> (actually worse, ffmpeg will reencode them to png!)
[15:31:59 CET] <galex-713> (waaat? why?)
[15:32:20 CET] <J_Darnley> Because it is a "video stream" st ffmpeg instead of a binary attachment
[15:32:30 CET] <J_Darnley> *to ffmpeg
[15:32:41 CET] <galex-713> Heres duration is added: https://paste.debian.net/412784/
[15:33:08 CET] <galex-713> J_Darnley: Oh, you mean like a one-frame video input?
[15:33:13 CET] <J_Darnley> yes
[15:33:14 CET] <galex-713> So why png and why not jpeg?
[15:33:26 CET] <galex-713> I thought jpeg was more near to what video encoders do than png
[15:33:33 CET] <J_Darnley> perhaps png comes first in some list of supported formats
[15:33:47 CET] <galex-713> thats a non-sense&
[15:33:56 CET] <galex-713> Noone did report a bug for that?
[15:35:57 CET] <galex-713> Also, is there a way to know the size of a stream itself, instead of file size, so it also works without having to creating a temporary demultiplexed file and make sure theres no cover image, etc.?
[15:36:56 CET] <J_Darnley> -vn would stop the cover from being copied.
[15:37:11 CET] <J_Darnley> and I think ffmpeg prints the size of audio and video streams
[15:37:19 CET] <mkj3729> Is it possible to enforce the usage of a specific encoder in ffserver?
[15:37:23 CET] <J_Darnley> ... when its finished
[15:37:59 CET] <J_Darnley> mkj3729: yes in the sttings file I think
[15:38:28 CET] <Carlrobertoh> How could I listen incoming ffmpeg video in VLC? Right now I can play outcoming stream by this command ffplay -rtsp_flags listen -i rtsp://127.0.0.1:8554/live.sdp
[15:39:24 CET] <mkj3729> I tried to stream h264 in mpeg-ts using the nvenc encoder, but ffmpeg always falls back to libx264
[15:39:40 CET] <J_Darnley> open the input in vlc, obviously!
[15:40:50 CET] <Carlrobertoh> VLC could not connect to "127.0.0.1:8554".
[15:41:04 CET] <J_Darnley> Isn't that the output?
[15:41:31 CET] <Carlrobertoh> how could i open the input ?
[15:42:09 CET] <furq> galex-713: mediainfo will show you the audio stream bitrate
[15:42:13 CET] <J_Darnley> By opening it in vlc!
[15:42:16 CET] <furq> ffprobe apparently isn't smart enough
[15:42:25 CET] <J_Darnley> What's not to understand about that?
[15:43:19 CET] <Carlrobertoh> Media->Open network stream and url ?
[15:43:42 CET] <Carlrobertoh> also i used vlc rtsp://127.0.0.1:8554/live.sdp
[15:43:46 CET] <Carlrobertoh> still nothing
[15:45:59 CET] <Carlrobertoh> J_Darnley: Connection failed: VLC could not connect to "127.0.0.1:8554". Your input can't be opened: VLC is unable to open the MRL 'rtsp://127.0.0.1:8554/live.sdp'.
[16:03:57 CET] <galex-713> J_Darnley: so why ffmpeg does that and why wasnt it fixed?
[16:07:26 CET] <Carlrobertoh> What are the reasons for quality drop ? I mean I am streaming a video from one host to another and the quality is dropping
[16:12:23 CET] <durandal_1707> trascoding?
[16:14:16 CET] <Carlrobertoh> right now i've set encoding options to: bit_rate 400k, time_base.num 1, time_base.den = 25, gop_size 10, max_b_frame 1, pix_fmt AV_PIX_FMT_YUV420P
[16:18:01 CET] <atomnuker> Fyr: yes, the encoder supports VBR, just use -q:a 0.0-1.0 instead of -b:a 128k
[16:18:34 CET] <Fyr> it's time to make another comparison!
[16:18:36 CET] <Carlrobertoh> -q stands for ?
[16:19:27 CET] <Fyr> unfortunately, ffmpeg -h encoder=aac says nothing.
[16:19:44 CET] <J_Darnley> Because it's a global option!
[16:20:00 CET] <J_Darnley> You may think of it as quality
[16:20:31 CET] <J_Darnley> Carlrobertoh: No fucking wonder it looks like shit!  400k and gop size 10?
[16:21:19 CET] <Fyr> atomnuker, what is  the range of the -q:a parameter?
[16:21:46 CET] <Carlrobertoh> J_Darnley, what should it be?
[16:22:01 CET] <J_Darnley> 250 would be x264's default
[16:22:41 CET] <Carlrobertoh> 250k ?
[16:22:52 CET] <J_Darnley> oh bitrate you mean?
[16:22:52 CET] <Carlrobertoh> i'm using MPEG2VIDEO
[16:22:53 CET] <J_Darnley> no
[16:22:59 CET] <J_Darnley> oh even worse
[16:24:06 CET] <Carlrobertoh> when i capture the video on disk, then it is good
[16:24:13 CET] <Carlrobertoh> but when i stream it, then it looks like shit
[16:25:45 CET] <dsl42> cant you just stream a copy? no encoding, i mean
[16:25:56 CET] <Fyr> atomnuker, does it mean that the range is from 0.0 to 1.0? why is it different from that of libfdk_aac, which is 1-5?
[16:26:40 CET] <Carlrobertoh> i want it in real time
[16:28:21 CET] <furq> Fyr: why does lame go from 0 to 9? why does flac go from 8 to 1? why does x264 go from 0 to 51?
[16:29:38 CET] <durandal_1707> flac?
[16:29:48 CET] <Fyr> because the developers want to cause pain in the ass of a user.
[16:30:00 CET] <dsl42> B-)
[16:30:05 CET] <furq> which user
[16:30:18 CET] <Fyr> furq, what is the range of the native FFMPEG AAC encoder?
[16:30:24 CET] <furq> don't ask me
[16:30:27 CET] <Carlrobertoh> damn, i cant figure out why the quality gets fd up
[16:30:38 CET] <furq> i was told not to use it for vbr
[16:30:56 CET] <Jhokkar> Are you streaming over wifi?
[16:30:59 CET] <furq> also does fdk even have q:a mapped
[16:31:04 CET] <furq> last time i used it it was -vbr
[16:31:06 CET] <Carlrobertoh> lan
[16:31:21 CET] <Carlrobertoh> but yes
[16:31:23 CET] <dsl42> Carlrobertoh, you need mpeg2? i would always use x264 if possible
[16:31:43 CET] <Carlrobertoh> honestly i dont need it
[16:33:04 CET] <furq> 15:26:40 ( Carlrobertoh) i want it in real time
[16:33:07 CET] <Carlrobertoh> AV_CODEC_ID_H264 instead of AV_CODEC_ID_MPEG2VIDEO
[16:33:09 CET] <furq> how does this prevent you from copying the stream
[16:33:54 CET] <Carlrobertoh> I dunno, right now I have able to record packets and send it to web using rtsp protocol
[16:34:13 CET] <Carlrobertoh> code acts as a client
[16:34:21 CET] <dsl42> ah i thought huge filesize and less bandwidth
[16:34:32 CET] <Carlrobertoh> and it can be listened ffplay -rtsp_flags listen -i rtsp://127.0.0.1:8554/live.sdp
[16:36:39 CET] <maco1717> hi, im trying to output to a window "a command" that takes to streams and overlays them sort of picture in picture, I have managed to do the PIP to record to a file, ive looked around and apprently the way to put this to a windows would be namepipe to ffplay? this is the command
[16:36:50 CET] <maco1717> ./ffmpeg -i 'rtsp://' -i 'rtsp://' -filter_complex "[1]scale=iw/2:ih/2 [pip]; [0][pip] overlay_w-10:10" pipe:1 ¦ ./ffplay -i pipe:1
[16:36:59 CET] <maco1717> i get unable to find a suitable output format for pipe:1 pipe:1: invalid argument pipe:: invalid data found when procesin input
[16:49:29 CET] <atomnuker> Fyr: initially, the -q:v or -q:a argument was mapped to the MPEG2 VBR quality setting (which ranges from 0-31)
[16:49:38 CET] <atomnuker> but every encoder has been doing it's own thing with it
[16:50:00 CET] <Fyr> I would copy everything from lame. =)
[16:50:23 CET] <Fyr> atomnuker, so what is the range for the native AAC encoder?
[16:53:59 CET] <basisbit> anyone here who could maybe spare a few minutes and help me at an issue with sws_scale which I get now that I tried to get the open source ultrastar deluxe karaoke game to work with ffmpeg 3.0? I get a swscale-4!sws_getCachedContext unhandled exception when clling sws_scale now after changing from ffmpeg 2.8 to 3.0 here: https://github.com/UltraStar-Deluxe/USDX/blob/master/src/media/UVideo.pas#L926
[16:55:38 CET] <rainabba> I've got 2 BlackMagic DeckLink 4K Pro cards installed and can't figure out how to target a particular one with ffmpeg. Can anyone help? listdevices shows them both, but with the same name: [decklink @ 000002253401bf00] Blackmagic DeckLink devices: [decklink @ 000002253401bf00]   'DeckLink 4K Pro'     Last message repeated 1 times
[16:56:35 CET] <basisbit> already am struggling with that issue for lots of days :-( I checked the sws_getContext creation and it does not throw any error or similar.
[16:57:28 CET] <kepstin> Fyr: looks like the native ffmpeg aac encoder probably uses the same range for -q as the faac encoder, so around 10-500? I have no idea if it's actually hooked up or works, last i heard, the vbr mode was still experimental.
[16:58:11 CET] <atomnuker> Fyr: it's from 0 to around 25, depending on the input
[16:58:32 CET] <Fyr> ok, thanks.
[16:58:47 CET] <Fyr> I have a comparison to perform. =)
[16:59:32 CET] <atomnuker> Fyr: though it's not linear e.g. 2 won't have twice the bitrate of 1
[16:59:52 CET] <Fyr> atomnuker, where do I read about it?
[17:00:10 CET] <Fyr> libfdk_aac, libfaac - they all have documentation.
[17:00:19 CET] <atomnuker> so usually for a 128kbps level you need to use -q:a 0.8
[17:00:35 CET] <atomnuker> there's doc/encoders.texi
[17:03:52 CET] <Fyr> atomnuker, doc/encoders.texi says to use "used to set the quality value used by libfaac. A reasonable range for the option value in QP units is [10-500]"
[17:05:43 CET] <furq> https://github.com/FFmpeg/FFmpeg/blob/master/doc/encoders.texi#L46
[17:07:45 CET] <furq> there is no global_quality item in that subsection
[17:08:09 CET] <Fyr> ok, now I'm confused more.
[17:50:58 CET] <atomnuker> nothing confusing, it's just that -q:a sets global_quality inside the main avctx struture
[18:13:48 CET] <maco1717> hi, im trying to output to a window "a command" that takes two streams, from an ipcam on another stream, and overlays them, like video in video or sort of picture in picture, I have managed to do the PIP to record to a file, Ive looked around and apprently the way to put this to a windows would be namepipe to ffplay? this is the command from this page http://www.oodlestechnologies.com/blogs/PICTURE-IN-PICTURE-effect-using-FFMPEG
[18:14:08 CET] <maco1717> command: ./ffmpeg -i 'rtsp://' -i 'rtsp://' -filter_complex "[1]scale=iw/2:ih/2 [pip]; [0][pip] overlay_w-10:10" pipe:1 ¦ ./ffplay -i pipe:1
[18:14:15 CET] <maco1717> I get unable to find a suitable output format for pipe:1 pipe:1: invalid argument pipe:: invalid data found when procesin input  My question is how to "output to screen" rather than to a file... I found piping to  fplay but not shure if that'be possible and if it would be the best solution as I understand fplay is more for Dev. Any recommendations?
[18:16:20 CET] <c_14> add -f nut before the first pipe:1 and change the second pipe:1 to pipe:0
[18:16:24 CET] <durandal_1707> error says it all,
[18:43:34 CET] <andrey_utkin> is it possible to send commands to filter-sources like "color" via "sendcmd"? seems not.
[18:47:29 CET] <durandal_1707> andrey_utkin: isn't it documented?
[18:50:15 CET] <andrey_utkin> durandal_1707: it is only said that "sendcmd" must be inserted between two video filters. I _guess_ commands are supposed to be transmitted towards output, just like frames, and not both ways, in which case what I want (to reinint colorsrc) won't work. Is that correct or wrong?
[18:50:23 CET] <andrey_utkin> http://ffmpeg.org/ffmpeg-filters.html#sendcmd_002c-asendcmd the doc section
[18:52:02 CET] <Fyr> atomnuker, could you add to the wiki the range of -q:a and corresponding quality/bitrate like was done for the other AAC encoders?
[18:52:11 CET] <durandal_1707> andrey_utkin: try it, use sendcmd immediately after color source
[18:52:40 CET] <andrey_utkin> ok will try
[18:52:42 CET] <andrey_utkin> thanks durandal_1707
[18:58:30 CET] <andrey_utkin> sendcmd reaches "upstream" targets
[19:04:29 CET] <maco1717> thank that worked for me!
[19:04:34 CET] <maco1717> thanks*
[19:09:54 CET] <Duality> what happens when i run ffmpeg without -framerate ?
[19:10:02 CET] <Duality> does it run at the max it can ?
[19:10:48 CET] <Fyr> it takes it from the input file.
[19:11:09 CET] <Fyr> or, if it's broken somehow, it sets something by default.
[19:11:25 CET] <Duality> Fyr: ok, but I am screen capturing
[19:15:02 CET] <Fyr> Duality, might I suggest to run a test and analyze the output file?
[19:15:29 CET] <Duality> good idea! :)
[19:15:41 CET] <Fyr> 10 fps, my guess.
[19:20:27 CET] <andrey_utkin> "Filtergraph syntax" doc lacks explanation how to set filter instance name, all existing references to filter instance names are abstract or use default form "filtername_parsed_N"
[19:20:52 CET] <andrey_utkin> is it impossible to set filter instance names in filtergraph syntax?
[19:23:24 CET] <voip_> hello guys
[19:25:47 CET] <durandal_1707> andrey_utkin: isnit filtername_n?
[19:26:42 CET] <Duality> Fyr: ffmpeg output says that the fps get less and less but is now stabalizing around 33 fps :) but it's using all my cores! :D
[19:28:55 CET] <andrey_utkin> according to libavfilter/graphparser.c:104, it is not customizable and is "Parsed_%s_%d", filt_name, index. Unless avfilter_graph_alloc_filter() is used directly
[19:31:02 CET] <voip_> I for taking leave rtmp stream and converting to MPEG2 ai am using next commands, but on output i have variable stream speed. I need 4-5 mb on output. How to fix that . My commands: -f flv -i "$INPUT" -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 29.97 -g 45 -bf 2 -trellis 2 -cmp
[19:31:03 CET] <voip_> 2 -subcmp 2 -s 720x480 -b 5000k -bt 350k -acodec ac3 -ab 192k -ar 44100 -async 1 -y -f mpegts  "$OUTPUT"
[19:39:01 CET] <ethe> How do I limit the rate of decoding?
[19:39:19 CET] <JEEB> the only hack for that is -re before -i
[19:39:28 CET] <JEEB> which limits you to realtime decoding (kind of)
[19:40:03 CET] <ethe> ah thanks
[19:48:55 CET] <Fyr> JEEB, how much would you bet that the delay bug will be fixed within the next three years?
[19:49:48 CET] <JEEB> I think a lot of people just won't care because API users already get it right. but you're definitely not the first one who WTF'd at the WAV output
[20:17:39 CET] <Guest66065> Hello all, I run a video site, but watermark logo still in different sizes in every video with different resolution. My question: is there a way to scale watermark image in every video by some kind of percentage to have the same size of watermark whatever the resolution of the video.
[20:18:19 CET] <Fyr> to write a wrapper script?
[20:18:52 CET] <kepstin> Guest66065: sure, using the 'scale2ref' filter to adjust the size of the overlay image.
[20:19:35 CET] <kepstin> can use expressions for the width/height to do arbitrary calculations based on the video size
[20:20:47 CET] <Guest66065> kepstin : do you have an example of use?=
[20:21:23 CET] <kepstin> Guest66065: not really, but it shouldn't be hard to figure out from the documentation of the scale and scale2ref filters.
[20:36:40 CET] <voip_> I am taking live rtmp stream and converting to MPEG2
[20:36:40 CET] <voip_> I need 4-5 Mb on output, but my speed on output is variable 2.5-3.5
[20:36:40 CET] <voip_> My commands:
[20:36:40 CET] <voip_>  -f flv -i "$INPUT" -vcodec mpeg2video -pix_fmt yuv420p -me_method epzs -threads 4 -r 29.97 -g 45 -bf 2 -trellis 2 -cmp
[20:36:40 CET] <voip_> 2 -subcmp 2 -s 720x480 -b 4000k -bt 350k -acodec ac3 -ab 192k -ar 44100 -async 1 -y -f mpegts
[20:36:42 CET] <voip_> How should i change commands for having constant bitrate on output
[20:51:07 CET] <voip_> any help, guys ?
[20:52:50 CET] <DHE> -minrate and -maxrate
[20:53:06 CET] <DHE> set them to the same value, 4000k along with the current settings
[21:09:14 CET] <voip_> DHE, thank you thats works! One more question . In my commands i have  -b 4000k -bt 350k  whats means those commands ?
[21:11:40 CET] <DHE> bitrate tolerance. how much it's allowed to deviate
[21:12:15 CET] <DHE> it's usually best to give ffmpeg as much to work with as you can. strict CBR isn't usually a good idea
[21:17:36 CET] <voip_> so, better if i leave ( -b 4000k -bt 350k ) in commands or delete them ?
[21:19:48 CET] <DHE> leave them
[21:24:00 CET] <voip_> thank you!
[21:44:33 CET] <godofgrunts> I'm trying to normalize video lengths (avoiding spoilers this way) and I want to concatenate two videos to a certain duration. For example, first video is 8 minutes long and  the second video is 30 minutes long. All videos will be normalized to 30 minutes. So I want to concatenate the 8 min video and the 30 min video but I only want to use the firs
[21:44:33 CET] <godofgrunts> t 22 minutes of the video.
[21:46:57 CET] <godofgrunts> More simply x = 8 y = 30 x+y=z [ concatenate x + (y-z) ]
[21:47:16 CET] <godofgrunts> nope that's wrong
[21:47:58 CET] <godofgrunts> x = 8 y = 30 (x+y)-30=z [ concatenate x + (y-z) ]
[21:48:46 CET] <godofgrunts> lol or x = 8 y = 30 [ concatenate x + (y-x) ]
[22:13:31 CET] <J_Darnley> sounds impossible with ffmpeg
[22:22:57 CET] <flux> wouldn't it be nice if ffmpeg had host-endian pixel formats..
[22:23:52 CET] <J_Darnley> I'm pretty sure it does.
[22:24:19 CET] <ubitux> godofgrunts: concat+trim filter? or concat demuxer + -t option if inputs are compatibles
[22:26:28 CET] <flux> j_darnley, oh :-). now I looked past the obvious part in pixfmt, and indeed it chooses some pixel format names by AV_HAVE_BIGENDIAN, thank you :)
[22:26:42 CET] <jookiyaya> i cannot cut the 3 seconds of a mkv video using ffmpeg
[22:27:20 CET] <godofgrunts> @ubitux they are compatible. How do I only apply -t to the second input?
[22:27:55 CET] <ubitux> you do the calculation yourself and set the -t for the total duration of the output
[22:28:26 CET] <ubitux> but your constraint is that final duration unless i'm mistaken, so nothing to compute
[22:28:51 CET] <jookiyaya> ffmpeg64 -ss 00:03 -i 5.mkv -t 60:00 -c copy R:\5.mkv"
[22:29:12 CET] <furq> jookiyaya: you can't do frame-accurate cuts with -c copy unless you cut on a keyframe
[22:29:27 CET] <jookiyaya> furq okay, then what option do i have
[22:29:29 CET] <godofgrunts> @ubitux one second
[22:29:31 CET] <furq> cut on a keyframe?
[22:29:33 CET] <ubitux> jookiyaya: you're extracting 57sec starting at t=3s
[22:29:46 CET] <kepstin> godofgrunts: should be trivial to do, just use the -t output option or a trim filter after the concat.
[22:29:54 CET] <jookiyaya> furq what is the command to do that
[22:30:41 CET] <ubitux> kepstin: if he's using a concat demuxer, he doesn't want to transcode, and so won't be able to use a trim filter, -t will do
[22:30:48 CET] <furq> there isn't one
[22:30:50 CET] <godofgrunts> @ubitux @kepstin maybe like ffmpeg -i "concat:input1.mp4|input2.mp4" -c copy -t 00:30:00 output.mp4 ?
[22:30:58 CET] <ubitux> godofgrunts: concat demuxer, not protocol
[22:31:04 CET] <furq> -ss will start at the closest keyframe unless you reencode
[22:31:21 CET] <godofgrunts> I don't need to start at a certain key frame though
[22:31:33 CET] <godofgrunts> like right now input1 and input 2 are the same size and codec
[22:31:35 CET] <ubitux> there are 3 concats, concat protocol (shit), concat demuxer (can't transcode with it, input matching constraints), and concat filter (accurate, transcode)
[22:31:47 CET] <ubitux> look up the concat demuxer documentation
[22:32:18 CET] <godofgrunts> I did
[22:32:20 CET] <ubitux> then ffmpeg -f concat -i ... -c copy -t 30:00 ...
[22:32:25 CET] <godofgrunts> ffmpeg -i "concat:input1.mpg|input2.mpg|input3.mpg" -c copy output.mpg is the example they give
[22:32:31 CET] <ubitux> no
[22:32:31 CET] <godofgrunts> okay yea that's what I asked
[22:32:34 CET] <ubitux> this is the concat protocol
[22:32:51 CET] <godofgrunts> oh
[22:32:53 CET] <godofgrunts> Yeah you'e right
[22:32:56 CET] <jookiyaya> furq with .wmv i can cut exact to a second
[22:33:02 CET] <ubitux> godofgrunts: http://ffmpeg.org/ffmpeg-formats.html#concat-1
[22:33:03 CET] <jookiyaya> but i cannot seem to do this with .mkv
[22:33:30 CET] <ubitux> godofgrunts: heh, you can even set the duration here, but in your case you actually don't
[22:34:32 CET] <jookiyaya> what is the switch to overwrite automatically
[22:35:03 CET] <godofgrunts> So am I supposed to put everything into one file? Like /path/file1.mp4 /path/file2.mp4 duration 00:30:00 ?
[22:35:21 CET] <godofgrunts> Because I do need the duration
[22:36:15 CET] <godofgrunts> Oh wait, do I have to manually set the duration of the file? That kind of sucks
[22:36:27 CET] <jookiyaya> anybody know the switch to overwrite file automatically, without confirmation
[22:36:48 CET] <furq> -y
[22:37:36 CET] <jookiyaya> thanks
[22:38:54 CET] <jookiyaya> i just did  ffmpeg64 -ss 00:01 to 00:09 -i 6x.mkv -c copy R:\6.mkv -y     and nothing made a difference
[22:39:18 CET] <jookiyaya> i don't understand
[22:40:12 CET] <kepstin> jookiyaya: if you're using -c copy, the accuracy you get with -ss depends entirely on where the keyframes are located in the input file. If you want an exact cut, you have to re-encode.
[22:41:27 CET] <jookiyaya> kepstin i had to do -ss 00:10 to make a difference, so i cannot change anythign lower than 10 seconds
[22:42:06 CET] <kepstin> jookiyaya: that means that your input file probably has keyframes every 10 seconds or so
[22:42:30 CET] <jookiyaya> kepstin is this mkv thing?
[22:42:30 CET] <kepstin> so with that input file, you'll get ~10s accuracy with copy mode.
[22:42:45 CET] <kepstin> jookiyaya: no, depends on the settings used with the video encode.
[22:43:07 CET] <jookiyaya> kepstin then explain why if i am cutting  end of the video, then i can get precise second
[22:43:22 CET] <jookiyaya> only beginning of the video, i cannot do precise
[22:43:33 CET] <kepstin> jookiyaya: because you can only start decoding a video at a keyframe. you can stop decoding anywhere
[22:44:19 CET] <jookiyaya> so ending cut is always be precise despite what kind of encoding was used?
[22:44:29 CET] <kepstin> jookiyaya: i think so, yeah.
[22:44:55 CET] <jookiyaya> then how come with wmv i can cut to the precise (beginning of the video)
[22:45:46 CET] <kepstin> jookiyaya: you can't - you said it only worked to second accuracy. That means the wmv file had a keyframe every second.
[22:46:03 CET] <kepstin> again, just a setting that the person who encoded that file picked
[22:46:32 CET] <jookiyaya> i never heard of such a video encoding setting
[22:47:53 CET] <kepstin> jookiyaya: if you're encoding a video with ffmpeg, you can set the keyframe interval with the '-g' option. Most encoders let you set it.
[22:48:39 CET] <jookiyaya> we know the advantage of choose low number keyframe setting, but what is the advantage
[22:48:45 CET] <jookiyaya> choosing*
[22:49:00 CET] <kepstin> having the keyframes farther apart generally makes a modern video codec more efficient, since it can use more  predicted frames.
[22:49:19 CET] <jookiyaya> farther apart = higher number?
[22:50:08 CET] <kepstin> not sure what you mean. farther apart means that there's one key frame, then lots of non-keyframes before the next keyframe.
[22:50:11 CET] <pzich> fewer overall, spaced further apart
[22:51:19 CET] <jookiyaya> kepstin That means the wmv file had a keyframe every second.    so what is the advantage (for example of using 10 second per keyframe) vs  (1 second per keyframe)
[22:51:33 CET] <furq> 21:49:00 ( kepstin) having the keyframes farther apart generally makes a modern video codec more efficient, since it can use more  predicted frames.
[22:52:01 CET] <jookiyaya> farther apart meaning  higher keyframe number?
[22:52:35 CET] <kepstin> jookiyaya: i don't know what you mean by "higher keyframe number"
[22:52:39 CET] <J_Darnley> Yes!  More frames between each one!
[22:52:42 CET] <kepstin> we just went over what father apart means
[22:52:43 CET] <jookiyaya> 10 is higher number than 1
[22:52:53 CET] <furq> i need to go and lie down
[22:53:26 CET] <kepstin> having 1 keyframe then 10 non-keyframes then 1 keyframe is father apart then 1 keyframe then 5 non-keyframes then 1 keyframe
[22:54:03 CET] <jookiyaya> then why not use like 50 keyframe per second (although it would suck to end videos)
[22:54:13 CET] <jookiyaya> end = edit
[22:54:22 CET] <J_Darnley> Because that is an utter waste of bits
[22:54:28 CET] <furq> my mind is crying
[22:54:51 CET] <kepstin> jookiyaya: having every frame be a keyframe (like 50 keyframes per second) makes editing video really easy, but the video will be really, really big since keyframes are big.
[22:56:13 CET] <jookiyaya> sorry my bad i had it backward
[22:56:34 CET] <jookiyaya> i meant   .1 keyframe per second
[22:56:53 CET] <kepstin> jookiyaya: your mkv file is like that - 1 keyframe every 10 seconds (=0.1 keyframe per second)
[22:57:00 CET] <kepstin> it's probably a fairly common value
[22:57:02 CET] <jookiyaya> right
[22:57:23 CET] <jookiyaya> why not make it .01 keyframe per second then
[22:57:47 CET] <kepstin> jookiyaya: if the keyframes are too far apart, then seeking is really slow, since you can only seek to keyframes.
[22:57:53 CET] <jookiyaya> i see
[22:57:58 CET] <kepstin> so it's a balance.
[22:58:11 CET] <jookiyaya> and editing is hard too
[22:58:41 CET] <kepstin> editing's not too bad, if you're re-encoding. it's just that when you use 'copy' mode, the copy has to start at a keyframe.
[22:59:13 CET] <jookiyaya> how do i tell what keyframe was used for any video
[22:59:29 CET] <kepstin> (when you use -ss while re-encoding, it decodes starting at the previous keyframe, then throws out the decoded frames until it's at the exact right spot, then starts encoding there)
[23:00:05 CET] <godofgrunts> @kepstin so when I try to concat these videos I get spammed with 'Non-monotonous DTS in output stream 0:0' and the video only plays until the beginning of the second video
[23:00:13 CET] <kepstin> jookiyaya: you need to use a video analysis tool to tell. It's not always a constant interval - e.g. x264 will sometimes add extra keyframes if it thinks it needs to.
[23:00:36 CET] <kepstin> jookiyaya: "ffprobe -show_frames" includes a field which says whether each frame is a keyframe or not, for example.
[23:02:15 CET] <jookiyaya> wpp / ctu=64 / min-cu-size=8 / max-tu-size=32 / tu-intra-depth=1 / tu-inter-depth=1 / me=3 / subme=3 / merange=57 / rect / no-amp / max-merge=3 / temporal-mvp / no-early-skip / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / no-fast-intra / open-gop / no-temporal-layers / interlace=0 / keyint=250 / min-keyint=25 / scenecut=40
[23:02:15 CET] <jookiyaya> / rc-lookahead=25 / lookahead-slices=4 / bframes=4 / bframe-bias=0 / b-adapt=2 / ref=4 / limit-refs=3 / limit-modes / weightp / no-weightb / aq-mode=1 / qg-size=32 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=4 / psy-rd=2.00 / rdoq-level=2 / psy-rdoq=1.00 / signhide / deblock / sao / no-sao-non-deblock / b-pyramid / cutree / no-intra-refresh / rc=crf / crf=20.0 / qcomp=0.60 / qpmin=0 /
[23:02:15 CET] <jookiyaya> qpmax=51 / qpstep=4 / ipratio=1.40 / pbratio=1.30
[23:02:27 CET] <jookiyaya> does it show in here?
[23:02:50 CET] <kepstin> jookiyaya: that's a bit of a big paste for irc...
[23:02:53 CET] <J_Darnley> keyint=250 / min-keyint=25
[23:03:15 CET] <jookiyaya> darnley there 2 numbers, which one
[23:03:23 CET] <kepstin> that means that x264 will put at least one keyframe every 250 frames, but no more often than one every 25 frames
[23:03:25 CET] <J_Darnley> fucking read it!
[23:04:13 CET] <furq> kepstin: that's x265
[23:04:24 CET] <furq> although obviously the same applies for x264
[23:04:25 CET] <jookiyaya> furq how did you know?
[23:04:26 CET] <kepstin> ok, sure, but it's almost the same thing
[23:04:38 CET] <jookiyaya> furq how did you know that was 265
[23:05:02 CET] <furq> i guess i must be psychic
[23:05:05 CET] <kepstin> jookiyaya: because he's psychic.
[23:05:09 CET] <furq> see
[23:05:11 CET] <jookiyaya> serious, how did you know that
[23:05:12 CET] <furq> i knew you were going to say that
[23:05:37 CET] <kepstin> jookiyaya: by looking at the options, then going, "huh, those look like options for x265"
[23:05:49 CET] <furq> that's completely wrong. i didn't say "huh"
[23:06:00 CET] <kepstin> ok. but I would have said 'huh'
[23:06:03 CET] <kepstin> :)
[23:06:19 CET] <jookiyaya> so  for  keyint=250 / min-keyint=25  video,   how many seconds increments can i cut off using  -ss
[23:06:24 CET] <furq> i said "jiminy jillickers"
[23:06:41 CET] <kepstin> jookiyaya: you can't tell without analyzing the video to know where the keyframes are.
[23:07:14 CET] <kepstin> jookiyaya: it'll be variable over the course of the video.
[23:07:34 CET] <godofgrunts> @kepstin "Your paste cannot be larger than 64 kb. Sorry." lol
[23:08:06 CET] <kepstin> godofgrunts: ok, just the full command-line then?
[23:08:51 CET] <furq> or use a better pastebin
[23:09:19 CET] <godofgrunts> @kepstin I'm going to cut out a lot of reduant parts since the error message is the same over and over
[23:09:23 CET] <jookiyaya> and also if i do -ss 00:10 -i ouput.mkv   output.mkv video plays fine at least  but if i do  -i ouput.mkv -ss 00:10  the output.mkv video plays weird
[23:10:04 CET] <kepstin> jookiyaya: don't use -ss as an output option when using -c copy.
[23:10:29 CET] <kepstin> if you do that, the video won't start on a keyframe, so it won't decode properly.
[23:10:54 CET] <jookiyaya> right, why even have such an option to do that
[23:11:01 CET] <jookiyaya> ffmpeg should remove that option
[23:11:14 CET] <godofgrunts> @kepstin http://pastebin.com/raw/HMzxSFfB
[23:11:45 CET] <furq> why are there trains when you can get hit by them? we should just walk everywhere
[23:11:54 CET] <godofgrunts> Now where you see the Non-monotonous DTS just imagine about a million more of them
[23:16:22 CET] <kepstin> godofgrunts: huh, not sure how to handle that. if you know the input videos are both constant-framerate, you could try using the -r input option to overwrite the timestamps, i guess.
[23:16:42 CET] <godofgrunts> Okay I'll try that
[23:17:17 CET] <kepstin> and the other option would be to actually re-encode the videos (and use e.g. the concat filter), so you can tweak the timestamps in the filter chain.
[23:19:40 CET] <godofgrunts> @kepstin yeah I'd really like to avoid that for obvious reasons
[23:19:44 CET] <godofgrunts> -r didn't work either
[23:19:58 CET] <kepstin> you could also just output to a format that supports discontinuous pts, like mpeg-ts, rather than use mp4 :)
[23:20:09 CET] <kepstin> (then you're relying on the player to work around the issue tho)
[23:20:26 CET] <kepstin> did you use -r as an input option? (before the -i?)
[23:23:48 CET] <godofgrunts> @kepstin yeah ffmpeg -r 60 -f concat -i mylist.txt -c copy ./finished/crispy.mp4
[23:24:08 CET] <kepstin> but yeah, the way ffmpeg handles timestamps in stream copy mode is kinda problematic, imo. there might be some other tool you can try - I think MP4Box can do concatenation?
[23:24:33 CET] <godofgrunts> @kepstin that's annoying to have to use a different tool, but I'll give it a try
[23:37:01 CET] <beeep1> in order to merge 2 files,  i know you have to use same  video/audio encoder, same  resolution,  but  does it have to have exact same settings
[23:43:29 CET] <kepstin> beeep1: by merge you mean concatenate?
[23:43:39 CET] <beeep1> append
[23:44:03 CET] <kepstin> some variation is acceptable; different bitrate/quality is ok, different fps is usually ok depending on container.
[23:44:57 CET] <beeep1> what about audio bitrate:    what if   1.mkv is using  128kbps  and 2.mkv is using 160kbps   but everything else is same
[23:46:03 CET] <kepstin> beeep1: hmm, audio appending is tricker. you can't do a "gapless" append - there'll be a bit of silence added.
[23:46:12 CET] <kepstin> but different bitrates of the same codec is probably usually ok
[23:47:15 CET] <beeep1> can i use 2 different source and reencode to 1 output.mkv video
[23:47:18 CET] <hyponic> I am restreaming a stream using ffmpeg but the source streams seems to have a quick drop every few minutes. i have script that respawns the connection but the problem is that the clients disconnect. is there a way to get ffmpeg to fill up the gap or keep the client connection while waiting to respawn? the respawn time is about half a second.
[23:48:19 CET] <beeep1> can i use 2 different source and reencode to 1 output.mkv video:    for example  vid1.mkv = 1 hour   vid2.mkv = 30 min   = output.mkv = 90min
[23:48:46 CET] <beeep1> sorry but vid2 is not vid2.mkv  it's vid2.wmv
[23:49:19 CET] <beeep1> with totally different container/video/audio codec
[23:49:21 CET] <kepstin> beeep1: sure. if they're different video codecs in the source files, you'll have to use the "concat" filter and re-encode the output.
[23:50:19 CET] <kepstin> beeep1: could be as simple as "ffmpeg -i vid1.mkv -i vid2.wmv -filter_complex concat=n=2:a=1:v=1 out.mkv"
[23:50:36 CET] <kepstin> haven't tested that, but some variation on it would probably work
[23:50:46 CET] <beeep1> i want to renencode
[00:00:00 CET] --- Tue Mar  8 2016


More information about the Ffmpeg-devel-irc mailing list