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

burek burek021 at gmail.com
Sun Mar 27 03:00:01 CEST 2016


[01:40:23 CET] <deweydb> hey guys, i was wondering if anyone could give me some tips.  i am taking a couple stills from video clips programatically using ffmpeg.  right now i have been just grabbing the frames at % intervals through the video. but often they are kind of blurred with motion.  i was thinking maybe i could somehow only grab the screenshot at the nearest keyframe. is there a way to search for keyframes?
[01:42:45 CET] <furq> deweydb: https://ffmpeg.org/ffmpeg-filters.html#Examples-95
[01:43:09 CET] <deweydb> is an I frame the same thing as a keyframe?
[01:43:15 CET] Action: deweydb is a bit of a video noob
[01:44:23 CET] <furq> it's close enough
[01:46:41 CET] <TD-Linux> for your purposes, you actually want I frames not keyframes
[01:49:10 CET] <deweydb> yeah that worked pretty good. there's still the odd frame thats motion blurred. perhpas i could do some sort of image analysis to check if its a motion blurred frame and discard it.
[01:49:27 CET] <deweydb> ffmpeg -i IMG_0583.MOV -vf "select=eq(pict_type\,I)" -vsync vfr -qscale:v 1 thumbnails-%02d.jpeg
[01:49:31 CET] <deweydb> was what i tried.
[01:51:17 CET] <furq> you can try select='gt(scene\,0.5)' if you only want scene cuts
[01:51:26 CET] <furq> tweak 0.5 as needed
[01:52:45 CET] <deweydb> the input is always one long shot.
[01:53:22 CET] <deweydb> i'm guessing by scene cuts you mean if it is a bunch of clips put together.
[01:53:58 CET] <furq> 0.5 is the fraction of the frame that has to have changed from the previous frame
[01:54:24 CET] <furq> but yeah that doesn't sound like it'll work
[02:00:50 CET] <deweydb> this seems to work pretty good
[02:00:51 CET] <deweydb> https://gist.github.com/shahriman/3289170
[02:01:06 CET] <deweydb> i can just pick out the best ones based on blurextent
[02:59:11 CET] <yongyung> If movies (or, ehem, "films") have 2:35 aspect ratio, why are so many people encoding them in 1920x800 instead of 1920x816? Oo
[02:59:42 CET] <furq> because people are bad
[03:00:14 CET] <furq> that is also my answer for most other questions
[03:01:59 CET] <furq> https://en.wikipedia.org/wiki/Anamorphic_format#2.35.2C_2.39_or_2.40.3F
[03:02:01 CET] <yongyung> I mean that just seems monumentally weird to me. 816 is: divisible by 16 (and 8 obviously), 1920/816 is almost exactly 2.35, and perfectly enough it's even just slightly more (or, slighly less pixels than would be needed) so that even if movies have a not perfectly even cut on the black bars you'll probably still get an even cut out of it
[03:02:11 CET] <furq> maybe it's because of that as well, but that also goes back to my previous answer
[03:02:12 CET] <yongyung> Just seems super weird that people use 1920x800
[03:02:31 CET] <deweydb> yongyung: difference between movies and hdtv
[03:02:56 CET] <deweydb> ohhh wait i see what you are saying now
[03:02:59 CET] <deweydb> yeah, its pretty dumb.
[03:03:21 CET] <deweydb> i guess maybe because most people have 1080p screens
[03:03:28 CET] <deweydb> or 16:9 screens i should say
[03:03:49 CET] <deweydb> not sure what happens when you try to open a 1920/816 video full screen in vlc.
[03:03:56 CET] <deweydb> on a 1080p screen
[03:04:04 CET] <deweydb> does vlc put bars there for you?
[03:04:09 CET] <furq> yes
[03:04:17 CET] <deweydb> heh. well then i guess its just stupidity
[03:04:29 CET] <deweydb> maybe because source video is already at 1080p
[03:04:39 CET] <furq> no i'm pretty sure it's because of that wikipedia link i just pasted
[03:05:30 CET] <yongyung> deweydb: Notice I wrote 1920x800 not 1920x1080
[03:05:30 CET] <deweydb> that is like pure gibberish to me
[03:05:39 CET] <deweydb> that link
[03:05:41 CET] <deweydb> wooosh
[03:05:59 CET] <deweydb> yongyung: i did notice that.
[03:06:16 CET] <deweydb> ohhh wait
[03:06:18 CET] <deweydb> no i didn't
[03:06:18 CET] <deweydb> lol
[03:06:20 CET] <yongyung> furq: So is that link supposed to tell me that modern films are actually shot in 2.39 not 2.35 or?
[03:06:43 CET] <furq> The initial SMPTE definition for anamorphic projection...is 2.3468&:1 which rounded to the commonly used value 2.35:1. A new definition was issued in October 1970 (PH22.106-1971) which specified a slightly smaller vertical dimension of 0.700 in. for the projector aperture...This new projector aperture size, 0.838 × 0.700 inches (21.3 × 17.8 mm), aspect ratio 1.1971&:1, made for an un-squeezed ratio of 2
[03:06:45 CET] <yongyung> If that's the case 1920x800 would make sense
[03:06:49 CET] <furq> .39:1 (and commonly referred to by the rounded value 2.40:1 or 2.4:1).
[03:09:38 CET] <furq> i can't imagine the encoders do anything other than a straight crop
[03:10:05 CET] <furq> unless the scene still mandates mod16
[03:10:35 CET] <furq> which wouldn't surprise me because, as i've mentioned, people are bad
[04:08:29 CET] <brick> so sad, i hope you find one IHAVENONICK
[07:39:33 CET] <deweydb> is this answer correct? http://stackoverflow.com/questions/5930296/adding-repeated-background-audio-with-ffmpeg
[07:39:40 CET] <deweydb> it is not possible to loop audio input stream?
[07:39:51 CET] <deweydb> without using external application?
[13:06:21 CET] <kannan> Hello
[13:07:26 CET] <kannan> do ffmpeg support RTMP feeds ?
[13:08:17 CET] <hpp_> Hi guys. I want to convert .mpg video to .mkv using constant quality 25 (h.264) and opus audio codec 128Kbps. how to do this in console? (windows 10)
[13:10:45 CET] <furq> kannan: yes
[13:11:27 CET] <furq> hpp_: -i src.mpg -c:v libx264 -q:v 25 -c:a libopus -b:a 128k out.mkv
[13:14:48 CET] <kannan> Hi furq, I am trying to sent feed from my Open Broadcast software to ffserver, but getting error :info: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtsp://xx.xx.xx.xx:5454/feed1.ffm...
[13:14:48 CET] <kannan> info: Unknown protocol!
[13:15:20 CET] <furq> that's not an rtmp url
[13:15:30 CET] <furq> also i have no idea if ffserver supports rtmp, it's old and unmaintained
[13:16:16 CET] <furq> if you want to rebroadcast an rtmp stream then you probably want https://github.com/arut/nginx-rtmp-module
[13:17:01 CET] <kannan> ok.. let me check that, thanks
[13:21:59 CET] <Azrael_-> hi
[13:22:47 CET] <Azrael_-> is there a windows-build available which can encode aac? i tried the standard build and it tells me "Unknown encoder 'libfdk_aac'"
[13:23:05 CET] <J_Darnley> "-acodec aac"
[13:23:11 CET] <furq> binaries containing fdk-aac can't be distributed due to licensing issues
[13:23:35 CET] <furq> the builtin encoder is acceptable quality if you have a recent build
[13:23:45 CET] <Azrael_-> k, thx
[14:36:00 CET] <Azrael_-> i try to stream a video to an rtmp-server. on linux the command works fine but on windows with the same command i get this error output: ffmpeg -re -i test264.mp4 -c copy -f flv rtmp://myuser:mypw@somedomain.com:1936/live2/_mystream_  error: Problem accessing the DNS. (addr: live2)  the connection it self works from the windows-machine, verified with openbroadcaster. any ideas how to proceed?
[14:36:53 CET] <Azrael_-> *itself
[14:39:51 CET] <Azrael_-> how can i run it on windows?
[14:53:19 CET] <furq> Azrael_-: change the url to "rtmp://abc.de:1936/live2/streamname pubUser=live2 pubPasswd=mypassword"
[14:53:25 CET] <furq> including the quotes
[14:53:36 CET] <furq> apparently that url format doesn't work on windows
[15:02:34 CET] <Azrael_-> thanks, now the connection seems to start. but now i get this error: RTMP_ReadPacket, failed to read RTMP packet header  this only happens on windows, onlinux it is fine
[15:02:53 CET] <Azrael_-> i'm using the same video-file on both instances
[18:54:13 CET] <andrey_utkin> regarding http://trac.ffmpeg.org/ticket/5380 . I am concat-ing h264 videos of different origins, and what I was trying to achieve is to prepare MP4 files with all extradata duplicated in each keyframe, as it goes in MPEGTS. When I concat MPEGTS (generated from input MP4s), then remux the resulting MPEGTS to MP4, it works fine. So what I'm trying to achieve is to save remuxing to and from MPEGTS. I wonder if it is possible with bitstream filter
[18:56:02 CET] <Dariush> Hi, guys. I'd like some help. I have two videofiles, a.mp4 and b.mp4 . Both are completely valid and play in all videoplayers. I want to concat them. If I make input.txt with only "file 'a.mp4'" in it, the file gets copied as expected. If I do the same with "file 'b.mp4'", ffmpeg dies with "input.txt: Invalid argument". Here is the complete output of both commands: http://pastebin.com/RpuX7BrM Why
[18:56:03 CET] <Dariush>  is this happening?
[18:57:00 CET] <andrey_utkin> Dariush, haha
[18:57:04 CET] <andrey_utkin>  see http://trac.ffmpeg.org/ticket/5380
[18:57:11 CET] <andrey_utkin> have reported just today
[18:57:27 CET] <andrey_utkin> Carl Eugen Hoyos has submitted a patch for it today
[18:57:53 CET] <Dariush> the videos weren't created with ffmpeg, but recorded with OBS
[18:58:25 CET] <Dariush> moreover, with the same OBS version and the same settings on two consecutive days
[19:00:38 CET] <andrey_utkin> Dariush, doesn't matter
[19:00:44 CET] <Dariush> hm, I see it: [mov,mp4,m4a,3gp,3g2,mj2 @ 00000000004acd00] Auto-inserting h264_mp4toannexb bitstream filter
[19:00:46 CET] <andrey_utkin> just apply the patch
[19:00:55 CET] <andrey_utkin> let me find it for you
[19:01:25 CET] <andrey_utkin> Subject: [FFmpeg-devel] [PATCH]lavc/h264_mp4toannexb: Do not fail if frame
[19:10:28 CET] <sagax> hi all
[19:11:17 CET] <sagax> i try set metadata with    -i metadata.txt -map_metadata 1  but not get metadata in output
[19:11:54 CET] <sagax> how to set metadata with text file?
[19:12:57 CET] <sagax> i try this  http://jonhall.info/how_to/dump_and_load_metadata_with_ffmpeg  but this don't working
[19:14:54 CET] <sagax> ok, one moment
[19:16:09 CET] <sagax> http://susepaste.org/86432143
[19:16:53 CET] <sagax> 19 string it's my meta
[19:16:54 CET] <J_Darnley> Well I think you have the right idea.
[19:17:04 CET] <sagax> in input stream
[19:17:20 CET] <sagax> but in output metadata don't have
[19:17:33 CET] <J_Darnley> I don't know whether ffserver will actually output any metadata
[19:17:38 CET] <sagax> and i not see metadata in ffprobe,
[19:18:14 CET] <J_Darnley> Oh, are you looking to get "STREAMTITLE" copied aswell?
[19:18:47 CET] <J_Darnley> I think you need to use somemore advanced specifier for that.
[19:19:24 CET] <sagax> i paste, one moment,
[19:20:29 CET] <sagax> http://susepaste.org/55728568
[19:20:48 CET] <sagax> :D
[19:21:39 CET] <J_Darnley> You can read about how you might do it by reading the map_metadata help here http://ffmpeg.org/ffmpeg.html
[19:22:05 CET] <sagax> ok, try read more, thanks
[19:22:11 CET] <J_Darnley> Since you're outputting ogg then I think I recall that you do need stream-based metadata
[21:03:55 CET] <deweydb> is this answer correct? http://stackoverflow.com/questions/5930296/adding-repeated-background-audio-with-ffmpeg
[21:04:01 CET] <deweydb> it is not possible to loop audio input stream?
[21:04:05 CET] <deweydb> without using external application?
[21:14:54 CET] <llogan> deweydb: that's an old answer. try -stream_loop input option.
[21:15:41 CET] <deweydb> ok i just don't quite get where to add -stream_loop so it applies to only the audio but not the video
[21:15:46 CET] <deweydb> say my blend command is: ffmpeg -i songs/short.mp3 -i 1459022124-output-no-audio.mp4 -c:v copy -c:a aac -strict experimental 1459022124-output.mp4
[21:16:09 CET] <deweydb> where do i put -stream_loop ?
[21:16:17 CET] <llogan> before the first -i
[21:16:26 CET] <llogan> so it applies to that input
[21:16:48 CET] <llogan> -strict experimental is no longer needed
[21:17:29 CET] <deweydb> Unrecognized option 'stream_loop'
[21:17:32 CET] <deweydb> ma¥be i'm outdated
[21:18:25 CET] <deweydb> http://pastie.org/10774746
[21:18:50 CET] <llogan> "Sorry, there is no pastie #10774746 or it has been removed."
[21:19:53 CET] <deweydb> weird
[21:20:08 CET] <deweydb> pastie glitchin out
[21:20:31 CET] <deweydb> http://pastebin.com/Um8xrfF6
[21:21:06 CET] <llogan> the 2.8 release branch is probably too old for stream_loop
[21:21:51 CET] <llogan> download a build from here: http://evermeet.cx/ffmpeg/ get the snapshot, not the release
[21:24:49 CET] <deweydb> that worked but it looks like we proved the SO thread was correct
[21:24:50 CET] <deweydb> http://pastebin.com/gBPw3yR0
[21:25:15 CET] <deweydb> "cannot be applied to output file songs/short.mp3"
[21:25:23 CET] <llogan> you need to give it a value
[21:25:30 CET] <llogan> http://ffmpeg.org/ffmpeg.html
[21:25:41 CET] <llogan> search for stream_loop
[21:26:50 CET] <durandal_1707> if that doesn't work use loop filters
[21:27:26 CET] <llogan> IIRC, some users had trouble with stream_loop. i can't recall any details though.
[21:27:54 CET] <deweydb> it stopped giving me errors but just doesn't actually loop. lol.
[21:28:16 CET] <llogan> try the loop filter instead http://ffmpeg.org/ffmpeg-filters.html#loop_002c-aloop
[21:37:23 CET] <mrmenacex> When making a DASH Manifest file with ffmpeg should that take a long time ?
[21:44:28 CET] <mrmenacex> Ok another question when doing DASH playback does the audio track have to be separate ?
[21:50:04 CET] <colde> mrmenacex: i don't believe it is stricktly required, but pretty much everybody does it that way, so you might find some clients can't handle them if they arent seperate
[21:52:06 CET] <mrmenacex> colde: ok i'll try encoding just the audio and making another file. Thanks
[21:56:52 CET] <colde> mrmenacex: well, depending on your workflow, you can encode them both and then split them later
[21:57:03 CET] <colde> Some mpeg-dash segmenters ville also split it out from one input file
[21:57:27 CET] <mrmenacex>  colde: oh i forgot to say i'm using webm and the vp9 codec
[21:58:01 CET] <mrmenacex> although i do want to do the same with h264
[21:58:25 CET] <mrmenacex> no browsers support h265 yet ?
[22:08:28 CET] <colde> Not afaik.
[22:42:00 CET] <_Timon> I have a ton of mp4 files here who dont work inside my video editing programs and dont work when playing them back on my pi with xbmc installed on it. Here's the video specs http://pastebin.com/PKx8Szfd
[22:42:23 CET] <_Timon> What would be a more open codec/format what works on most devices that I can convert to with ffmpeg?
[22:43:06 CET] <_Timon> These files do work when playing them back on my pc with vlc ofcurse
[22:45:18 CET] <_Timon> This is the closest irc channel I know related to encoding things...
[22:50:05 CET] <Mavrik> Your pixel format is causing the issues.
[22:50:30 CET] <Mavrik> Only YUV 4:2:0 must be supported by H.264 players, while your video is 4:2:"
[22:50:34 CET] <Mavrik> *4:2:"
[22:50:37 CET] <Mavrik> eh... 4:2:2
[22:51:08 CET] <_Timon> I thought most modern playback devices could scale video?
[22:51:46 CET] <Mavrik> Scale?
[22:52:06 CET] <_Timon> nvm
[22:52:09 CET] <Mavrik> It's not about the size.
[22:52:14 CET] <_Timon> can I encode it to a different pixel format?
[22:52:22 CET] <Mavrik> It's about the hardware decoding chip not supporting the pixel format.
[22:52:29 CET] <Mavrik> Yep, add -pix_fmt yuv420p
[22:52:52 CET] <_Timon> I'll try, thanks
[23:04:34 CET] <llogan> _Timon: don't forget to stream copy the audio so you don't have to re-encode it: -c:a copy
[23:05:07 CET] <_Timon> ill add that in the next batch :)
[23:05:15 CET] <llogan> are these from VHS tapes?
[23:05:23 CET] <_Timon> even older
[23:05:58 CET] <llogan> interlaced?
[23:06:03 CET] <_Timon> well, I think they fall under the vhs category
[23:06:09 CET] <_Timon> but they're not these original large tapes
[23:06:30 CET] <_Timon> p5 90mp 8mm
[23:06:43 CET] <_Timon> casettes
[23:07:01 CET] <llogan> Hi8
[23:07:16 CET] <_Timon> yep
[23:07:23 CET] <llogan> you may want to deinterlace, maybe also denoise a little
[23:07:59 CET] <_Timon> yes, they're quite heavily interlaced when looking at them
[23:08:00 CET] <_Timon> is that fixable?
[23:08:05 CET] <llogan> sure
[23:08:21 CET] <Mavrik> Enable deinterlacer in player or deinterlace video when encoding :)
[23:09:28 CET] <llogan> also, is there a weird discolored 7-10 pixel band on the bottom of the video?
[23:09:58 CET] <Mavrik> Teletext? :P
[23:10:12 CET] <_Timon> lol yep[
[23:10:14 CET] <_Timon> but I cut that out
[23:10:16 CET] <llogan> head switching noise
[23:10:27 CET] <_Timon> which is why I had the strange resolution
[23:10:33 CET] <llogan> i usually just cover it
[23:10:54 CET] <_Timon> This is my ffmpeg line when capturing
[23:10:56 CET] <_Timon> ffmpeg -f dshow -i video="SMI Grabber Device":audio="Line In (Realtek High Definitio" -ac 1 -filter:v "crop=699:558:7:9" 1.mp4
[23:11:04 CET] <_Timon> if it interested you
[23:11:32 CET] <_Timon> could I add that -pix_fmt yub420p during the capture?
[23:11:37 CET] <Mavrik> probably wanna set quality settings for audio an dvideo.
[23:11:41 CET] <llogan> vf "yadif=1:1,hqdn3d=2,drawbox=w=iw:h=10:y=ih-h:t=max,format=yuv420p" will deinterlace, apply some denoise, cover the noise, and deal with pixel format
[23:11:42 CET] <Mavrik> bitrate and whatnot
[23:12:05 CET] <_Timon> the file sizes are 'okay' atm
[23:12:13 CET] <_Timon> about a gb per 60 minutes
[23:13:05 CET] <llogan> i just put "2" there in denoise as an example, but i'm not sure if that's valid, so of course you'll want to tweak the values i put in the filters
[23:13:16 CET] <_Timon> I'll do another transcode with that added logan
[23:14:21 CET] <llogan> you may also want to compare yadif with other deinterlacers: w3fdif and bwdif. i haven't tried those yet.
[23:16:41 CET] <_Timon> I'm not quite able to use your line logan
[23:16:49 CET] <_Timon> does "vf" need to be included?
[23:17:04 CET] <_Timon> doesnt seem like an ffmpeg suffix as far as I know
[23:17:27 CET] <llogan> -vf is the same as -filter:v
[23:17:33 CET] <_Timon> ah "-vf"
[23:17:49 CET] <_Timon> yup my fault
[23:19:31 CET] <_Timon> it's currently ~3450kbit/s
[23:19:39 CET] <_Timon> I dont think it needs that much
[23:20:23 CET] <llogan> it will use -crf 23 by default when encoding with libx264. you can increase the value to get fewer bits
[23:20:44 CET] <_Timon> any value you recommend for these type of tapes?
[23:21:03 CET] <llogan> use the highest value that still gives an acceptable quality.
[23:21:06 CET] <Mavrik> _Timon, is it actuall 3.5Mbit on output?
[23:21:12 CET] <_Timon> yep
[23:21:16 CET] <Mavrik> Because crf 23 really shouldn't be that high on SD content :/
[23:21:24 CET] <_Timon> http://i.imgur.com/YvK2PKA.png
[23:21:40 CET] <llogan> probably lots of noise
[23:21:57 CET] <llogan> these old tapes are falling apart (i mean all of them in general)
[23:22:04 CET] <_Timon> yep
[23:22:08 CET] <_Timon> bad stuff
[23:23:17 CET] <Mavrik> Ah, yeah
[23:23:22 CET] <llogan> if you have another deck or player it may be able to play the tape better. some are just better at time base correction
[23:24:02 CET] <_Timon> I'm not looking for the best of the best
[23:24:18 CET] <llogan> home videos of your beagle?
[23:24:38 CET] <_Timon> lol no
[23:25:08 CET] <llogan> it may be worth cleaning the head and guides on the player
[23:26:02 CET] <llogan> and watch for mold in the tape itself. you can see it through the clear plastic. white fuzz. it can inoculate the others if you play it
[23:26:55 CET] <_Timon> "-deinterlace" would work?
[23:27:01 CET] <_Timon> or do I need something specific
[23:27:28 CET] <llogan> does that still exist? i think that maps to yadif. i prefer to keep all filtering confined to the filtergraph
[23:27:51 CET] <llogan> so i can more easily apply the filters in the order i want
[23:27:57 CET] <_Timon> yep seems to be working
[23:28:05 CET] <_Timon> ok, now ill add the -crf
[23:29:27 CET] <_Timon> crf 23 ~2700kbps
[23:29:53 CET] <_Timon> somewhat better
[23:30:34 CET] <_Timon> could I do all these filters in real time or do I need to transcode afterwards?
[23:30:53 CET] <Mavrik> What do you mean?
[23:31:09 CET] <Mavrik> If you added the filter to commandline they're already applied.
[23:36:05 CET] <_Timon> yeah I'll just digitalise them first and apply filters afterwards
[23:36:09 CET] <_Timon> otherwise im dropping frames
[23:37:00 CET] <llogan> sounds like you're going to be performing two lossy encodes?
[23:37:41 CET] <_Timon> I guess?
[23:39:01 CET] <Mavrik> might wanna do losless capture then :)
[23:39:35 CET] <_Timon> nvm it seems like my i7 is managing it
[23:40:44 CET] <J_Darnley> POWAH!
[23:40:49 CET] <_Timon> ffmpeg -f dshow -i video="SMI Grabber Device":audio="Line In (Realtek High Definitio" -ac 1 -filter:v "crop=699:558:7:9,yadif=1:1,hqdn3d=2,format=yuv420p" -crf 23 test.mp4
[23:40:57 CET] <_Timon> delivers a quite shaky output...?
[23:41:07 CET] <llogan> J_Darnley: don't forget to press the "Turbo" button.
[23:41:19 CET] <J_Darnley> :)
[23:41:51 CET] <llogan> _Timon: shaky?
[23:42:11 CET] <_Timon> going to test on another part of the tape, then ill confirm
[23:45:12 CET] <_Timon> 4800 kbps?
[23:46:03 CET] <_Timon> im removing the denoising etc see if that changes it
[23:47:15 CET] <_Timon> bitrate went down, thats good
[00:00:00 CET] --- Sun Mar 27 2016


More information about the Ffmpeg-devel-irc mailing list