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

burek burek021 at gmail.com
Tue Apr 19 02:05:02 CEST 2016


[00:34:06 CEST] <TAFB2> I want ffmpeg to stream a short video in a loop but insert random .mp3 audio songs, possible?
[00:46:52 CEST] <andrey_utkin_> what is the exact upper estimation of h264 bitstream inflation at applying of startcode emulation prevention? dst_size = src_size * 5 / 4?
[02:03:03 CEST] <spirou> are there an easy way to remove a part of a song in the middle with ffmpeg?
[02:04:26 CEST] <spirou> if I would like to cut away 05:27-06:32 from a file
[02:14:37 CEST] <andrey_utkin_> spirou, you could make two cuts and then concat them. Or maybe use aselect filter if there's such one (just guessing, haven't checked actual doc)
[02:19:30 CEST] <prelude2004c_Zzz> hello .. http://pastebin.com/tVi1BhQU .. can anyone help?
[02:19:48 CEST] <prelude2004c_Zzz> still trying to get an answer on this problem
[02:20:09 CEST] <furq> that paste has expired
[02:20:17 CEST] <J_Darnley> Have you even visited that link?
[02:22:41 CEST] <spirou> andrey_utkin_: ok I guess it would be ffmpeg -t 05:27 -i in.mp3 -ss 06:32 -i in.mp3 out.mp3
[02:23:06 CEST] <J_Darnley> no
[02:23:19 CEST] <J_Darnley> that will have two streams
[02:23:23 CEST] <prelude2004c_Zzz> oh sorry :(
[02:23:27 CEST] <J_Darnley> you will need something to concat them
[02:23:36 CEST] <prelude2004c_Zzz> let me see if i can get another going ..
[02:24:46 CEST] <spirou> J_Darnley: uhmm.. I never done that... I guess some flag that tells that input2 should continue after input1 ?
[02:25:11 CEST] <J_Darnley> no, I'm thinking of a concat filter
[02:26:30 CEST] <prelude2004c_Zzz> hey guys.. ok see this paste
[02:26:30 CEST] <prelude2004c_Zzz> http://pastebin.com/REQMtykq
[02:26:45 CEST] <J_Darnley> > in 60 min
[02:27:00 CEST] <J_Darnley> Lats hope someone doesn't turn up in 61 minutes trying to help
[02:27:05 CEST] <furq> prelude2004c_Zzz: "
[02:27:10 CEST] <furq> "-map i:0x1114 -map i:0x1114"
[02:27:30 CEST] <prelude2004c_Zzz> oh i always do that .. my bad :)
[02:28:17 CEST] <furq> also the second ffmpeg will only include one audio track unless you use -map 0
[02:28:27 CEST] <prelude2004c_Zzz> oh yes.. i did that because the source contains only 1 5.1 audio channel.. so i am splitting that into 2 channels and then one is going to be stereo and the other i leave as 5.1
[02:28:54 CEST] <prelude2004c_Zzz> furq .. do you mean on the second one i just run -map 0 and it will work ?
[02:29:14 CEST] <furq> i don't know, but i know it won't work without that
[02:29:44 CEST] <prelude2004c_Zzz> oh.. do i put that on ffmpeg -map 0 |pipe > ffmpeg or do i put it  input | ffmpeg -i - .... -map 0
[02:29:50 CEST] <furq> the second one
[02:29:55 CEST] <prelude2004c_Zzz> ok cool let me try it
[02:32:02 CEST] <prelude2004c_Zzz> hum.. You ( furq ) .. you are good you
[02:32:09 CEST] <furq> i am good me
[02:33:01 CEST] <prelude2004c_Zzz> :) last question .. since i am nearly there
[02:33:03 CEST] <prelude2004c_Zzz> "-c:a:0 aac -b:a:0 128k -ac 2 -c:a:1 aac -b:a:1 256k -ac 6"
[02:33:21 CEST] <prelude2004c_Zzz> the source is both 5.2 .. i set -ac2 for the first one.. and ac6 for the second.. now they both encode at 5.1
[02:33:47 CEST] <prelude2004c_Zzz> how do i separate it so the first can be set to stereo and the second will be 5.2
[02:33:51 CEST] <prelude2004c_Zzz> 5.1 rather
[02:34:04 CEST] <furq> -ac:0 and -ac:1
[02:34:13 CEST] <furq> or -channels:a:0 if you want to be modern
[02:34:24 CEST] <prelude2004c_Zzz> alright.. ok.. makes sense... logic prevails as always
[02:34:43 CEST] <prelude2004c_Zzz> let me get with the times .. -channels:a:0 it is :P
[02:35:52 CEST] <prelude2004c_Zzz> ehhhh channels:a:0 unrecognized option :P
[02:37:12 CEST] <furq> i guess that one hasn't been modernised then
[02:39:02 CEST] <prelude2004c_Zzz> ya... also back to -ac:0 seems to still stay on 5.1
[02:39:09 CEST] <prelude2004c_Zzz> doesn't convert to 2 ( stereo )
[02:39:58 CEST] <prelude2004c_Zzz>  "-c:a:0 aac -b:a:0 128k -ac:0 2 -c:a:1 aac -b:a:1 256k -ac:1 6"
[02:42:27 CEST] <snakeryslug> as someone who is ignorant of the details of av files, i was suprised that a video that's only 1 picture throughout was 300MB.
[02:42:37 CEST] <prelude2004c_Zzz> seems that the 128K and 256k works
[02:42:59 CEST] <prelude2004c_Zzz> just not the channels ( ac )
[02:51:47 CEST] <spirou> ok I suppose I have to cut beginning or end to two files that then be concatenated with  ffmpeg -i concat:"in1.mp3|in2.mp3" -c copy out.mp3
[02:57:05 CEST] <Snoo20664> you can just copy /b audio files
[02:57:26 CEST] <Snoo20664> copy /b in1.mp3 + in2.mp3 out.mp3
[02:58:08 CEST] <spirou> wel... I'm in linux but doesn't a mp3 have some header
[02:58:12 CEST] <furq> that's exactly what the concat protol does, and you can't do that with mp3
[02:58:20 CEST] <furq> because of the id3 headers
[02:58:38 CEST] <furq> s/protol/protocol
[02:59:01 CEST] <spirou> ok.. so to make a good concatenation of the two mp'3 I need another longer way to write it?
[02:59:04 CEST] <prelude2004c_Zzz> furq .. any other ideas ? "-c:a:0 aac -ac:0 2 -b:a:0 128k -c:a:1 aac -ac:1 6 -b:a:1 256k" << --- this seams to convert the first audio bit rate to 128 and the second to 256 but both are set to 5.1 instead of 2.0 for the first audio and 5.1 for the second
[02:59:17 CEST] <furq> spirou: https://trac.ffmpeg.org/wiki/Concatenate#demuxer
[02:59:46 CEST] <prelude2004c_Zzz> last piece of my puzzle ( at least that i know of right now :) )
[03:00:31 CEST] <spirou> ok I must make a text file with one line per mp3 file then
[03:00:38 CEST] <furq> prelude2004c_Zzz: sorry, that should be -ac:a:0
[03:00:59 CEST] <furq> because apparently you might want to set -ac on a video track
[03:01:00 CEST] <prelude2004c_Zzz> oh.. sorry my bad.. i was trying to look at documention .. didn't notice that too :)
[03:01:05 CEST] <prelude2004c_Zzz> oh ic
[03:02:15 CEST] <prelude2004c_Zzz> YAY !!!!!
[03:02:21 CEST] <prelude2004c_Zzz> 2 beers for furq
[03:04:55 CEST] <spirou> when I try ffmpeg -f concat -i file.txt -c copy out.mp3   it spews a ton of "[mp3 @ 0xaeb19c0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 24196608 >= 24195814" upon me...
[03:06:18 CEST] <spirou> I guess I don't have to worry about?
[03:28:07 CEST] <snakeryslug> can anyone explain why a video that's one picture, if left out, is 300MB? i thought compression algs would make it much smaller.
[03:28:48 CEST] <spirou> If I understand right the one-liner to remove a part in the middle of a file is ffmpeg -i in.mp3 -filter_complex "trim=duration=05:27[a]; trim=start=06:32[b],setpts=PTS-STARTPTS[d]; [a][b]concat[c]" -map [c] out.mp3
[03:29:21 CEST] <furq> spirou: that'll reencode
[03:29:30 CEST] <spirou> snakeryslug: how do you mean? a video that is only one frame long?
[03:30:40 CEST] <spirou> furq: oh... I don't know where to put a -c copy in there though...
[03:31:05 CEST] <furq> you can't use filters without reencoding
[03:31:18 CEST] <spirou> ow :'(
[03:31:33 CEST] <spirou> ok it was a great idea at least :D
[03:31:47 CEST] <snakeryslug> spirou: it's one of those videos where it's just the same picture through the whole thing and the important part is the audio. i don't know how to measure frames, but when i extraced the audio only, the file size went down by 300MB.
[03:32:53 CEST] <spirou> snakeryslug: ok, must have been a pretty bad way of store that frame yeah
[03:33:13 CEST] <spirou> you didn't reencode the sound by mistake though?
[03:34:04 CEST] <snakeryslug> i don't think so. i did `ffmpeg -i .\input.mp4 -codec copy -vn output.m4a`
[03:49:34 CEST] <spirou> snakeryslug: are you sure the picture is actually still, they don't do something stupid as slowly slightly zoom out the picture or something?
[03:50:02 CEST] <TAFB2> I want ffmpeg to stream a short video in a loop but insert random .mp3 audio songs, possible?
[03:51:04 CEST] <spirou> TAFB2: so video from one file, and audio from multiple other mp3 files?
[03:51:30 CEST] <furq> TAFB2: not with ffmpeg itself but you could pipe the audio in somehow
[03:52:04 CEST] <TAFB2> got a pipe example? :)
[03:52:15 CEST] <kepstin> could even just use a music player on shuffle and capture an alsa loop device or pulseaudio monitor device.
[03:52:26 CEST] <spirou> Any idea what the "non monotonically increasing dts to muxer" meant btw?
[03:52:51 CEST] <furq> spirou: does the file play back correctly
[03:53:23 CEST] <spirou> furq: yeah no problem
[03:53:52 CEST] <spirou> nothing I noticed when listen at least
[03:56:04 CEST] <spirou> (that doesn't mean it is not wrong somehow anyway though)
[04:00:07 CEST] <spirou> dts means time stamp if I understand right, I suppose it don't like the timestamps on the second half of the song
[04:00:24 CEST] <furq> i'm not really sure how that works in mp3
[04:01:01 CEST] <spirou> Perhaps ffmpeg -ss 06:32.5 -i in.mp3 in2.mp3  is not right way to cut a beginning?
[04:21:33 CEST] <snakeryslug> spirou: not 100% sure. i guess i'd have to use ffprobe to find out (right?)
[04:23:29 CEST] <spirou> snakeryslug: yeah that would be a good idea, it would show how many kb/s the video stream have
[04:34:48 CEST] <PacketPusha> I can's quite seem to get this figured out,  I am using "ffmpeg -y -threads 8 -i "video.mp4" -an -sn -vsync 0 -vframes 10 -s 854x480 -vcodec mjpeg -pix_fmt yuvj420p -b:v 2000 -bt 20M "test_%d.jpg" -ss 10" so far but I want to skip the first 10 seconds and then every 30 seconds get 10 frames as images.
[04:34:49 CEST] <PacketPusha> Suggestions?
[04:35:48 CEST] <furq> PacketPusha: https://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect
[04:37:32 CEST] <furq> something like select='lt(mod(t\,750)\,10)' should work for 25fps video
[04:37:46 CEST] <furq> replace 750 with fps * 30
[04:37:47 CEST] <spirou> shouldn't the -ss 10 be before the -i in that?
[04:37:57 CEST] <furq> it can be before or after
[04:38:03 CEST] <furq> although you don't need it if you use select
[04:38:28 CEST] <furq> or -vframes
[04:38:38 CEST] <spirou> aha
[04:39:48 CEST] <furq> er
[04:39:58 CEST] <furq> select='lt(mod(n\,750)\,10)'
[04:40:34 CEST] <furq> will select the first 10 frames of every 750
[04:40:39 CEST] <PacketPusha> Interesting, I'll test this examples out
[04:40:59 CEST] <PacketPusha> Is there a way to do it based on time?
[04:41:10 CEST] <furq> n is frames, t is time
[04:41:22 CEST] <PacketPusha> Since I don't control the video sources and their fps
[04:41:28 CEST] <PacketPusha> Ohh, so it does
[04:41:45 CEST] <furq> that won't work with time if you want 10 frames though
[04:42:13 CEST] <furq> there's probably some more-complicated select invocation which will do it
[04:43:38 CEST] <snakeryslug> part
[04:47:51 CEST] <furq> actually
[04:48:20 CEST] <furq> select='between(mod(n\,750)\,251,260)'
[04:48:20 CEST] <Xen0_> j
[04:48:33 CEST] <furq> will skip the first 10 seconds as well
[04:48:54 CEST] <furq> you're probably better off just getting the framerate with ffprobe
[04:55:34 CEST] <PacketPusha> ffprobe?
[04:55:58 CEST] <PacketPusha> Oh, I see
[04:56:03 CEST] <PacketPusha> And then using that info?
[04:56:08 CEST] <PacketPusha> *use
[04:58:08 CEST] <furq> ffprobe -v error -of csv -select_streams v:0 -show_entries stream=r_frame_rate foo.mkv | cut -d, -f2
[04:58:30 CEST] <furq> and then yeah just use that * 30
[05:02:49 CEST] <damontoo> I'm trying to stream video from a pi camera module (h264) using ffserver to stream (webm) but I haven't been able to find anything that works. I sort of got it working but with FPS at less than 2, and latency around like 20 seconds. Any idea how to do this correctly?
[05:03:22 CEST] <furq> ffserver isn't very good, and also i doubt the rpi will be able to encode vp8 or vp9 at >2fps
[05:03:44 CEST] <damontoo> hmm
[05:04:01 CEST] <furq> the rpi does have a hardware h.264 encoder but you can't use it from ffmpeg
[05:04:04 CEST] <furq> you can use it from gstreamer
[05:04:22 CEST] <damontoo> I was usiung raspivid and piping the output into ffmpeg
[05:04:36 CEST] <damontoo> using*
[05:05:25 CEST] <furq> that works, but the webm transcode will be running on the cpu which is hopeless
[05:05:46 CEST] <furq> i'd probably pipe it into ffmpeg and have it send the h.264 stream to an rtmp or rtsp server or something similar
[05:05:47 CEST] <damontoo> so is vp8/9 much more intensive than say, h264 to an mjpeg stream?
[05:06:03 CEST] <furq> libvpx is much slower than x264
[05:06:09 CEST] <damontoo> because mjpeg people get pretty high fps. Like 15-30
[05:06:11 CEST] <furq> but i wouldn't do x264 encoding on the rpi if i could avoid it
[05:06:48 CEST] <furq> stick with the hardware encoder or just send a raw stream to a machine which can encode it properly
[05:07:28 CEST] <duncan_donuts> Hi, I am trying to use the hash muxer, but am getting not a suitable format error
[05:07:42 CEST] <duncan_donuts> md5 muxer works though
[05:07:50 CEST] <duncan_donuts> version 2.7.2 Ubuntu server
[05:07:54 CEST] <duncan_donuts> Any clues?
[05:08:06 CEST] <damontoo> Can't. This is for a remote ipcam with opencv integration. Which people have working with < 150ms latency and fairly good FPS.. but by using rtsp/netcat so it doesn't stream to a browser
[05:08:58 CEST] <furq> duncan_donuts: i think hash was added since 2.7.2
[05:09:23 CEST] <furq> damontoo: if you need browser support then rtmp might work for you
[05:09:28 CEST] <furq> you'll need flash though
[05:10:05 CEST] <furq> https://github.com/arut/nginx-rtmp-module
[05:10:08 CEST] <furq> that's a good free rtmp server
[05:10:45 CEST] <damontoo> I was trying to avoid plugins hoping for something that worked with HTML5, which is why I wanted webm. Buuut, I guess flash is acceptable. Why can't flash just die. :\
[05:11:07 CEST] <furq> well that module will also do hls and dash, but those introduce a lot of latency
[05:11:28 CEST] <furq> if you need <5sec latency then those are pretty much worthless
[05:11:43 CEST] <damontoo> hell no. I'm fine at like < 500ms
[05:11:47 CEST] <furq> and you'll need a lot of tuning to get it close to 5 seconds
[05:11:58 CEST] <damontoo> oooh
[05:12:01 CEST] <damontoo> 5 seconds
[05:12:04 CEST] <furq> yeah
[05:12:24 CEST] <furq> i've never really needed <10sec latency so maybe it's possible to tune them lower
[05:12:33 CEST] <furq> but they're always going to be worse than a proper streaming protocol
[05:13:33 CEST] <damontoo> yeah the latency isn't as bad as the frame rate. OpenCV will be reading license plates and tracking speed so better framerates are needed more
[05:14:13 CEST] <damontoo> I've seen demos of OpenALPR running on the pi and it works well
[05:14:20 CEST] <furq> well i assume raspivid uses the hardware encoder, so the framerate should be ok
[05:14:39 CEST] <furq> you'd just pipe the output to ffmpeg and have it send it directly to the server without transcoding
[05:14:48 CEST] <furq> or use gstreamer directly
[05:15:34 CEST] <damontoo> mmk. Thanks. I'll research those options
[05:16:15 CEST] <furq> html5 streaming is still a mess
[05:20:09 CEST] <duncan_donuts> furq: ok thanks, that would certainly explain it
[05:20:23 CEST] <furq> duncan_donuts: http://johnvansickle.com/ffmpeg/
[05:21:11 CEST] <duncan_donuts> furq: brilliant, thanks!
[05:34:55 CEST] <Threads> found encoding_tool changes writing application was wondering do you have one for writing library
[06:08:43 CEST] <ferdna> helo... i am in need of help
[06:09:53 CEST] <ferdna> i need to stream a webcam to several computers
[06:10:06 CEST] <ferdna> the webcam supports rtsp
[06:45:35 CEST] <PacketPusha> furq:
[06:45:39 CEST] <PacketPusha> ffmpeg -y -threads 8 -i "video.mp4" -an -sn -vsync 0 -vf  select='lt(mod(n\,'$(( 30 * (`ffprobe -v error -of csv -select_streams v:0 -show_entries stream=r_frame_rate video.mp4 | cut -d, -f2`)))')\,10)' -s 854x480 -vcodec mjpeg -pix_fmt yuvj420p -b:v 2000 -bt 20M "test_%d.jpg"
[06:47:41 CEST] <PacketPusha> Thanks again, that worked
[06:48:57 CEST] <ferdna> good night
[07:22:25 CEST] <johnnny22-afk> what's the best way to convert pgmyuv to jpeg ?
[10:32:12 CEST] <realies> I wonder why I get multiple containers when ffprobing a clip... Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '\server\media\amb.mp4':
[10:32:35 CEST] <realies> does that mean that the file has multiple wrappers on it?
[10:42:10 CEST] <furq> realies: https://www.ffmpeg.org/ffmpeg-formats.html#mov_002fmp4_002f3gp_002fQuickTime
[10:42:21 CEST] <furq> those are all different names for the same container
[10:42:54 CEST] <realies> furq, thanks
[11:04:09 CEST] <yzT> what's really the Common Encryption (CENC)? I know it's a standard for working with different DRM systems, but what is it really is? An independent server which handles the requests? Or something more "transparent" like the EME and MSE in HTML5
[11:09:45 CEST] <JEEB> it's a way of having your proprietary field in the manifest for how you handle the keycrap (and the w3c clearkey one which can have just the URL to the key), and a standard way of handling the encryption of the streams
[11:10:08 CEST] <JEEB> that way you can share the key between DRM systems and just have the metadata for each of them in the manifest
[11:10:49 CEST] <JEEB> it specifically doesn't specify how you handle the key stuff, each system handles that by themselves from the metadata provided in the manifest (and sometimes in the ISOBMFF segments)
[11:11:26 CEST] <yzT> but, where it is processed? in the same server which serves the manifest?
[11:11:31 CEST] <yzT> or is it something different
[11:11:33 CEST] <Snoo20664> ot
[11:11:41 CEST] <Snoo20664> it's normally on a diff server
[11:11:53 CEST] <Snoo20664> but the manifest/m3u8 points to the key directly
[11:11:56 CEST] <JEEB> CENC doesn't specify anything related to that
[11:12:09 CEST] <JEEB> it just specifies the way different systems can get their information
[11:12:12 CEST] <JEEB> from the manifest
[11:12:42 CEST] <JEEB> CENC is just the spec for how the DASH side of things is handled
[11:14:36 CEST] <yzT> so, in the connection workflow (starting from a user point of view), the CENC is done before the user retrieves the key, right?
[11:19:33 CEST] <yzT> what do you think of this diagram --> http://i68.tinypic.com/157nrjs.png
[14:49:16 CEST] <TheCycoONE> question about the av_dup_packet deprecation. After av_read_stream is it necessary to call av_packet_ref (where we were calling av_dup_packet).
[15:03:40 CEST] <TheCycoONE> or I guess -- when is pkt->buff NULL after av_read_frame
[15:04:04 CEST] <DHE> I see no such function in my copy of ffmpeg (based on git)
[15:04:10 CEST] <DHE> that is av_read_stream
[15:04:56 CEST] <TheCycoONE> s/stream/frame
[15:05:02 CEST] <TheCycoONE> sorry
[15:06:52 CEST] <DHE> once you have an AVPacket from av_read_frame it's yours. you would use av_packet_ref if you need a second independent copy of the packet. internally av_packet_ref uses an atomic reference counting system where possible
[15:07:53 CEST] <TheCycoONE> ok, I was worried about "If pkt->buf is NULL, then the packet is valid until the next av_read_frame() or until avformat_close_input()."
[15:08:16 CEST] <TheCycoONE> I know the old av_dup_packet was specifically to create a buffer when it was null, presumably to handle that case.
[15:26:07 CEST] <TheCycoONE> DHE, is that true even if I'm queuing the packet potentially doing more calls to av_read_frame before it's decoded?
[15:26:54 CEST] <TheCycoONE> or should I treat that as a new reference and unref both now
[15:27:40 CEST] <TheCycoONE> https://github.com/CorsixTH/CorsixTH/blob/master/CorsixTH/Src/th_movie.cpp#L324 if you want code
[15:28:05 CEST] <TheCycoONE> ^ is called from https://github.com/CorsixTH/CorsixTH/blob/master/CorsixTH/Src/th_movie.cpp#L740
[15:29:26 CEST] <DHE> TheCycoONE: the packet is yours once it comes out of av_read_frame. it's up to you to unref and/or free it (as the case may be) when you're done with it
[15:30:21 CEST] <TheCycoONE> DHE, what does that note in the av_read_frame documentation about being valid until the next av_read_frame or avformat_close_input mean?
[16:01:09 CEST] <DHE> TheCycoONE: I admit I'm still writing my first app myself. I'd want to double-check the specifics
[16:51:32 CEST] <TheCycoONE> DHE, ah ok
[16:51:54 CEST] <TheCycoONE> I'll double check everything with valgrind
[18:21:15 CEST] <momomo> what do you think would be the best approach to push in advertisement into a hls stream ?
[18:22:06 CEST] <momomo> i am thinking of manipulating the playlist but that would require me to do so all the time .. and update the media sequence field
[18:22:12 CEST] <momomo> for all future playlists
[20:55:34 CEST] <onezuff> trying to shorten videos by shaving one second off the end
[20:55:49 CEST] <onezuff> ffmpeg -ss 01 -i clip.mp4 -vcodec copy -acodec copy shoter.mp4 is making videos of the same length. how can i shave off just 1 second?
[20:56:14 CEST] <kepstin> onezuff: that would shave 1 second off the start (if it worked)
[20:56:36 CEST] <kepstin> note that -ss isn't very accurate when using copy mode, because it has to start on a keyframe.
[20:56:38 CEST] <onezuff> video is still coming out the same length, any ideas?
[20:57:04 CEST] <kepstin> if you want to cut off the end of the video, use -t with a time 1s shorter than the video length - that *will* work in copy mode
[20:57:27 CEST] <onezuff> is there a way to do this without calculating all the video lengths upfront?
[20:57:29 CEST] <onezuff> :(
[20:58:01 CEST] <kepstin> nope, but you can use e.g. 'ffprobe' to get the video length and script it.
[20:58:15 CEST] <onezuff> well thats a relief at least lol
[21:00:03 CEST] <onezuff> 239.552000 O___O
[21:01:26 CEST] <onezuff> kepstin, if i shave it from the front will that just be easier?
[21:01:47 CEST] <kepstin> shaving off the front will require re-encoding, unless there happens to be a keyframe in the right spot
[21:02:09 CEST] <onezuff> my scripting skills are not good, dang
[21:02:24 CEST] <kepstin> that's why it didn't seem to work when you tried it - it started at the closest keyframe before the time you requested, which just happened to be the start of the video.
[21:03:17 CEST] <onezuff> found a flag that made the time readable - 0:03:59
[21:03:18 CEST] <kepstin> if you're ok with re-encoding, you can easily trim off the start with precision.
[21:03:33 CEST] <onezuff> i dont want to re-encode, lots and lots of videos
[21:03:50 CEST] <kepstin> well, if you're scripting, you want the machine-readable time rather than human-readable :)
[21:04:00 CEST] <onezuff> oh i see
[21:04:45 CEST] <kepstin> that way you just take the '239.552000', which is a time in seconds, subtrack 1, and then use '-t 238.552' as an option to ffmpeg.
[21:05:19 CEST] <onezuff> i know this probably painfully simple but if i can figure this out i have just saved about 30 hours of work
[21:05:33 CEST] <onezuff> i have over 500 videos i need to run this on
[21:05:39 CEST] <onezuff> lol
[21:08:31 CEST] <onezuff> for some reason its shaving 10 seconds off with that
[21:16:26 CEST] <DHE> When converting surround sound to stereo, I find the volume to be rather low. Besides inserting a volume filter, is there something that can help? I'm using the swr_convert() API. Everything is working fine otherwise
[21:21:58 CEST] <zamba> i need help with a/v sync issues when capturing from a capture card and alsa
[21:22:04 CEST] <t4nk869> hey guys can anyone help me to export all frames (without knowing framerate) in a lossless format (bmp)?
[21:22:28 CEST] <zamba> [alsa @ 0x500f840] ALSA buffer xrun
[21:22:33 CEST] <zamba> Past duration 0.665962 too large
[21:22:44 CEST] <zamba> are just some of the errors i'm getting
[21:23:27 CEST] <kepstin> t4nk869: https://www.ffmpeg.org/ffmpeg-formats.html#image2-2
[21:24:07 CEST] <kepstin> if you don't include any -r or -frames options, it'll just do all frames.
[21:25:19 CEST] <t4nk869> kepstin thank you but what about format I just add .bmp instead of .jpg?
[21:25:29 CEST] <kepstin> yeah
[21:25:49 CEST] <t4nk869> nice :) I will try it now
[21:29:41 CEST] <t4nk869> I think something is wrong, it skips frames
[21:29:43 CEST] <t4nk869> frame=  396 fps= 13 q=-0.0 size=N/A time=00:00:16.51 bitrate=N/A speed=0.528x   frame=  403 fps= 13 q=-0.0 size=N/A time=00:00:16.80 bitrate=N/A speed=0.525x
[21:30:54 CEST] <t4nk869> this is the command I used ffmpeg -i "source.mkv" "img\'bmp-%03d.bmp"
[21:35:07 CEST] <geermain> Hi everyone, i've recently heard about framemd5, and I was trying to get some resources on how a frame checksum was computed. Anyone has relevant links about that? Thanks!
[21:35:13 CEST] <geermain> http://ffmpeg.org/ffmpeg-formats.html#framemd5
[21:39:08 CEST] <Synal> Hi, is there a way of making ffmpeg continue a job that stoped mid way through from a previous time?
[21:39:43 CEST] <kepstin> geermain: see the 'framehash' docs that are referenced there. It basically just takes the raw format audio/video and does a hash over the buffer.
[21:40:47 CEST] <kepstin> (or if you manually specify a codec, it'll do the encoded packets of the codec instead...)
[21:41:27 CEST] <t4nk869> kepstin sorry to bother you but I tried many options but it always skips frames
[21:41:57 CEST] <llogan> Synal: if you mean stopped by suspending it in linux, then just run "fg" to unsuspend and return to foreground
[21:42:03 CEST] <kepstin> t4nk869: what do you mean, skips frames? what's the ffmpeg output you see?
[21:42:21 CEST] <t4nk869> frame=  396 fps= 13 q=-0.0 size=N/A time=00:00:16.51 bitrate=N/A speed=0.528x   frame=  403 fps= 13 q=-0.0 size=N/A time=00:00:16.80 bitrate=N/A speed=0.525x
[21:42:32 CEST] <t4nk869> as you see it says frame 396 and then frame 403
[21:42:39 CEST] <geermain> Thanks @kepstin i'll have a look
[21:42:46 CEST] <Synal> llogan: No, I mean it was set to encode a load of files, but my system rebooted. Is it possible to continue ffmpeg from where it left off?
[21:43:00 CEST] <kepstin> t4nk869: that line doesn't update every frame, that's normal.
[21:43:06 CEST] <llogan> Synal: you didn't specifiy, so I guessed.
[21:43:18 CEST] <Synal> llogan: its alright, I should have been clearer
[21:43:21 CEST] <t4nk869> kepstin oh I see, thank you
[21:43:33 CEST] <llogan> Synal: unfortunately, the answer is probably "no"
[21:44:22 CEST] <Synal> llogan: okay, thanks for the help. Looks like I'm leaving my machine running overnight tonight then :)
[21:53:00 CEST] <llogan> Synal: was it a bash for loop or something? or just one long encoding?
[21:53:38 CEST] <nadermx> Can I run a double pass to update the empty moov_atoms
[21:53:53 CEST] <Synal> It was a bash for loop
[21:59:57 CEST] <llogan> i suppose you can remove the finished files and then re-run it. make sure the file that it was halted on is redone because the output will be incomplete or corrupted
[22:03:52 CEST] <Synal> llogan: Yeah, I'm thinking of doing that.
[22:09:38 CEST] <benlieb> I'm making videos for distribution online. What is the most common video/audio format?
[22:09:44 CEST] <benlieb> I'm not a pro...
[22:11:32 CEST] <benlieb> I run a dance education website. Dance instructors that want me to host their older DVDs in digital format send me DVDs. When importing dvds with handbreak, the audio is AAC (core audio) is this common? Will it run on most setups?
[22:16:09 CEST] <TheCycoONE> handbreak picks reasonable defaults, aac is common.
[22:16:30 CEST] <TheCycoONE> I assume you picked the web profile
[22:17:22 CEST] <kepstin> benlieb: yeah, the format that you'll want to use for best compatibility is aac audio, h.264 video in an mp4 file.
[22:18:52 CEST] <benlieb> It's also by default using an m4v extension. FOLLOWERSSPECIAL.m4v but says format will be mp4
[22:19:00 CEST] <benlieb> should I change the extension to mp4?
[22:20:28 CEST] <kepstin> doesn't really matter, but I think mp4 is probably more common?
[22:22:06 CEST] <TheCycoONE> your other option is to upload to youtube and embed the youtube video - then they take care of all the transcoding
[22:22:25 CEST] <TheCycoONE> and selecting appropriate formats for whoever is watching
[22:22:48 CEST] <mike_> hello everyone
[22:23:11 CEST] <Guest20457> can someone help with ffmpeg to ffserver streaming?
[22:23:25 CEST] <Guest20457> unable to get the hang of it
[22:24:10 CEST] <Guest20457> should the video codec off ffmpeg be the same in ffserver?
[22:25:00 CEST] <JEEB> unless you think you can become an ffserver maintainer, run away from it from it
[22:25:08 CEST] <JEEB> there are actual streaming servers
[22:25:16 CEST] <JEEB> and ffmpeg itself can be used for a lot
[22:26:05 CEST] <Guest20457> i know , just playing around with it , i need to build my own streaming server , could it be that hard :D
[22:26:31 CEST] <Mavrik> ...
[22:26:44 CEST] <JEEB> ffserver will literally get removed unless someone actually wants to maintain it and bring it to the 21st century
[22:26:53 CEST] <JEEB> because it's full of ugly
[22:27:00 CEST] <JEEB> and nobody knows it
[22:27:29 CEST] <Guest20457> what i am trying to do is the following, stream raw video from webcam , from 1slow pc ( hence i wont do transcoding in it ) , recieve via ffserver
[22:27:40 CEST] <Guest20457> mmm , so this is only for ffmpeg you mean?
[22:27:59 CEST] <Guest20457> and you do not advice to use ffserver?
[22:28:15 CEST] <JEEB> yes, unless you want to actually start being a maintainer for ffserver, keep away
[22:28:34 CEST] <Guest20457> ahan , got it, thank you will keep that in mind
[22:28:36 CEST] <JEEB> use icecast or nginx-rtmp or many of the other open source things
[22:28:53 CEST] <JEEB> you can feed them with ffmpeg
[22:29:06 CEST] <Guest20457> yes, but can they  do the same as ffserver?
[22:29:18 CEST] <JEEB> depends on what exactly you want from ffserver
[22:29:29 CEST] <Guest20457> i tried nginx-rtmp , but i want different thing
[22:30:00 CEST] <JEEB> I mean, you can also just push stuff out from the slow machine, take it in with ffmpeg or something else and transcode it, and then feed it to whatever streaming server or spew it out with just ffmpeg
[22:31:08 CEST] <Guest20457> i have 6 computers, slow ones, each have 2 capture cards, i want to stream them to a server where all the stranscoding stuff happens and then publish them to wherever, after that i can use either nginx-rtmp and flowplayer
[22:31:52 CEST] <Guest20457> ok , so ffmpeg will take the raw input, transcode and re-stream you mean?
[22:32:20 CEST] <Guest20457> so rather then running streams inside ffserver i can just use several ffmpeg instances
[22:34:01 CEST] <Guest20457> can you guide me to a website or a book to learn more about this?
[22:34:22 CEST] <Guest20457> with examples of streaming raw and  re-streaming
[22:48:30 CEST] <Guest20457> hi again
[22:49:15 CEST] <Guest20457> can anyone point me to the right direction to stream uncompressed codec from ffmpeg to ffmpeg using udp
[22:49:38 CEST] <Guest20457> and what codecs are supported for that
[22:50:01 CEST] <BtbN> you don't want to stream uncompressed video
[22:50:23 CEST] <BtbN> that can easily overwhelm even a gigabit link.
[22:50:24 CEST] <Guest20457> it will be on local net
[22:50:32 CEST] <Guest20457> no multicast just uni
[22:50:50 CEST] <BtbN> So? More than 1 Gbit/s is still too much.
[22:51:06 CEST] <BtbN> unless you happen to have a 10GbE network
[22:51:17 CEST] <Guest20457> i have no choice , will have to adjust the max speed somehow
[22:51:31 CEST] <BtbN> why would you have no choice?
[22:51:55 CEST] <BtbN> to me this sounds like you are looking for a lossless codec, not uncompressed frames.
[22:51:57 CEST] <Guest20457> nop , 1GB wired , but the reason i am doing this cause the source of stream is a slow cpu
[22:52:01 CEST] <Mavrik> I very much doubt you have a network capable of eating several raw video streams.
[22:52:11 CEST] <Mavrik> And network gear that can saturate 1GB ports.
[22:52:19 CEST] <Guest20457> mmm
[22:53:17 CEST] <Guest20457> yes al pcs have 1gb ports
[22:53:53 CEST] <Guest20457> besides , i could manage to restrict ffmpeg data flow using some parameters right?
[22:54:20 CEST] <Guest20457> anyway , what codec supports transport stream
[22:55:09 CEST] <BtbN> how would you restrict the data flow? uncompressed is uncompressed. Nothing to adjust, it has the bandwidth it has.
[22:55:37 CEST] <Guest20457> yep its 400Kps
[22:55:44 CEST] <Guest20457> its a usb low end tv tuner
[22:55:51 CEST] <BtbN> 400Kbps?
[22:55:57 CEST] <Guest20457> and each pc has 2
[22:56:20 CEST] <BtbN> an uncompressed 720p60 stream is already over 1GBit/s
[22:56:43 CEST] <Mavrik> Yeah, 1Gbit won't do.
[22:56:49 CEST] <Mavrik> Don't stream uncompressed.
[22:56:52 CEST] <Mavrik> Just... don't.
[22:57:06 CEST] <BtbN> And if it's a TV tuner, you get an encoded stream as input anyway, so why don't just send that?
[22:57:14 CEST] <Guest20457> yes ur probably right
[22:58:01 CEST] <Guest20457> it says bgr24
[22:58:07 CEST] <Guest20457> isint that rawvideo
[22:58:49 CEST] <TD-Linux> a TV tuner stream will fit over gigabit fine
[22:59:01 CEST] <Mavrik> Maybe.
[22:59:32 CEST] <TD-Linux> it has to fit over USB 2.0 :)
[22:59:46 CEST] <Mavrik> So?
[22:59:55 CEST] <Mavrik> It's still a silly thing to do.
[22:59:57 CEST] <Guest20457> ill try to encode to something that wont eat much cpu , and get streamed quicly, since in both case i cannot use uncompressed streames for all the inputs
[23:00:04 CEST] <TD-Linux> not really. why bother compressing if you don't have to
[23:00:16 CEST] <Mavrik> Especially since on even an enterprise 10Gbit network you'll have issues with latency when you saturate it enough.
[23:00:24 CEST] <Mavrik> Just... don't.
[23:00:34 CEST] <Mavrik> Keep network utilization low to keep streaming working.
[23:00:39 CEST] <Mavrik> Use a cheap losless compression.
[23:00:48 CEST] <Mavrik> It'll make life easier on all sides.
[23:00:51 CEST] <BtbN> TD-Linux, not if you decode it first...
[23:01:05 CEST] <TD-Linux> lossless doesn't provide any guarantees about maximum bandwidth so it's not super useful here
[23:01:19 CEST] <TD-Linux> BtbN, right but USB TV tuners output uncompressed 4:2:2 usually
[23:01:21 CEST] <Guest20457> thats what i though TD-Linux, but for the long run Mavrik is right, since i have 6 pcs with 2 tv tuner each, would need a 1GB port on destination server for each pc, wish i dont have :D
[23:01:22 CEST] <BtbN> lossless won't ever saturate a gigabit link
[23:01:33 CEST] <BtbN> TD-Linux, USB TV tuners output mpegts with h264/mpeg2 usualy.
[23:01:46 CEST] <TD-Linux> maybe a HD TV tuner
[23:01:49 CEST] <TD-Linux> I guess that wasn't specified
[23:01:53 CEST] Action: TD-Linux assumed analog tv
[23:02:05 CEST] <BtbN> I have never heard of an analog usb tuner
[23:02:12 CEST] <TD-Linux> wat
[23:02:13 CEST] <Mavrik> You do a lot of assumptions and then you have a problem with losless not providing guarantees? :P
[23:02:26 CEST] <Guest20457> no , its a cheap empia tv tuner
[23:02:28 CEST] <Mavrik> BtbN, I think he means SD DVB
[23:02:31 CEST] <Mavrik> or ATSC
[23:02:36 CEST] <TD-Linux> um no I mean NTSC
[23:02:39 CEST] <Mavrik> Since analog TV is dead.
[23:02:40 CEST] <TD-Linux> or PAL
[23:02:54 CEST] <Mavrik> And kinda irrelevant for last few years.
[23:03:12 CEST] <BtbN> Even with SD DVB, you get encoded mpeg2 video and some eqaually ancient audio codec
[23:03:12 CEST] <Guest20457> yes its dead, but i live in Lebanon and thats the only way to re-stream local channels
[23:04:02 CEST] <Guest20457> the hardware will definetly get upgraded once the design is in place, and i get the hand of ffmpeg at least the basics
[23:04:09 CEST] <Mavrik> Guest20457, anyway, I'd do "ffmpeg -i <grab parameters> -codec:v libx264 -qp 0 -preset ultrafast -f mpegts udp://<target machine>:<target port>" to stream losless h.264
[23:04:24 CEST] <Mavrik> and then grab the input on the other machine with ffmpeg -i udp://127.0.0.1:<port> ...
[23:04:39 CEST] <Guest20457> Yes thats the best option for now , thank you
[23:04:43 CEST] <Mavrik> Mix in some audio params and should be good enough
[23:04:47 CEST] <BtbN> shouldn't it be 0.0.0.0:port?
[23:04:54 CEST] <Guest20457> it can
[23:04:56 CEST] <Mavrik> Yes, 0.0.0.0 or ip
[23:04:58 CEST] <Mavrik> sorry :)
[23:05:03 CEST] <Guest20457> :D
[23:05:10 CEST] <Guest20457> thanks , already got it
[23:05:11 CEST] <Mavrik> Anyway, we use UDP/MPEG-TS transport alot across datacenters and works well
[23:05:17 CEST] <Mavrik> If your network works well of course.
[23:06:36 CEST] <Guest20457> sure, its a local network, lets worry about output streams once i get this working, but its no big issue, a good server for encoding and a good internet uplink will do the job
[23:07:03 CEST] <Guest20457> anyway, thank you all for your help
[23:07:17 CEST] <Guest20457> will definitly come back for more :P
[00:00:00 CEST] --- Tue Apr 19 2016


More information about the Ffmpeg-devel-irc mailing list