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

burek burek021 at gmail.com
Sat Dec 21 02:05:01 CET 2013


[01:00] <pyBlob> I'm using ffmpeg to convert a video to raw yuv444p ... but it doesn't seem that the yuv-values are stored interleaved, like in rgb24
[01:00] <pyBlob> > http://www.pasteall.org/pic/show.php?id=64246
[01:00] <pyBlob> so what is the correct way to read the raw data?
[01:40] <Rivky> Is it possible to copy a given chapter's audio using the chapter's identifier? The docs only show it being done with -ss and -t and wants me to subtract the end time from the start time, and that just feels so silly.
[06:06] <clever> are there any test pattern video files, that have things like frame number embeded into each frame?
[06:06] <relaxed> you can create your own with the drawtext filter and a little scripting
[06:10] <clever> dont think mplayer has the same filter in it though, trying to create a vo module for that
[06:12] <Compn> hmmm
[06:12] <Compn> does ffmpeg have it ?
[06:12] <Compn> you might be able to enable mplayer libavfilter support
[06:12] <Compn> dunno if it works tho :)
[06:12] <clever> though i could maybe use ffmpeg in transcode mode to apply the filter to a new file, and then play that back
[06:13] <clever> but it might be simpler to just hard-code it to draw directly into the output buffer now that i think of it
[06:15] <Compn> sure either way
[06:16] <clever> ive got the bulk of the omx decode working, just some timeout problems now
[06:16] <clever> so that only leaves the output part, fbdev and x11 just plain suck
[07:47] <clever> for x in {0..300};do convert shot0001.png -background transparent -fill black -pointsize 40 caption:$x -gravity center -composite frame$x.png; done
[07:47] <clever> ah dang, Compn is gone
[07:48] <ubitux> why did you ignored relaxed suggestion?
[07:48] <ubitux> you can do it in one single ffmpeg command
[07:49] <clever> using mplayer not ffmpeg, didnt think to keep going down that route
[07:49] <ubitux> don't you just want to generate a video with numbered frames?
[07:49] <clever> yeah
[07:49] <clever> ffmpeg -f image2 -i frame%d.png -r 30 -q:v 2 sample.mp4
[07:49] <clever> this second step did that
[07:49] <ubitux> you can generate the numbered frame with ffmpeg as well.
[07:50] <clever> yeah, i could have probly used the video filters now that i think of it
[07:50] <ubitux> that was exactly what relaxed said&
[07:50] <clever> at the time, i thought he was saying to use them on ffplay
[07:54] <ubitux> ffmpeg -f lavfi -i color -vf "drawtext=text=%{n}:fontcolor=white:fontsize=70:x=20:y=20" -t 5 num.mp4
[07:54] <ubitux> ofc, ffmpeg built with --enable-libfreetype --enable-fontconfig
[07:55] <clever> looks like i turned it off, [AVFilterGraph @ 0x89caf20] No such filter: 'drawtext'
[07:56] <ubitux> you didn't --enable-libfreetype
[07:56] <ubitux> on which drawtext relies
[07:57] <clever> which seems to be the truetype flag in gentoo
[07:57] <ubitux> --eanble-fontconfig isn't mandatory but useful to avoid the need of specifying font path
[08:23] <clever> ubitux: yep, that also works nicely
[08:25] <clever> was going to ask about color, then i noticed fontcolor=white
[08:31] <clever> now to figure out why the file i made with image magick causes a segfault
[08:31] <zap0> is white 0xffffff ?
[08:32] <zap0> and is that value in-bounds for your colour space
[08:32] <clever> yuv420
[08:32] <clever> it sefaults when copying the v plane
[08:33] <clever> allocated 783360 bytes for a 960x540 image, padded to 960x544 buffer runs from 0xb3d88020 to 0xb3e47420
[08:33] <clever> draw slice 0 960/16 0/272
[08:33] <clever> copying 0xb3d77520(480) to 0xb3e47420(480), height 8
[08:33] <clever> at a glance, it appears to be using the end of the entire frame as a starting position
[08:34] <clever> so something is wrong with the plane pointers
[08:38] <clever> ah, i forgot to halve the y offset for u and v
[08:38] <clever> since u and v are 2x2 subsamples
[08:41] <clever> zap0: yep that was it, segfaults are gone
[08:42] <clever> still nothing but green out of it though
[08:45] <zap0> rgb(0,0,0) == yuv(green)
[08:47] <clever> only the y plane is working
[08:47] <clever> so i'm getting everything from dark green to light green, and all the shades between
[08:48] <clever> http://gallery.earthtools.ca/index.py/paste/DSCF0558.JPG would be a normal color sample image
[08:49] <zap0> who is doing the yuv/rgb conversion?     it looks wrong
[08:49] <clever> the gpu hardware
[08:50] <clever> which is poorly documented
[08:50] <clever> the forums said the stride must be a multiple of 16, but i just found out today that 16 causes massive problems
[08:50] <zap0> ah..  blending edge hackery..    good luck.
[08:50] <clever> 32 works fine
[08:50] <clever> ive gotten the hardware h264 decode to work, and its returning yuv420 frames now
[08:51] <clever> but fbdev, x11, and sdl all do software rgb conversion
[08:51] <clever> so the cpu usage is too high
[09:08] <clever> zap0: bingo!, the out of order frames are caused by the decode engine
[09:08] <clever> its nothing to do with my double buffering at the output
[09:09] <clever> software decode is slow and perfect, hardware decode is completely out of order
[09:29] <Barvinok> hi all. I'm grabbing video from v4l2 : "ffmpeg -f v4l2 -r 30 -s 640x480 -i /dev/video0 ctest.mkv" but it encodes with about 10 fps. Ok then, I set "-r 10" but then it encodes with 5 fps :( how do I enforce input fps to match output fps ?
[09:30] <Barvinok> when I set 5, it degrades to 2.8 and to half what I set in general
[10:24] <pyBlob> with the blur filter you can blur a video in x-y-axis, is there also a temporal blur filter that overlays the video with previous frames?
[10:50] <DelphiWorld> hi
[10:51] <DelphiWorld> can someone help me converting a rtmp stream to rtp stream?
[10:52] <DelphiWorld> rtmp://radio.gmo.ps/live/livestream
[10:52] <DelphiWorld> unable to write stream 0...
[10:55] <DelphiWorld> i'm doing:
[10:55] <DelphiWorld> ffmpeg -i $stream -acodec copy -vcodec copy -f rtp rtp://localhost:6666
[10:55] <DelphiWorld> but is unable to work
[11:10] <DelphiWorld> hey odedo
[11:12] <bencoh> "-f rtp" is wrong
[11:13] <bencoh> (well it depends on how you want to mux it, but ...)
[11:13] <DelphiWorld> bencoh, want to kick out the video. keep the audio, AAC. that's all, rtp
[11:15] <bencoh> try -f mpegts
[11:15] <DelphiWorld> and use rtp:// ?
[11:16] <DelphiWorld> and how to kick the video?
[11:17] <bencoh> oh right, you want audio only ... "-vcodec copy" is definitely not gonna work ;)
[11:18] <DelphiWorld> then how to do audio only:)
[11:18] <bencoh> -vn should help
[11:20] <DelphiWorld> hey  bencoh you rocks ;)
[11:22] <DelphiWorld> shit, need sdp file? mmmmmm
[11:22] <DelphiWorld> i'm not gonna use rtp, sory:)
[11:23] <DelphiWorld> bencoh, this is rtmp stream that couldnt be read by mpd, so wanna pass it to mpd using ffmpeg...
[11:23] <DelphiWorld> rtp need sdp file
[11:26] <bencoh> you don't always need rtp, depending on how you use it
[11:26] <bencoh> s/rtp/sdp/
[11:27] <DelphiWorld> lol bencoh ;-)
[11:27] <DelphiWorld> give me a sdp less solution:)
[11:29] <bencoh> you could send raw s16 to your mpd
[11:29] <bencoh> (raw s16 in rtp)
[11:31] <bencoh> read rfc 3551 :p
[11:33] <DelphiWorld> lol bencoh i'm not a developer ... i'm just a person trying to listen
[11:34] <bencoh> :)
[11:34] <bencoh> something like -acodec pcm_s16be -f rtp might work
[11:35] <bencoh> (or -f s16be, dunno)
[11:37] <bencoh> works with -f rtp
[11:38] <DelphiWorld> lol bencoh... ffprobe rtp://localhost:6666 dont give any audio codec:)
[11:38] <DelphiWorld> and complain about sdp:)
[11:38] <DelphiWorld> -acodec pcm_s16be -f rtp rtp://localhost:6666
[11:39] <bencoh> -vn -acodec pcm_s16be -f rtp ?
[11:39] <bencoh> works here
[11:39] <DelphiWorld> yeah, ffprobe complain about sdp and payload 97
[11:40] <bencoh> on the output stream ?
[11:42] <bencoh> dunno why ... vlc plays it just fine, and it's compliant to rfc 3551
[11:42] <DelphiWorld> bencoh: yeah, ffprobe refuse it
[11:49] <DelphiWorld> a=rtpmap:97 L16/22050/1
[11:49] <DelphiWorld> this is playable in ffplay
[11:53] <DelphiWorld> bencoh: i think, i'lle try to have it on http.
[11:54] <DelphiWorld> mmmmm!
[11:54] <DelphiWorld> got a good idea
[11:54] <bencoh> you could transcode to mp2 over rtp if you're that desperate
[11:55] <DelphiWorld> bencoh: lol hold on
[11:55] <bencoh> I tink this one does not need any sdp
[12:00] <DelphiWorld> didnt work LOL
[12:00] <DelphiWorld> i pushed the stream to a rtmpd
[12:00] <DelphiWorld> nginx rtmp module
[12:00] <DelphiWorld> and outputed it in hls
[12:00] <DelphiWorld> but mpd didnt read it
[12:18] <DelphiWorld> ok bencoh
[12:18] <DelphiWorld> i simplified my setup using nginx
[12:18] <DelphiWorld> ffmpeg push to nginx using rtmp & mpd fetch from nginx
[12:22] <bencoh> ohmy
[12:24] <DelphiWorld> lol
[12:24] <DelphiWorld> what else... didnt find a solution;)
[12:27] <DelphiWorld> my mpd is not decoding aac...
[13:27] <nyuszika7h> hi, I converted a MKV file to MPG so that my DVD player can play it, but I'm getting frame sync errors when pressing the arrow keys in ffplay to go back/forward, and in VLC and my DVD player, when I go to 20:00, it goes to 17:15 instead
[13:28] <nyuszika7h> http://ix.io/9sJ
[13:32] <nyuszika7h> the command I used:
[13:32] <nyuszika7h> ffmpeg -threads 2 -i 01\ -\ The\ Impossible\ Astronaut.mkv -target pal-dvd -q:a 0
[13:32] <nyuszika7h> er
[13:32] <nyuszika7h> ffmpeg -threads 2 -i 01\ -\ The\ Impossible\ Astronaut.mkv -target pal-dvd -q:a 0 -q:v 0 /run/media/nyuszika7h/STORE1/01\ -\ The\ Impossible\ Astronaut.mpg
[14:13] <relaxed> -q:v 0 isn't valid
[15:52] <nyuszika7h> relaxed: it isn't?
[15:55] <nyuszika7h> anyway, apparently ffmpeg is dropping frames
[15:55] <nyuszika7h> more than 1000
[19:36] <PowerCC> hello
[19:37] <PowerCC> trying to extract dvdsub > srt
[19:37] <PowerCC> ffmpeg -i moviefile -vn -an -codec:s:0.2 srt moviefile.srt
[19:38] <PowerCC> however getting: ffmpeg -i moviefile -vn -an -codec:s:0.2 srt moviefile.srt
[19:38] <PowerCC> error while opening encoder for output
[19:38] <PowerCC> i also tried to -map s:
[19:45] <JEEB> PowerCC, dvd subtitles are pictures
[19:45] <JEEB> srt is text
[19:45] <PowerCC> not possible?
[19:46] <PowerCC> must use mkvtools
[19:46] <PowerCC> in another word OCR
[19:49] <PowerCC> thx, it looks like ffmpeg can only extract subrip or other texts subtitles dvdsub is pictures that's the problem.
[19:50] <JEEB> PowerCC, use subtitle edit and such apps to OCR it first
[19:51] <PowerCC> thanks jeeb, i am getting old totally fogot dvdsub are pictures
[19:51] <JEEB> np
[19:53] <JEEB> dvb subtitles, dvd subtitles and pgs (presentation graphics, the naming used for blu-ray picture-based subtitles) are at least picture-based :)
[19:53] <clever> JEEB: do you happen to know how ffmpeg handles a decoder returning frames out of order?
[19:54] <clever> 30 37 36 37 35 41 for example
[19:56] <JEEB> I thought a libavcodec decoder should always output pictures in order? Also if you have the same PTS coming out multiple times you're most likely screwed already :P
[19:56] <PowerCC> JEEB yeah I remember using tools to convert it from dvdsub to srt long ago... been awhile.
[19:56] <clever> JEEB: ah, so its my job to fix that within my decoder
[19:56] <PowerCC> thx jeeb
[19:57] <clever> JEEB: the strange thing, is that i'm printing the pts out from the code and its in order, but the frames i see arent
[20:32] <alesan> re
[20:32] <alesan> how to calculate PSNR ?
[23:38] <FedoraUser> hello friends
[23:39] <FedoraUser> i am getting some strange glitches while trying to record from x11grab, it shows something like scan lines, where you can see the parts of window beneath the one i am recording
[23:39] <FedoraUser> any hints how to fix that?
[23:40] <FedoraUser> or how to properly test that
[23:57] <ph8> hi all! I have a 4:3 clip that i want to make a 768x432 thumbnail of (16:9) - i don't want to stretch it but i want black bars. Any idea on how i do this? At the moment i'm doing -filter:v scale="768:432" but that is stretching
[23:57] <ph8> i feel like a pad's in my future but i really don't get the syntax
[00:00] --- Sat Dec 21 2013


More information about the Ffmpeg-devel-irc mailing list