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

burek burek021 at gmail.com
Sat Dec 22 02:05:01 CET 2012


[05:27] <guns> I am using libx264 with preset ultrafast and bold/low contrast text is significantly blurrier than high contrast text:
[05:27] <guns> https://gist.github.com/raw/4350324/963f6b2cbe955e45466e2301d195ab0b1587ecd9/ffmpeg-blurry-text.png
[05:27] <guns> Is there a x264 setting I can use to correct this, or perhaps another codec?
[05:28] <guns> I'm new to video encoding, so any pointers are helpful
[05:32] <davo> what am i doing wrong here: 'File for preset 'medium' not foundFile for preset 'medium' not found, *** glibc detected *** transcode: free(): invalid pointer: 0xa55aea62 ***', when using  command 'transcode -i argo.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o matrix -D0 -b224 -N 0x2000 -m matrix.ac3 -J modfps=clonetype=3 --export_fps 29.97transcode -i argo.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o matrix -D0 -b224 -N 0x
[06:21] <freezway> how do i get ffmpeg to convert all the files in a directory where the filenames have spaces?
[06:22] <freezway> the for file in ./*.flac method doesnt work with spaces
[07:04] <grepper> freezway:  are you quoting file like so ?  "$file"
[07:11] <freezway> no
[07:56] <grepper> then do so
[08:25] <Demon_Fox> Does anyone else have a line updating problem with the latest version of ffmpeg?
[11:34] <optics> Hi, is its offset expected to work with rtmp stream inputs?  its not having an effect for me.
[11:34] <optics> -itsoffset
[11:35] <klaxa> i think -itsoffset only works with multiple inputs
[11:35] <optics> i have two rtmp inputs :)
[11:36] <optics> ffmpeg -i "rtmp://127.0.0.1/live/VideoAndAudio.sdp live=1" -itsoffset 90  -i "rtmp://127.0.0.1/live/DubThisAudio.sdp live=1" -vcodec copy -acodec copy -shortest -f flv -map 0:0 -map 1:0 rtmp://127.0.0.1/live/DubbedAudio.sdp
[16:05] <jeje> Hi all I useFFMPEG to decode and display an H264 stream from a camera
[16:06] <microchip_> no shit
[16:06] <jeje> I was working with an old version of FFMPEG (using avcodec_video_decode)
[16:06] <jeje> now I want to use the last release version I found. I must using avcodec_video_decode2 instead but I have a problem
[16:07] <jeje> I always have the all my linesize at 0 after call avcodev_video_decode2
[16:08] <jeje> and of course I use swscale after and it tell me bad src image pointer
[16:11] <jeje> the old version I use was avcodec-52.dll and now avcodec-54.dll
[16:11] <jeje> I the only thing I change is
[16:11] <jeje> av_init_packet 	(&m_lpPacket);
[16:12] <jeje> m_lpPacket.data = lpImageData;
[16:12] <jeje>  m_lpPacket.size = dwImageSize;
[16:12] <jeje> avcodec_decode_video2( m_lpCodecCtx, m_lpFrame, &iFrameFinished, &m_lpPacket);
[16:12] <jeje> it seems the decode function is working
[16:13] <jeje> because it return me the good value
[16:14] <jeje> how can I set the linesize value of a AVFrame (or AVPicture) ?
[16:48] <brontosaurusrex> mateo`: hi
[16:48] <KING_LEE>  hello, I have a question about putting a video on a sony MWZ-S618F mp3 player http://www.sony.de/support/de/product/NWZ-S618F/specifications and  http://www.chip.de/preisvergleich/99562/Datenblatt-Sony-Walkman-NWZ-S618F-8GB.html .  I wanted to flip the video sideways to get more out of the small display. I got it up and running but the the video is now only half the size on the display and there is no sound   http:
[16:49] <brontosaurusrex> mateo`: i have same problems with your yesterdays command line
[16:49] <brontosaurusrex> basically, its not working, audio fails, if that removed, video fails as wel
[16:50] <brontosaurusrex> my ffmpeg is git from 2nd aug 2012
[17:07] <jeje> nobody have an idea about my question? how to set the linesize of the YUV420P video source?
[17:10] <Diogo> hi this is possible use ffmpeg in ios to stream camera to rtmp server??
[17:31] <jeje> like I see it seems to be always line[0] = srcwidth+32, line[1]=line[0]/2 and line[2]=line[0]/2, could you confirm me thisplease?
[17:36] <JEEB> I wish I could tell you from the top of my head how you can get the plane's size
[17:37] <JEEB> what I can say is that you can't expect it to be static methinks
[17:37] <JEEB> but yes, there is half the chroma with 4:2:0
[17:44] <jeje> thanks
[17:50] <jeje> I have another question. In the past I use avcodec_close and after avcodec_default_free_buffers
[17:51] <jeje> but now it crash on the the avcodec_default_free_buffers. I try to close before and I always have 2  unreleased buffers!
[18:35] <svm_invictvs> Hello
[18:35] <svm_invictvs> I'm having some problems with two pass encoding.
[18:36] <svm_invictvs> Specifically, I am trying to create a two variants of the same source file
[18:38] <svm_invictvs> One wiht a 600k bitrate, and one with an 800k, bitrate.  I'm using two pass, and reusing the pass.  I want to re-use the pass log file to cut down on encoding time and to ensure that the keyframes I forced wind up being in sync for the two variants.  The problem I'm having is that no matter what, both variants come out to be the same bit rate, which was specified in the first pass.  Any ideas on how to re use hte pass log file 
[18:39] <svm_invictvs> I pass the -maxbirate flag to the first pass, would it be as simple as just dropping that flag?
[21:24] <KING_LEE>   hello, I have a question about putting a video on a sony MWZ-S618F mp3 player http://www.sony.de/support/de/product/NWZ-S618F/specifications and  http://www.chip.de/preisvergleich/99562/Datenblatt-Sony-Walkman-NWZ-S618F-8GB.html .  I wanted to flip the video sideways to get more out of the small display. I got it up and running but the the video is now only half the size on the display and there is no sound   http
[21:36] <burek> KING_LEE, try breaking up your problem into smaller tasks
[21:36] <burek> nobody will bother to get into all that issue, just to solve one wrong option or something
[21:36] <burek> help us to help you
[21:37] <KING_LEE> ok,....
[21:37] <burek> svm_invictvs, you can't quite re-use the 1st pass
[21:37] <burek> because you specified the bitrate when you ran 1st-pass, right?
[21:37] <burek> it optimized stuff for that bitrate
[21:38] <burek> of you are using libx264, maybe the better option would be to use -crf
[21:38] <burek> instead of 2-pass encoding
[21:40] <svm_invictvs> burek: The reason I'm reusing the first pass is because I'm trying to force the keyframes at the same time for both streams.
[21:40] <svm_invictvs> (Mind you this is only what I've been told works, I'm no codec expert)
[21:41] <burek> svm_invictvs, what is your overall goal (the logical goal) ?
[21:41] <svm_invictvs> burek: To have n streams of the same video with varying bitrates and keyframes in the same place in each file.
[21:42] <svm_invictvs> svm_invictvs: Such that it can be used for adaptive streaming
[21:42] <burek> that's not a big issue
[21:42] <burek> just use a proper -gop value
[21:43] <burek> for ex.: ffmpeg -i input -c:v libx264 -b 600k -gop 30 output1.mp4 -c:v libx264 -b 800k -gop 30 output2.mp4
[21:43] <burek> something like that
[21:49] <KING_LEE>   hello, I have a question about putting a video on a sony MWZ-S618F mp3 player. the video works but there is no sound at all http://pastie.org/5382883
[21:56] <burek> KING_LEE, in which player did you try your output
[21:56] <burek> try to playback*
[21:57] <KING_LEE> burek: works in totem
[21:57] <burek> well then your output might be ok
[21:57] <burek> and the problem might not be in ffmpeg at all
[21:58] <KING_LEE> all other audio on the player works too
[21:58] <burek> maybe your sony doesn't support 220k mp3
[21:58] <burek> try using 192k or 128k
[21:58] <KING_LEE> ok
[21:59] <burek> https://ffmpeg.org/trac/ffmpeg/wiki/Encoding%20VBR%20(Variable%20Bit%20Rate)%20mp3%20audio
[22:00] <KING_LEE> thanks, i'll try that
[22:04] <KING_LEE> I would also like to ask a question about the player, a sony MWZ-S618F mp3 player http://www.sony.de/support/de/product/NWZ-S618F/specifications and  http://www.chip.de/preisvergleich/99562/Datenblatt-Sony-Walkman-NWZ-S618F-8GB.html
[22:04] <KING_LEE> I want to put a video file on it but the player somehow does not use the whole size of the display, somebody eher had this player and this problem?
[22:05] <burek> what do you mean by "does not use the whole size of the display"
[22:06] <KING_LEE> oh, sorry,... the link to the picture was missing there, just a sec
[22:06] <KING_LEE> http://ubuntuone.com/1LSiOdIhGVYwLnDvnWy8Xz
[22:07] <KING_LEE> I rotated the video in order to get more out of the small display but the size is like this. even when i do not rotate it, the size is the same
[22:08] <KING_LEE> but there is a video on this player that uses the full display
[22:12] <burek> can you download that video and type ffmpeg -i video
[22:12] <burek> and copy the output to a pastebin-like site (like www.pastebin.com)
[22:14] <guns> I am having a difficult time getting crisp text from -f x11grab; low contrast text (e.g. blue on black) is very blurry. I've tried every video codec, and different settings in libx264, but the result is always the same:
[22:14] <guns> https://gist.github.com/raw/4350324/963f6b2cbe955e45466e2301d195ab0b1587ecd9/ffmpeg-blurry-text.png
[22:15] <guns> Should I be using a different tool, or are there settings that can be tuned for text?
[22:16] <burek> and yes, you can try -tune animation
[22:16] <guns> https://www.refheap.com/paste/7792
[22:16] <burek> type "x264 --help" for more info
[22:16] <burek> i don't need a bash script
[22:16] <guns> from a script I am writing; I'll try tune animate
[22:16] <burek> just ffmpeg command line + complete output
[22:17] <burek> also, try using -crf 0
[22:17] <burek> while screencasting
[22:18] <burek> and after you are finished, then encode it properly
[22:18] <burek> https://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20grab%20the%20desktop%20(screen)%20with%20FFmpeg
[22:25] <svm_invictvs> burek: what does -gop do?
[22:25] <burek> group of pictures (keyframes)
[22:26] <burek> or it is -g
[22:26] <burek> sorry
[22:26] <KING_LEE> burek: here is the the video that works http://pastie.org/5563059
[22:26] <svm_invictvs> Yeah, I looked it up.  SO does that force a key frame every n frames or ever n.n seconds?
[22:27] <KING_LEE> burek: changing the sound to 128k did not work
[22:27] <burek> -g 3 means every 3rd frame
[22:28] <svm_invictvs> When was that introduced?
[22:28] <JEEB> -g is the maximum length of a gop
[22:28] <burek> KING_LEE, try using -c:v libx264 -profile baseline -s 320x240
[22:29] <JEEB> if an encoder feels like it wants to set one before that, it can
[22:32] <guns> burek: https://www.refheap.com/paste/7793/raw low contrast text is still blurry with -tune animation and -crf 0; second encoding for compression does not improve quality (of course)
[22:32] <svm_invictvs> burek: So I guess the video engineer here says that we've gotta use the force key frame option and pass a long-ass string to ffmpeg to get it to do this right, and then we share the passlog among multiple subsequent invocations.  The resulting stream is then packaged using some proprieatary tools to rig up some sort of adaptive streaming protocol.  Can you perhaps give me a little insight as to why he's saying that we must use 
[22:32] <guns> thanks for the help btw. sorry for piling on you
[22:32] <svm_invictvs> JEEB: I see.  So the force key frames option would actaully force it at those spots in the file
[22:33] <burek> isn't -crf 0 lossless
[22:33] <burek> how can you get anything blury
[22:33] <JEEB> with 8bit H.264, yes
[22:33] <JEEB> @ lossless
[22:33] <JEEB> just that it might be 4:2:0 for him and he originally had 4:4:4 or RGB (which is generally 4:4:4)
[22:34] <guns> burek: High contrast areas are fairly crisp; I assume the algorithm blends low contrast areas to reduce artifacts
[22:34] <Mavrik> JEEB: can you even encode RGB with color subsampling?
[22:34] <JEEB> Mavrik, in theory yes
[22:34] <JEEB> not that I've seen it because it works badly
[22:35] <guns> There exist codecs specific to recording screen text; I don't see anything available to ffmpeg
[22:35] <JEEB> unlike luma/chroma separation
[22:35] <burek> guns can you provide a pastebin of the ffmpeg command line + complete output
[22:35] <guns> burek: that was the paste
[22:35] <burek> sorry i didnt see it
[22:35] <JEEB> yes, you get BGR input
[22:35] <JEEB> and output is
[22:35] <burek> let me take a look
[22:35] <JEEB> actually 444
[22:35] <guns> ty
[22:35] <JEEB> or wait
[22:36] <JEEB> that's the profile
[22:36] <burek> input from x11grab is Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x800, 983040 kb/s, 30 tbr, 1000k tbn, 30 tbc
[22:36] <JEEB> yeah
[22:36] <burek> and libx264 produces Stream #0:0: Video: h264, yuv444p, 1280x800, q=-1--1, 1k tbn, 30 tbc
[22:36] <burek> so there is a color space conversion
[22:36] <guns> ah
[22:37] <JEEB> yes
[22:37] <JEEB> also yes, d'oh
[22:37] <JEEB> that's not the profile
[22:37] <JEEB> I'm tired
[22:37] Action: JEEB donkadonks
[22:37] <JEEB> was it rgb or gbr pix_fmt to be used with libx264 and ffmpeg?
[22:37] <JEEB> for RGB-in-4:4:4
[22:37] <svm_invictvs> JEEB: Set the group of pictures size.   - Documentation just says that, it's not clear as to whether or not it 's a max value
[22:38] <JEEB> svm_invictvs, in libx264 terms it's keyint, which is maximum GOP size
[22:38] <guns> burek: thanks for the clue; I'll do some research
[22:38] <JEEB> guns, you'll just have to encode with the needed RGB-in-4:4:4 pix_fmt
[22:39] <svm_invictvs> JEEB: I see.
[22:39] <JEEB> ooh
[22:39] <JEEB> there's a second avcodec?
[22:40] Action: JEEB goes read source
[22:40] <svm_invictvs> JEEB: -vcodec libx264 and there it is right in the flags
[22:40] <JEEB> guns, -c:v libx264rgb
[22:40] <JEEB> is the RGB-in-4:4:4 variant
[22:40] <JEEB> it seems
[22:40] <svm_invictvs> So there's no guarantee that it will force a particular gop structure
[22:40] <burek> guns :beer: :)
[22:42] <JEEB> svm_invictvs, I was looking for the correct way to make libx264 encode RGB :P Also yes, you don't set the GOP structure in stone in any way with -g (which maps to libx264's --keyint)
[22:42] <svm_invictvs> Is there another way to to it?
[22:44] <svm_invictvs> What were to happen if I re-use a pass log file?
[22:45] <JEEB> you could ask that on #x264 as it's x264-specific, just try to keep away from ffmpeg-specifics. You could ask if there are any recommendations for keeping the same IDR frame positioning between two+ encodes
[22:45] <JEEB> (since I guess except for the IDR frame positions everything else doesn't matter for you)
[22:46] <JEEB> IDR frame = no references go over this frame
[22:46] <svm_invictvs> JEEB: i see.
[22:46] <JEEB> what is usually called a "keyframe" colloquially
[22:46] <svm_invictvs> yeah
[22:46] <svm_invictvs> I'mr eading about it
[22:46] <svm_invictvs> *reading
[22:46] <guns> JEEB, burek: Much appreciated. while(*beer) give_burek(*beer++)
[22:46] <svm_invictvs> JEEB: And I did not nknow that x264 was a separate topic
[22:47] <burek> :)
[22:47] <JEEB> svm_invictvs, well not in general, but your question is quite specific to x264 and I have ever since forgotten whatever recommendations were given to a (lib)x264(cli) user to do that
[22:47] <burek> +1
[22:47] <JEEB> if I would still have remembered, I would have just said
[22:50] <svm_invictvs> JEEB: Whatever itis, I think it'll have to be done with ffmpeg, that's all we've got -_-
[22:51] <JEEB> yes
[22:51] <JEEB> svm_invictvs, but you are using libx264 via ffmpeg :P
[22:51] <svm_invictvs> Yeah, but due o liceenses we can't link it, just call ffmpeg
[22:52] <svm_invictvs> 'cause god fucking forbid we spend the money on a license to do something critical for our business needs.
[22:52] <JEEB> lol
[22:52] <JEEB> anyways, that wasn't what I was talking about. Just saying that asking about such a relatively specific thing would be good to ask on that channel instead of here :)
[22:53] <JEEB> as I don't remember the recommendation that D_S gave back then to someone there
[22:54] <svm_invictvs> JEEB: Cool, I did ask there.
[22:54] <JEEB> yeah, see when the channel gets active
[22:54] <svm_invictvs> JEEB: Mind you i'm not the "video engineer" here, that's somebody else.  But he went home for the day and I'm jsut tinkering at this point
[22:54] <JEEB> personally I'd probably just encode once, then dump keyframes via one of the X ways to do it, and then would just use the qpfile option of libx264's to set a file with framenumbers and the I frametype (big i = IDR)
[22:55] <JEEB> that would just make the encoder force IDR frames at certain spots
[22:55] <svm_invictvs> JEEB: They just said to reuse the pass log, haha
[22:56] <JEEB> well, that's one way to do it
[22:57] <svm_invictvs> JEEB: I would not be surprised if one of the guys in there or in here is our video engineer, I've heard he's contributed to ffmpeg in the past.
[22:59] <KING_LEE> burek: the player does not accept the video  http://pastie.org/5563170
[23:00] <burek> [SAR 3:5 DAR 4:5]
[23:00] <burek> why does that happen?
[23:01] <burek> anyway, KING_LEE, you should produce with your ffmpeg this exact output: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 735 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
[23:01] <burek> and im not sure how to do that precisely..
[23:02] <burek> -c:v libx264 -s 320x240 -b 800k -r 30 output.mp4
[23:02] <burek> something like that
[23:05] <burek> try this: ffmpeg -i MICHI_HIEBER.MOV -c:v libx264 -b 800k -r 30 -s 320x240 -c:a aac -strict experimental -ab 128k -ar 44800 -ac 2 michi_hieber_sony.mp4
[23:12] <KING_LEE> burek: that does not work
[23:12] <KING_LEE> http://pastie.org/5563212
[23:13] <burek> -ar 48000 instead of 44800
[23:13] <j-b-r> This might not be the place to ask this question, but can an FLV be VFR?
[23:14] <JEEB> j-b-r, naturally
[23:14] <JEEB> the timestamps are just 1000 ticks = 1 second, IIRC
[23:15] <j-b-r> So remuxing from flv to mkv requires timecodes from the original file
[23:17] <JEEB> pretty much any muxing requires some kind of timestamps from the input file :s
[23:17] <JEEB> there are less CFR-only containers than those capable of VFR
[23:18] <JEEB> heck, even with AVI you can hack around null frames and end up with VFR
[23:21] <j-b-r> Geh, I guess it just seems more annoying because mkvmerge doesn't accept flvs
[23:25] <KING_LEE> burek: no, the player does not like it. it says the videoformat is not supported
[23:26] <burek> KING_LEE, i don't know how exactly to tell libx264 to produce constrained baseline profile
[23:26] <burek> i thought -profile baseline would do that, but it didnt
[23:27] <llogan> nobody uses CBP anyway.
[23:27] <burek> his phone does :)
[23:27] <burek> http://pastie.org/pastes/5563059/text
[23:28] <burek> that's the video that works on his phone and he'd like to produce the similarly encoded (another) video to play it on the phone
[23:28] <llogan> try "-profile:v baseline" instead of "-profile baseline"
[23:28] <KING_LEE> it is not a phone, its a media player, a sony MWZ-S618F mp3 player http://www.sony.de/support/de/product/NWZ-S618F/specifications and  http://www.chip.de/preisvergleich/99562/Datenblatt-Sony-Walkman-NWZ-S618F-8GB.html
[23:31] <llogan> sorry, i meant nobody uses BP. -profile:v baseline should produce cbp
[23:37] <KING_LEE> Although I would like to get this working, I think i could deal with the small video output if the sound would be working
[23:38] <burek> use aac instead of mp3
[23:39] <burek> at least your working video uses aac, so i assume your player supports it
[23:49] <raket> how to configure AD1984 to be able to record whatever it output with ffmpeg -f alsa -i plughw? :-)
[23:50] <llogan> raket: https://ffmpeg.org/trac/ffmpeg/wiki/Capturing%20audio%20with%20FFmpeg%20and%20ALSA
[00:00] --- Sat Dec 22 2012


More information about the Ffmpeg-devel-irc mailing list