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

burek burek021 at gmail.com
Sun Mar 9 02:05:01 CET 2014


[00:57] <lindenle> hi trying to decode h264 in a mp4 container and i get crop values invalid error. I assume this means I have setup my decoder incorrectly?
[00:57] <lindenle> http://ffmpeg.org/doxygen/2.1/doc_2examples_2decoding_encoding_8c-example.html  - working from that example but trying to change the input format
[01:07] <JodaZ> lindenle, well, that examples reading is kinda made specifically for mpeg(2), you should look at another example
[01:07] <lindenle> JodaZ: oh, can you point me to a better one?
[01:07] <lindenle> JodaZ: im totally new to libavcodec
[01:10] <JodaZ> well, possibly the filtering_video.c in the same directory where you may ignore most of the filtering stuff
[01:10] <JodaZ> i am new to this too :)
[01:11] <lindenle> JodaZ: cool ill look thanks
[01:18] <lindenle> Anyone else have some example fro decoding h264 stream from mp4 container? First question is do i need to pick the stream out somehow?
[01:19] <lindenle> ok so i assume demux with avformat convert with avcodec mux with avformat?
[02:41] <lindenle> does anyone know what the function img_convert has been renamed to?
[02:41] <lindenle> oh no, looks like it is in swscale
[03:05] <lindenle> Can i use the same context for muxing and demuxing or do i need two of them?
[03:31] <iive> lindenle: two of them.
[03:31] <lindenle> iive: thanks, that is what i figured
[03:32] <iive> it's kind of hard to imagine how you could use single context for two completely different operations on two different files ;)
[03:42] <JodaZ> is anyone here who knows his way around the code?
[03:43] <JodaZ> i am getting
[03:43] <JodaZ> [adts @ 0x2b57100] Encoder did not produce proper pts, making some up.
[03:43] <JodaZ> in the middle of some encoding, and i think thats an error
[03:45] <JodaZ> as in libavformat/mpegtsenc.c line 1253, a new packet is created, and has size and data copied from the old one, but pts/dts not, which it feeds back to av_write_frame, which results in that error
[03:59] <lindenle> should i be using add_stream or av_new_stream in 2.1? I can't seem to find av_new_stream in the docs at: http://ffmpeg.org/doxygen/2.1/
[04:00] <lindenle> but on a mac with n2.1.3 i dont see add_stream in the header files...
[04:01] <lindenle> ah avformat_new_stream
[04:01] <lindenle> nm
[04:27] <Snowleaksange> hrm @ libavdevice missing reference to sdl
[04:28] <Snowleaksange> i didnt enable sdl!
[04:28] <Snowleaksange> cant figure out how to disable either
[04:29] <Snowleaksange> hmm possibly --disable-index=sdl
[04:29] <Snowleaksange> err --disable-indev=sdl
[04:30] <Snowleaksange> oh nope didnt match
[04:31] <Snowleaksange> --disable-outdev=sdl !
[04:31] <Snowleaksange> if this works everyone will think im the compiler genius
[04:49] <Snowleaksange> b00m
[04:49] <Snowleaksange> i rule the earth w my intelligence
[05:50] <Jack64> anyone home? :)
[05:51] <Jack64> I got a question, I'm splitting a movie in a few parts (2 or 3), overlaying an image and then stitching them back together and sometimes I get a pause, like the stitching isn't done right.. how can I fix this?
[05:53] <Jack64> anyone?
[05:55] <Zeranoe> Jack64: !pb
[05:56] <Zeranoe> Woops, paste your command+full output
[05:56] <Jack64> there's no error but ok
[05:56] <Jack64> ffmpeg -y -i /tmp/ram/$infile -t $intime0 -c copy $workingdir/smallfile0b.mp4 -ss $intime0 -c copy $workingdir/smallfile0e.mp4 </dev/null >/dev/null 2>/var/log/ffmpeg.log
[05:56] <Jack64> ffmpeg -y -i $workingdir/smallfile0e.mp4 -t $intime1 -c copy $workingdir/smallfile1b.mp4 -ss $intime1 -c copy $workingdir/smallfile1e.mp4 </dev/null >/dev/null 2>/var/log/ffmpeg.log
[05:57] <Jack64> ffmpeg -y -i $workingdir/smallfile1e.mp4 -t $intime2 -c copy $workingdir/smallfile2b.mp4 -ss $intime2 -c copy $workingdir/smallfile2e.mp4 </dev/null >/dev/null 2>/var/log/ffmpeg.log
[05:57] <Jack64> ffmpeg -y -i $workingdir/smallfile2e.mp4 -t $intime3 -c copy $workingdir/smallfile3b.mp4 -ss $intime3 -c copy $workingdir/smallfile3e.mp4 </dev/null >/dev/null 2>/var/log/ffmpeg.log
[05:57] <Jack64> 4 part split
[05:57] <Jack64> 5 actually
[05:57] <Jack64> sorry
[05:58] <Zeranoe> Whats your stitch command
[05:58] <Jack64> then I just process smallfile0b,smallfile1b,smallfile2b,smallfile3b and smallfile3e
[05:58] <Jack64> and stitch them back together
[05:58] <Jack64> with concat
[05:58] <Jack64> 1 time out of 3 it's not doing it right
[06:00] <Zeranoe> You mean you rerun the same command and get a different result?
[06:00] <Jack64> no
[06:00] <Jack64> I mean like when I concat those files I said, transitions between 1 and 2 and 3 are perfect and then 3 and 4 breaks for a split second then resumes
[06:01] <Zeranoe> Jack64: Can you confirm that 3 and 4 don't have any leading gaps
[06:01] <Jack64> yes
[06:01] <Jack64> they're split
[06:01] <Jack64> from the originaç
[06:01] <Jack64> original*
[06:02] <Jack64> and I even have a script that looks for the key frame so it can be split at exactly that point
[06:02] <Jack64> actually I use ffprobe to get the closest keyframe to any mm:ss position
[06:02] <Jack64> and use that as split point
[06:03] <Jack64> so when I stitch it back together it should work
[06:03] <Zeranoe> Jack64: Can you try just concating the 3 and 4?
[06:03] <Jack64> yes, the problem persists
[06:03] <Zeranoe> So it's those files, not the concat
[06:03] <Jack64> but how, if those files are generated from the same input as the others?
[06:03] <Zeranoe> What frame type is the first frame in 3 and 4
[06:04] <Jack64> how do I check that?
[06:05] <Zeranoe> ffprobe -show_frames perhaps? Check if they are different than 1 and 2
[06:05] <Zeranoe> I'm shooting in the dark here by the way
[06:05] <Jack64> well the question I'm really asking is whether key frames change when you overlay something and output a different video
[06:06] <Jack64> cause that may be the problem
[06:06] <Jack64> I can't test that easily because those are temp files generated in ram
[06:06] <Jack64> and I have to run a long script to get to those
[06:06] <Jack64> takes a while
[06:06] <relaxed> save the overlay until you concat
[06:06] <Jack64> can't
[06:06] <Jack64> that's why I'm splitting in the first place
[06:07] <Jack64> different overlays for each part
[06:07] <Zeranoe> Why are you feeling null into ffmpeg btw
[06:09] <Jack64> check documentation
[06:09] <Jack64> it's cause I'm running it from PHP
[06:09] <Jack64> actually bash script dinamically generated by PHP
[06:09] <Jack64> kind of a mess really
[06:10] <Zeranoe> feeding*
[06:10] <Jack64> but I'm pretty close
[06:10] <Jack64> just have to fix that damn break
[17:47] <usrnix> Hi, using https://help.ubuntu.com/community/Webcam#FFmpeg to record from webcam, but when I hit ctrl+c it seems to cut off a big chunk of footage off the end; anything wrong with this command?
[17:50] <usrnix> Figure out that it's actually skipping.. weird, I counted and I was fast and skipped about six numbers o.o is just a generic HP webcam
[17:51] <usrnix> Soz for spam, just seems to be rubbish vpx, ogg was fine
[18:27] <q_bit> Can someone confirm that a simple use like this will dump the data out of a prores file without filtering? I need to avoid all the color shifts, incorrect use of 601 etc on some input files I use.  ffmpeg -i SMPTE-VideoRange-Bars.mov -t 1.0 -vcodec rawvideo raw.yuv  I'm hoping that this output yuv file will be unfiltered or changed from the 709 based 422 that was put into the prores file.
[18:58] <Styles_> Is it possible to truncate an audio file at a frame boundary?
[21:02] <troulouliou_dev> hi can somabody explain me how av_read_frame works internally ? is it not possible to read only frame from a specified stream ?
[21:02] <troulouliou_dev> it seems like i need to read all the frames and filter with pkt.stram_index == .
[21:02] <Mavrik> mhm
[21:03] <Mavrik> av_read_farme just calls out to the muxer for your format
[21:03] <troulouliou_dev> Mavrik, so it can be a fram from any streams ?
[21:03] <Mavrik> of course
[21:03] <Mavrik> because that's how files are saved
[21:03] <Mavrik> how do you expect to magically read file/stream while skipping data you haven't demuxed yet?
[21:04] <troulouliou_dev> Mavrik i want a raw access to a frame to analyse it; the only way is to read all frames and discard it until i get a correct frame ?
[21:05] <Mavrik> of course
[21:05] <troulouliou_dev> Mavrik, but how does seek works then ? it reread everything ?
[21:05] <Mavrik> how do you think you/ffmpeg would even know what is a "correct frame" if it didn't demux it?
[21:05] <Mavrik> yes.
[21:05] <Mavrik> troulouliou_dev, I suggest you look up on how the format you're reading is structured
[21:06] <troulouliou_dev> Mavrik, for mkv for instance the clusters have some metadata i tought an index was built in memory
[21:06] <Mavrik> troulouliou_dev, if you don't find the fact that you have to read the file to see what you have logical
[21:06] <troulouliou_dev> Mavrik, no its ok  i just didn't know that :)
[21:06] <Mavrik> you don't have location for _each_ packet in that index :)
[21:06] <Mavrik> you just have approximate location <-> time mapping
[21:06] <troulouliou_dev> Mavrik, thanks at least it is confirmed :)
[21:06] <Mavrik> you still have to read file and separate out streams and frames
[21:06] <Mavrik> troulouliou_dev, demuxing is very light on cpu anyway :)
[21:07] <Mavrik> it's just reading markers and sizes into memory
[21:07] <Mavrik> troulouliou_dev, actually decoding the frames is expensive
[21:07] <troulouliou_dev> Mavrik, but seek frame will read the first frame at a position for any stream ? i m somehow confused
[21:08] <Mavrik> yes
[21:08] <troulouliou_dev> Mavrik, ha sorry there is a stream index in it
[21:08] <Mavrik> mhm :)
[21:08] <Mavrik> troulouliou_dev, file is a sequence of frames with a stream index
[21:08] <Mavrik> so when you tell it "jump to that byte"
[21:08] <Mavrik> there's really nothing else it can do... it grabs first packet it encounters and demuxes it
[21:09] <troulouliou_dev> Mavrik, but frames are stil somehiow consecutive i guess
[21:09] <Mavrik> it cannot how file is stored - file can easily be VVVVAAAASAAAVVV or VAVAVAVAVASS or VAAAVAAAVAAA
[21:09] <troulouliou_dev> so it is easier for demuxer to lpay a file
[21:09] <Mavrik> most formats don't really force ordering of streams :)
[21:11] <troulouliou_dev> Mavrik, there is a commadn then to set the position to the beginning of the file
[21:11] <troulouliou_dev> whatever the first fram eis
[21:11] <troulouliou_dev> the first frame is ?
[21:11] <Mavrik> didn't really catch that question :)
[21:11] <Mavrik> what command?
[21:12] <troulouliou_dev> Mavrik, is there a function to reset the position to the first frame, in the state before the first av_read_frame
[21:43] <Jack64> guys, can anyone tell me why in this script http://pastebin.com/n6emmH4P the concatenation of files overlaid3.mp4 and overlaid4.mp4 isn't in sync ? there seems to be about 1 second duplication of frames, but all others are concatenated seamlessly except those 2
[21:51] <Jack64> anyone?
[22:05] <Jack64> guys, can anyone tell me why in this script http://pastebin.com/n6emmH4P the concatenation of files overlaid3.mp4 and overlaid4.mp4 isn't in sync ? there seems to be about 1 second duplication of frames, but all others are concatenated seamlessly except those 2
[22:05] <Jack64> please help me out, it's the only thing that's not working -.-
[22:47] <Zeranoe> Jack64: At this point you might want to try the mailing list
[22:49] <klaxa> yeah probably, i started looking at the script and i'm a little confused as to what it does
[22:49] <Jack64> Zeranoe: is splitting and merging that tricky? come on -.-
[22:49] <klaxa> maybe because it's simply too long?
[22:49] <Jack64> I can explain what it does
[22:49] <Mavrik> Jack64, yes, yes it is.
[22:49] <klaxa> can you break it down to the command that doesn't work, and/or provide some sample files to generate the output?
[22:49] <Mavrik> Jack64, especially with formats like mp4.
[22:49] <Jack64> it's pretty straightforward, except the comments are in portuguese
[22:50] <Jack64> the origin file is a MOV recording from an iPad
[22:50] <Jack64> it's a part of a recording of an indoor soccer game
[22:50] <Jack64> so I feed it the goal times
[22:50] <klaxa> oh i see you are using -c copy
[22:50] <Jack64> and it makes the scorebar overlay
[22:50] <klaxa> maybe some i-frames are skewed
[22:50] <klaxa> can you try re-encoding just as a test?
[22:50] <klaxa> that might be an issue
[22:51] <Jack64> I can try but it takes a while cause the script's pretty long
[22:51] <klaxa> just encode to like mpeg1video with a low bitrate
[22:51] <klaxa> but i think it's worth a shot
[22:51] <Jack64> sure I can try that
[22:51] <Jack64> what modifications would I make? instead of libx264 I use mpeg1video?
[22:51] <klaxa> better than being puzzled and not knowing what to do
[22:51] <klaxa> wait
[22:52] <Jack64> yea I guess lo
[22:52] <Jack64> lol*
[22:52] <klaxa> wait a sec
[22:52] <Jack64> ok..
[22:53] <klaxa> it will speed things if you replace libx264 with mpeg1video, the important part is to use a codec for the -t -ss segments, the ones where you use -c copy
[22:53] <klaxa> replace the ones where you copy the codec by something that encodes stuff
[22:53] <Jack64> why?
[22:53] <Jack64> the only place where I copy is when I split the files
[22:54] <Jack64> then I always need encoding because I'm changing the video track
[22:54] <Jack64> then I use copy for the concat as well
[22:54] <klaxa> yeah use encoding at the point where you split
[22:54] <Jack64> those are the only copy calls
[22:54] <klaxa> because that's where stuff could break shit because of copying the code
[22:54] <klaxa> *codec
[22:54] <Jack64> that'll make splitting a 20min video take some time instead of instantaneous
[22:55] <Jack64> with copy it's instantaneous (cause it's a RAMDisk)
[22:55] <Jack64> but sure, if it'll work, I don't care
[22:55] <Jack64> what puzzles me is why some work and some don't, because the origin file is the same!
[22:56] <Jack64> I split infile, then I take the last part of that split and split it again
[22:56] <Jack64> and so on
[22:56] <Jack64> so technically it's the same origin file
[22:56] <Jack64> except just an excerpt
[22:57] <klaxa> yes, but the beginning of a file you split has to be an I-Frame if you are copying the codec
[22:57] <Jack64> OH!
[22:57] <Jack64> I thought it had to be split by KeyFrame
[22:57] <klaxa> as in, the first frame of the resulting split file has to start with an i-frame
[22:57] <klaxa> yes an i-frame is a keyframe
[22:58] <Jack64> oh
[22:58] <Jack64> then it's already doing that
[22:58] <Jack64> see the ms=xxxxx ?
[22:58] <Jack64> at the top?
[22:58] <Jack64> before the script is generated, php runs ffprobe to look for the nearest keyframe
[22:58] <klaxa> ah
[22:58] <Jack64> nearest to the input time (goal time)
[22:58] <klaxa> hmm...
[22:58] <klaxa> no idea then, sorry
[22:58] <klaxa> gotta go afk
[22:59] <Jack64> it's really weird
[22:59] <Jack64> thanks for your help anyway klaxa
[22:59] <Jack64> I might try that mpeg1video bit just to see if anything changes
[23:00] Action: Jack64 calls on all hard-core ffmpeg'ers to conjure their wisdom in his aid
[23:03] <Jack64> Zeranoe: no ideas?
[23:13] <batence> hello there
[23:13] <batence> I have a question, is somebody here?
[23:13] <batence> :)
[23:14] <another> just ask
[23:14] <batence> good
[23:16] <batence> "movie=logo.png, scale=200:37 [watermark]; [in][watermark] overlay=10:10 [out]" - how to change these pixels 200:37 in percentage, because when i convert video with big resolution ... watermark comes small, but when convert video with small resolution - watermark comes very big, so is there a solution to scale watermark in percentage of video resolution ?
[23:18] <Jack64> batence: maybe you should have generate different watermarks with different resolutions to fit each type of video?
[23:18] <Jack64> then just overlay the appropriate one?
[23:18] <Jack64> seems to me the easiest solution
[23:19] <Jack64> otherwise you'll have to stretch a small image (distorting output) or shrink a large one (compressing at CPU cost)
[23:20] <batence> I just run video site
[23:20] <batence> everything must me complete for users :)
[23:20] <batence> *be
[23:21] <PuffyBSD> hey im not sure whats going on , i have been trying to get ffmpeg to sync video and voice together
[23:22] <PuffyBSD> i notice i get alot of frame drops too when doing a screencast if i launch a program or anything.. im not sure for openbsd s16le is good for the audio device as it works but its probably not the one.. i have no idea what openbsd uses or whatever name it is for the device for the mic
[00:00] --- Sun Mar  9 2014


More information about the Ffmpeg-devel-irc mailing list