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

burek burek021 at gmail.com
Thu Mar 31 02:05:01 CEST 2016


[01:15:09 CEST] <jackhold> i am trying to make a timelapse from a mix of png and jpg files, first i converted the png filed with mogrify and then i ran the command "ffmpeg -r 20 -i %*.jpg -r 20 -s hd720 vcodec libx264 /indput" but i get this error "mjpeg: unsupported coding type (c8)" and the filed i just converted dosent get added to the .mp4 file... any1 that can give me a hand here??
[01:23:48 CEST] <jackhold> okay just gonner take 1min
[01:32:35 CEST] <jackhold> here if the command i use and the output i get from it
[01:32:36 CEST] <jackhold> http://pastebin.com/hNmq5aGG
[01:35:41 CEST] <llogan> you images change from yuvj422p to yuvj420p. i'm not sure how ffmpeg will handle that. possibly by skipping frames.
[01:36:19 CEST] <llogan> change the input -r to -framerate and remove the output -r since with the same value it does nothing
[01:37:24 CEST] <llogan> remove -s hd720 because your inputs are already 1280x720. add "-pix_fmt yuv420p" as an output option if you want non-FFmpeg based players to be able to play the output file
[01:38:33 CEST] <jackhold> thx llogan im gonner give that a try and see what happens
[01:38:38 CEST] <jackhold> :)
[01:38:41 CEST] <llogan> change "-i %*.jpg" to: -pattern_type glob -i "*.jpg"
[01:45:47 CEST] <jackhold> im still getting the error's after i did those changes
[01:46:03 CEST] <ac_slater> Is there a way to tell how much time muxing takes? I guess I want to know how long reading input, encoding, and muxing is taking. Any clues?
[01:46:28 CEST] <llogan> jackhold: you may have to find out which image(s) is the culprit
[01:49:06 CEST] <jackhold> i allready know :) i converted some pictures from png to jpg and that's the ones that is failing
[01:49:51 CEST] <jackhold> there was no error's when i did the converting and i can see them no problem
[01:50:26 CEST] <xreal> What's the best way to turn 1080p with 50 fps down to 720p with 25 fps? -vf "scale=1280:-1; fps=fps=50"
[01:50:54 CEST] <xreal> or -r 25 -s hd720 ?
[01:51:25 CEST] <llogan> jackhold: can ffmpeg decode one of those single jpg images from mogrify correctly? ffmpeg -i input.jpg -f null -
[01:53:23 CEST] <ac_slater> xreal: I've used this with success http://superuser.com/a/573753
[01:53:37 CEST] <ac_slater> (for frame skip)
[01:54:00 CEST] <ac_slater> -r is for reading the input at a certain rate, which doesn't mean skip frames
[01:54:23 CEST] <xreal> ac_slater: thx
[01:56:27 CEST] <jackhold> llogan: yep that workes....
[01:58:25 CEST] <llogan> i'll blame the 422 vs 420 difference
[02:00:53 CEST] <jackhold> thx for the help im gonner try to find a workaround then thx for the help
[02:02:03 CEST] <llogan> you could probably tell mogrify to output the same chroma subsampling values as the other images. or have ffmpeg convert the png
[02:03:34 CEST] <xreal> ac_slater: Hmm, this doesn't work with audio, does it?
[02:05:18 CEST] <ac_slater> xreal: ah, no sorry
[02:05:29 CEST] <ac_slater> well
[02:06:00 CEST] <ac_slater> xreal: just half of the video frames are skipped, the length is still the same
[02:06:06 CEST] <ac_slater> xreal: meaning, the audio should still be in sync
[02:06:19 CEST] <ac_slater> have you tried `-acodec copy` ?
[02:06:27 CEST] <xreal> ac_slater: good idea, let me try.
[02:06:49 CEST] <ac_slater> (I don't use audio much so I don't know if there should be more than that)
[03:47:17 CEST] <Zeranoe> Trying to pipe a yuv420p to ffmpeg but I cannot get it to work with 'ffmpeg -pix_fmt yuv420p -s 1920x1080 -loglevel debug -i -'. What options are needed before -i - ?
[03:51:38 CEST] <kepstin> Zeranoe: you're sending it raw yuv420p video frames?
[03:51:44 CEST] <kepstin> then you need '-f rawvideo'
[03:52:48 CEST] <kepstin> (and you'll also want to use -video_size 1920x1080 -pixel_format yuv420p -framerate 24 or whatever)
[03:53:29 CEST] <relaxed> yuv4mpegpipe would work too
[03:53:51 CEST] <relaxed> if that's an option
[03:53:54 CEST] <kepstin> if you can make the source output that format, sure.
[04:25:36 CEST] <sethn> Im trying to use ffmpeg via pyav. Id like to write out lossless video, but I cant figure out the name of the ffv1 codec
[04:25:51 CEST] <sethn> Was this included in ffmpeg 2.8?
[04:26:15 CEST] <J_Darnley> It has existed for a long time before 2.8
[04:26:37 CEST] <J_Darnley> and it's name to ffmpeg/libavcodec is "ffv1"
[04:26:42 CEST] <kepstin> it can be disabled at build-time, of course, but most builds should have it because it's on by default.
[04:26:50 CEST] <sethn> weird
[04:26:57 CEST] <sethn> And it should work with the matroska container, right?
[04:27:03 CEST] <J_Darnley> yes
[04:27:21 CEST] <sethn> Is there a way from the command line to list all video codecs?
[04:27:27 CEST] <J_Darnley> ffmpeg -codecs
[04:28:03 CEST] <sethn> oh, duh :-P
[04:28:11 CEST] <sethn> So my ffmpeg command line shows ffv1
[04:28:25 CEST] <sethn> Sorry, this is PyAV, I dont know how directly it translates
[04:28:28 CEST] <sethn> But when I try to do
[04:28:57 CEST] <sethn> output = av.open(filename, w, matroska)
[04:29:10 CEST] <sethn> stream = output.add_stream(ffv1, fps)
[04:29:28 CEST] <sethn> It complains that codec ffv1 cant be found associated with the matroska container
[04:29:45 CEST] <sethn> (Ive tried with mpeg4 container too)
[04:30:17 CEST] <ac_slater> sethn: can you make an ffmpeg command line for what you're doing?
[04:30:31 CEST] <J_Darnley> isobmff AKA mp4 won't support it
[04:30:35 CEST] <ac_slater> ie - if it doesn't work there, then maybe there are other issues
[04:30:36 CEST] <J_Darnley> I wonder whether that message is coming from your/this wrapper
[04:30:38 CEST] <sethn> ac_slater: Im outputting an array I generated in code
[04:30:57 CEST] <ac_slater> sethn: does that map to an ffmpeg command line?
[04:31:08 CEST] <sethn> ac_slater: I dont think so?
[04:31:14 CEST] <sethn> I can use the ffv1 codec
[04:31:27 CEST] <sethn> J_Darnley: what container would you suggest?
[04:31:33 CEST] <J_Darnley> matroska
[04:31:38 CEST] <ac_slater> ffmpeg -i xxx -vcodec ffv1 -f matroska ....
[04:31:44 CEST] <J_Darnley> My suggestion: write to stdout and have ffmpeg encode it from there.
[04:31:46 CEST] <sethn> ac_slater: yeah, I can do that
[04:32:01 CEST] <ac_slater> is pyav linked against your system version of ffmpeg?
[04:32:09 CEST] <sethn> J_Darnley: What should I use to write out uncompressed video?
[04:32:13 CEST] <sethn> ac_slater: yeah
[04:32:26 CEST] <sethn> Im actually happy to use any uncompressed codec
[04:32:29 CEST] <J_Darnley> NFI.  You're the one using python rubbish
[04:32:30 CEST] <sethn> Im just ignorant about codecs
[04:32:33 CEST] <ac_slater> then it would at least show you what ffmpeg can actually do without having to debug the wrapper
[04:32:49 CEST] <sethn> J_Darnley: oh, I meant, what encoding?
[04:33:08 CEST] <ac_slater> sethn: you want uncompressed video in a container?
[04:33:12 CEST] <J_Darnley> None.  Dump the raw bytes
[04:33:28 CEST] <J_Darnley> Well, the raw pixels
[04:33:45 CEST] <sethn> gotcha, just write out the YUV420p pixels directly
[04:34:38 CEST] <sethn> Is there another lossless codec I could try? I just dont know whats a reasonable choice. I really dont care what codec I use as long as its lossless.
[04:34:46 CEST] <J_Darnley> libx264
[04:34:49 CEST] <J_Darnley> rawvideo
[04:34:55 CEST] <J_Darnley> huffyuv
[04:35:00 CEST] <ac_slater> sethn: huffyuv
[04:35:02 CEST] <ac_slater> yea
[04:35:12 CEST] <ac_slater> x264 doesnt have a lossless mode, does it?
[04:35:20 CEST] <kepstin> it does, use '-qp 0'
[04:35:23 CEST] <ac_slater> ah yea
[04:35:33 CEST] <ac_slater> what profile does this depend on?
[04:35:35 CEST] <ac_slater> if any
[04:35:41 CEST] <kepstin> high444
[04:35:46 CEST] <sethn> ac_slater: Is there a container that huffyuv is commonly paired with?
[04:35:51 CEST] <sethn> I really appreciate this guys
[04:35:57 CEST] <sethn> I just dont know a lot about media formats
[04:36:16 CEST] <ac_slater> sethn: ya know, I would do libx264 with high444 profile with -qp 0 (as said above), and put it in an MKV or MPEGTS container
[04:36:23 CEST] <sethn> sweet :)
[04:36:30 CEST] <ac_slater> but kepstin and others know more
[04:36:58 CEST] <kepstin> (you obviously don't need to manually set any profile settings with x264 to encode lossless, just say '-qp 0' and let it go)
[04:36:59 CEST] <ac_slater> hell, even MP4 I guess
[04:40:33 CEST] <sethn> Is -qp shorthand for something? Im having trouble finding docs on -qp& trying to translate this from command-line commands to C api
[04:40:55 CEST] <J_Darnley> He means -cqp
[04:41:17 CEST] <sethn> tnx
[04:41:27 CEST] <J_Darnley> and it stands for constnat quantiser something-or-other
[04:41:34 CEST] <ac_slater> sethn: Quantization Parameter
[04:41:47 CEST] <ac_slater> sethn: http://www.pixeltools.com/rate_control_paper.html#qua
[04:42:08 CEST] <sethn> ah, got it
[04:42:29 CEST] <kepstin> no, I mean literally "-qp"
[04:42:40 CEST] <J_Darnley> ffmpeg does not have one
[04:42:40 CEST] <kepstin> it's a libx264-specific avoption, iirc
[04:42:53 CEST] <ac_slater> kepstin: it looks like a codec generic option
[04:42:55 CEST] <ac_slater> https://www.ffmpeg.org/ffmpeg-codecs.html#Codec-Options
[04:43:17 CEST] <kepstin> shows up in the libx264 avoptions on 'ffmpeg -h encoder=libx264' :/
[04:43:33 CEST] <kepstin> but i guess that includes generic ones too?
[04:43:45 CEST] <c_14> It's libx264 specific as well
[04:43:54 CEST] <J_Darnley> Then who's been chaning this shit again
[04:46:07 CEST] <c_14> I actually can't find it listed as a generic option.
[04:46:40 CEST] <J_Darnley> Meh, kepstin's probably right
[04:46:44 CEST] <ac_slater> c_14: that link above codec options
[04:46:46 CEST] <ac_slater> it's in there
[04:46:54 CEST] <c_14> That's only -debug qp
[04:46:58 CEST] <c_14> and -qphist
[04:47:06 CEST] <J_Darnley> I just stick with things that worked 8 years ago.
[04:47:14 CEST] <ac_slater> oh right, it's under debug
[04:47:16 CEST] <ac_slater> my bad
[05:01:08 CEST] <petecouture> Does anyone have any good links to understand correct use of force_key_frames
[05:04:07 CEST] <ac_slater> petecouture: for vpx?
[05:04:41 CEST] <petecouture> hls
[05:05:16 CEST] <ac_slater> what codec
[05:06:01 CEST] <petecouture> libx264
[05:06:54 CEST] <ac_slater> petecouture: I usually set the GOPSIZE and keyint (min-keyint) to firce IDR (IFrame) rate
[05:08:04 CEST] <petecouture> I'll look a it
[05:08:15 CEST] <ac_slater> your goal is to control the rate of key frames?
[05:08:18 CEST] <ac_slater> petecouture: ^
[05:09:02 CEST] <petecouture> I'm a bit new to ffmpeg and coming from Wowza and hardware encoders where you have to set the keyframe rate to be divisble by the segment rate
[05:09:14 CEST] <ac_slater> petecouture: I see
[05:10:01 CEST] <ac_slater> it's pretty easy to customize the bitstream with libx264 and its options in ffmpeg
[05:10:54 CEST] <petecouture> I have a live rtp stream being segmented to hls.
[05:11:08 CEST] <petecouture> There's issues like sudden bandwidth droppage
[05:11:23 CEST] <ac_slater> I'm completely unfamiliar with HLS, but I know a bit about RTP and h264
[05:11:25 CEST] <petecouture> Also the sometimes the encoding just stops processing frames
[05:12:00 CEST] <ac_slater> you should get your bitstream where you want it first ... intrarefresh rate, annex B, rate, etc.
[05:12:11 CEST] <petecouture> sec I'll put up my script
[05:12:27 CEST] <petecouture> intrarefresh rate and annex B are new terms to me
[05:13:12 CEST] <ac_slater> you may need them, maybe not depending on the actual goal
[05:15:15 CEST] <petecouture> Thank you I'll look at them. It's mostly working but native apple player doen't like it. Also injected id3 frame metadata isn't firing, that was a week of wasted time.
[05:15:34 CEST] <petecouture> Plays in jwplayer and hls.js
[05:15:47 CEST] <ac_slater> that's a good start
[05:15:52 CEST] <ac_slater> ;)
[05:16:44 CEST] <petecouture> I oriignaly built this in wowza using rtmp to hls which was easy. Now I gotta do it using webrtc client to rtp to ffmpeg->hls. Been a long 2 months of hard R&D
[05:16:47 CEST] <ac_slater> petecouture: I see some references about annex B in apples HLS documentation
[05:16:55 CEST] <petecouture> ahhhh
[05:17:05 CEST] <petecouture> Thank you!
[05:17:12 CEST] <ac_slater> just a hunch
[05:17:53 CEST] <ac_slater> ffmpeg has a bitstream filter for h264_mp4toannexb
[05:18:05 CEST] <ac_slater> should be easy to find an example on the official docs
[05:18:14 CEST] <ac_slater> https://ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmp4toannexb
[05:18:56 CEST] <petecouture> ahhhh
[09:35:51 CEST] <sspiff> Hi
[09:36:13 CEST] <sspiff> I was wondering if it is possible to generate interlaced H264 MPEG TSes with ffmpeg, and if so, how?
[09:36:43 CEST] <Mavrik> Do you have an interlaced source?
[09:37:44 CEST] <sspiff> Mavrik: yes
[09:37:58 CEST] <Mavrik> Well, then the output will be interlaced as well.
[09:38:05 CEST] <Mavrik> As long as you don't explicitly deinterlace it.
[09:39:53 CEST] <sagax> hi all! where i find mime/type for html5 audio stream?
[09:43:41 CEST] <sspiff> Mavrik: how do I explicitely deinterlace it? I don't see a filter for that.
[09:44:25 CEST] <sspiff> And if I use the interlace video filter, would that generate interlaced video or would the result just contain progressive frames all the time, but look like they're interlaced?
[10:01:56 CEST] <DHE> sspiff: if you need to force interlaced output, -flags ildct   with libx264 should do it
[10:02:10 CEST] <DHE> eg: the source material doesn't have any interlacing information in the codec
[10:03:34 CEST] <DHE> the interlace filter converts progressive into interlaced content by actually modifying the images and reducing the framerate. wouldn't be my first choice
[10:42:58 CEST] <sspiff> DHE: thanks, I'll try
[10:50:51 CEST] <sspiff> DHE: that did it! But I don't understand what it does :)
[10:52:04 CEST] <sspiff> the source is MPEG2, and when I open the stream in an analyzer it clearly marks top and bottom fields etc.
[12:19:01 CEST] <raehik> Hiya, I'm trying to trim an audio file 1 second from the start and 1 second from the end. I know about -ss, -t and -to but I can't figure out how trim up to the -1 second i.e. 1 second before EOF.
[12:19:30 CEST] <raehik> Trying cmds like this: ffmpeg -ss 1 -i infile.wav -to -1 outfile.wav
[12:20:12 CEST] <raehik> but FFmpeg complains that -to is smaller than -ss, so I guess it doesn't take values relative to EOF
[12:21:04 CEST] <c_14> you can't (without scripting or patching ffmpeg)
[12:21:12 CEST] <c_14> or using the libraries I guess
[12:21:23 CEST] <raehik> huh, that's a pain
[12:21:31 CEST] <raehik> I know I can use SoX but I prefer FFmpeg for most things
[12:22:07 CEST] <raehik> ok, that's fine. Cheers for the help
[12:29:29 CEST] <sagax> hi all,
[12:30:07 CEST] <sagax> i compiling all codec was i need and ffmpeg and i get normal ffmpeg workspace, great
[12:30:28 CEST] <sagax> got*
[14:55:39 CEST] <mr_pinc> Does the  -crf command line option support decimal values?
[14:56:16 CEST] <J_Darnley> yes
[14:56:17 CEST] <furq> yes
[14:58:00 CEST] <mr_pinc> great thanks
[15:03:00 CEST] <mr_pinc> Well this is super useful - http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
[15:22:00 CEST] <brm> hi, ffmpeg -s 352x288 -r 30 -f x11grab -i :0 -f alsa -i hw:0 http://localhost:8090/feed1.ffm
[15:22:01 CEST] <brm> but Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
[15:22:14 CEST] <brm> and output to file works..
[15:22:31 CEST] <brm> please help.
[15:24:13 CEST] <J_Darnley> mr_pinc: a better source is: ffmpeg -h and ffmpeg -h full
[15:24:18 CEST] <J_Darnley> it even has type information
[15:25:45 CEST] <brm> J_Darnley https://bpaste.net/show/0d07dde4c3d1
[15:26:41 CEST] <J_Darnley> Try reading the actual errors
[15:26:57 CEST] <J_Darnley> They are are highlighted in red for a reason.
[15:27:16 CEST] <brm> Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height
[15:27:21 CEST] Action: J_Darnley wonders why he ever bothered adding that
[15:27:26 CEST] <J_Darnley> OMFG!
[15:27:31 CEST] <brm> but it error occur only when adding audio
[15:27:34 CEST] <J_Darnley> [mpeg1video @ 0x2226ca0] bitrate tolerance 21333 too small for bitrate 64000, overriding
[15:27:34 CEST] <J_Darnley> [mpeg1video @ 0x2226ca0] too many threads/slices (9), reducing to 8
[15:27:34 CEST] <J_Darnley> [mpeg1video @ 0x2226ca0] MPEG1/2 does not support 3/1 fps
[15:27:55 CEST] <brm> aaaaaaa.....
[15:29:19 CEST] <brm> how audio can affect fps
[15:31:24 CEST] <J_Darnley> No idea.
[15:31:39 CEST] <brm> how corrent this error..
[15:31:43 CEST] <brm> corerct*
[15:31:50 CEST] <J_Darnley> No idea.
[15:32:13 CEST] <J_Darnley> You require Arcane Knowledge to use ffserver
[15:41:37 CEST] <__z0k__> ls
[15:51:15 CEST] <brm> J_Darnley what can u advice to stream screen to dlna
[15:55:56 CEST] <debianuser> brm: does adding "-t flv" between "-i hw:0" and  "http://localhost:8090/feed1.ffm" changes anything?
[15:56:27 CEST] Action: debianuser doesn't know much about ffserver...
[15:57:43 CEST] <brm> but what u use ?
[15:57:55 CEST] <brm> Invalid duration specification for t: flv
[15:58:21 CEST] <brm> but works without it, but i cannot show this stream, also in swf
[15:58:31 CEST] <brm> but errors not occur..
[15:59:26 CEST] <brm> i can`t google another tool, except ffmpeg
[16:07:28 CEST] <J_Darnley> -t is a duration
[16:07:35 CEST] <J_Darnley> perhaps he meant: -f flv
[16:07:47 CEST] <J_Darnley> my suggestion about streaming: don't
[16:08:12 CEST] <durandal_170> don't use ffserver
[16:08:41 CEST] <debianuser> brm: Ah, right "-f flv", sorry :(
[16:09:02 CEST] <debianuser> What's the suggested ffserver replacement these days?
[16:12:54 CEST] <brm> dont use ffserver, but what use?
[16:13:36 CEST] <brm> https://bpaste.net/show/e71032cc89d1
[16:19:22 CEST] Action: debianuser guesses the problem is "Connection to tcp://localhost:8090 failed (Connection refused), trying next address", i.e. something that was supposed to listen to localhost:8090 is not running.
[16:27:00 CEST] <brm> debianuser https://bpaste.net/show/ff3a78eb7963
[16:37:33 CEST] <debianuser> brm: "av_interleaved_write_frame(): Connection reset by peer" -- it still drops the connection. Maybe it doesn't like flv? And google suggests it without flv either... Does it work if you write it to the local mpg file? Try `ffmpeg -s 640x480 -r 25 -f x11grab -i :0 -f alsa -i hw:0 -f mpeg testfile.mpg`
[16:39:52 CEST] <brm> debianuser ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0 -f flv file.swf
[16:39:55 CEST] <brm> it works..
[16:39:59 CEST] <brm> problem with ffserver
[16:44:03 CEST] <debianuser> No, I mean test both `ffmpeg -s 640x480 -r 25 -f x11grab -i :0 -f alsa -i hw:0 testfile.mpg` and `ffmpeg -s 640x480 -r 25 -f x11grab -i :0 -f alsa -i hw:0 http://127.0.0.1:8090/feed1.ffm`, same command line, with target url/file being the only difference. What's the difference in output then?
[16:45:07 CEST] <mr_pinc> J_Darnley: Yes but that is not an easy to reference webpage
[16:45:25 CEST] <brm> debianuser https://bpaste.net/show/3d3751c07aab
[16:45:44 CEST] <brm> and at ffserver.conf format mpeg
[16:45:53 CEST] <brm> how option need set that it works...
[16:48:01 CEST] <debianuser> [tcp @ 0x25f2440] Connection to tcp://localhost:8090 failed (Connection refused), trying next address
[16:48:15 CEST] <debianuser> It's either not running or not listening to port 8090
[16:49:47 CEST] <brm> it running..
[16:50:21 CEST] <brm> https://bpaste.net/show/bda5ca94b67d
[16:51:06 CEST] <debianuser> what does `echo -n | telnet localhost 8090` say?
[16:51:41 CEST] <debianuser> (by the way, "NoAudio"?)
[16:53:00 CEST] <brm> v
[16:53:01 CEST] <brm> http://pastebin.com/DwK6EPHT
[16:53:25 CEST] <brm> NoAudio .. for simplify
[17:02:45 CEST] <debianuser> brm: telnet looks working. Then maybe it's about ffserver setup? I'm not sure if you can have both AudioBitRate/AudioChannels/AudioSampleRate and NoAudio in the same section, maybe you need to comment out one of them?
[19:15:27 CEST] <fritsch> Hi
[19:15:34 CEST] <fritsch> how to force: https://github.com/FFmpeg/FFmpeg/blob/release/3.0/libswscale/arm/yuv2rgb_neon.S#L404 this from commandline?
[19:15:48 CEST] <fritsch> we have code in kodi that segfaults when ffmpeg is compiled with asm optimizations
[19:15:57 CEST] <fritsch> we try to reproduce on the target system with:
[19:17:46 CEST] <fritsch> ./ffmpeg -i /usr/share/kodi/addons/audioencoder.xbmc.builtin.aac/icon.png  -filter:v scale=256:256 -sws_flags bicubic output.png
[19:17:54 CEST] <fritsch> but that seems to use another codepath
[19:22:46 CEST] <c_14> Are you sure icon.png is yuv420p?
[19:28:32 CEST] <fritsch> c_14: 100% not :-)
[19:29:09 CEST] <c_14> Then that would explain why that's not called, wouldn't it?
[19:29:15 CEST] <fritsch> exactly
[19:29:20 CEST] <fritsch> hehe
[19:29:24 CEST] <fritsch> thx, much
[19:51:29 CEST] <fritsch> c_14: i supplied external data and that was not proplerly 16 byte aligned
[19:51:42 CEST] <fritsch> c_14: so the code fell on its nose
[21:22:42 CEST] <mbeacom> Good afternoon everyone!  Currently working through an issue with ffmpeg input from RTMP output to FLV format.  I have a scaling expression in the form of:  "scale='if(gt(iw,ih),480,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,480)'"  We are consuming a live RTMP stream from a mobile device.  The mobile device changes orientation signaled in the ffmpeg log:  http://pastebin.com/VQaq8yq8
[21:25:12 CEST] <J_Darnley> Easy: stop rotating the camera
[21:25:17 CEST] <mbeacom> It appears that the output video changes orientation and immediately scales back down?  Any thoughts or suggestions on changing this?  Full FFmpeg execution:  http://pastebin.com/hp1779xN
[21:25:19 CEST] <mbeacom> ...
[21:26:53 CEST] <mbeacom> J_Darnley: Thank you for the suggestion...  I am assuming that the fact it sees the event and attempts to scale...
[21:29:05 CEST] <J_Darnley> Then I don't understand the problem.  It looks like ffmpeg is keeping it withijn the 480x480 box you asked for.
[21:29:49 CEST] <mbeacom> J_Darnley: How is that a 480x480 box?  It is checking the input width and height, seeing which is greater and adjusting accordingly?
[21:30:16 CEST] <mbeacom> Which it does fine, if the orientation is locked or doesn't change after initiation...
[21:31:12 CEST] <J_Darnley> "if input width is greater than input height set width to 480 else adjust 480 for aspect" and vice versa for the height
[21:33:50 CEST] <mbeacom> J_Darnley: Right...  if the input is 1280x720... the scaler scales that particular output to 480x270. If the input is 720x1280, it outputs 270x480...
[21:34:06 CEST] <J_Darnley> yes
[21:34:50 CEST] <mbeacom> J_Darnley: So, it works correctly on the initial stream, but attempts to scale it incorrectly following the Reinit event.
[21:36:16 CEST] <J_Darnley> Oh my mistake.  I thought this was joing landscape->portrait.
[21:36:20 CEST] <J_Darnley> *going
[21:38:20 CEST] <J_Darnley> You can try making it evaluate the expression every frame to see if that fixes it.
[21:38:43 CEST] <J_Darnley> append "eval=frame" to the end of the scale filter
[21:39:00 CEST] <mbeacom> J_Darnley: Thank you!  I'll try it out and see what happens!
[21:43:42 CEST] <mbeacom> J_Darnley: Inside of the "scale=''" ? Like "scale='', eval=frame" ?
[21:45:14 CEST] <furq> :eval=frame
[21:46:46 CEST] <mbeacom> furq: [AVFilterGraph @ 0x28c5220] No such filter: 'eval'  hhmm....
[21:47:23 CEST] <rrva> can I somehow specify PTS durations ffmpeg -f segment ?
[21:47:43 CEST] <J_Darnley> There's a segment time option as I recall
[21:48:04 CEST] <rrva> https://www.ffmpeg.org/ffmpeg-formats.html
[21:48:18 CEST] <rrva> segment_time time
[21:48:18 CEST] <rrva> Set segment duration to time, the value must be a duration specification. Default value is "2"
[21:49:57 CEST] <rrva> I guess I can use segment_frames option
[21:52:05 CEST] <rrva> how do I get the frame numbers to be output with ffprobe -show_frames ?
[21:57:15 CEST] <llogan> rrva: what parameter do you actually want to display?
[21:57:40 CEST] <rrva> I want to know the frame number of the first i-frame with a certain PTS
[21:57:57 CEST] <rrva> so I can pass it to segment_frames
[21:58:24 CEST] <rrva> I want to use ffmpeg -f segment, but specify segment breakpoints in PTS
[21:59:11 CEST] <J_Darnley> pts is just time scaled by the timebase
[22:00:20 CEST] <rrva> what is the unit for segment_time in now? seconds ?
[22:00:27 CEST] <J_Darnley> yes
[22:00:56 CEST] <rrva> PTS is 90khz
[22:01:05 CEST] <rrva> so I want to cut at a specific PTS value
[22:01:06 CEST] <rrva> segment
[22:01:29 CEST] <rrva> at exactly before a certain i-frame
[22:02:22 CEST] <llogan> you can list particular entries like: ffprobe -show_entries frame=foo,bar,etc input
[22:05:46 CEST] <rrva> ffprobe -of json -show_frames is ok, I can parse that and increment a counter for each frame, and then search of "pkt_pts"
[22:05:51 CEST] <rrva> and "key_frame" = 1
[23:24:23 CEST] <rrva> I got away with using ffprobe -of csv -show_entries frame=key_frame,pkt_pts -select_streams v a.ts > a.csv
[23:24:35 CEST] <rrva> and then doing "grep -A10 -n <pts_value>"
[23:25:02 CEST] <rrva> this gave me video frame #
[23:55:19 CEST] <Taoki> Hi everyone. I have a png sequence and a wav file, which I'm trying to combine into a mp4 file. For some reason, the speed of the video does not seem to match that of the audio, and the two don't sync up. Is there a way to make ffmpeg automatically adjust the frame rate of the video based on the length of the wav file, and have it fit perfectly... instead of using the -r parameter?
[23:55:54 CEST] <J_Darnley> I don't think so.
[23:56:00 CEST] <c_14> You probably want -framerate instead of -r, and you'll have to do that manually.
[23:56:13 CEST] <Taoki> ok
[00:00:00 CEST] --- Thu Mar 31 2016


More information about the Ffmpeg-devel-irc mailing list