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

burek burek021 at gmail.com
Fri May 10 03:05:02 EEST 2019


[02:48:34 CEST] <ekiro> I think I'm ready to batch encode a bunch of files for web streaming and I think my command is optimal but would like your input before I run it as it will takes weeks to encode all my files. I would hate to have to redo it again.
[02:48:38 CEST] <ekiro> ffmpeg -i video.mkv -c:v libx264 -tune animation -preset fast -profile:v high -crf 24 -movflags faststart -c:a aac -ac 2 -b:a 128k -vf "subtitles=subtitles.ass:fontsdir='/path/fonts'" video.mp4
[02:53:18 CEST] <DHE> is there a reason to transcode the audio?
[02:53:39 CEST] <DHE> I assume it's in a non-mp4 compatible format, but still asking to be sure
[02:54:14 CEST] <ekiro> DHE, if the audio is in AAC i just copy it, if anything else I encode it
[04:09:24 CEST] <hotquac> anybody here know about  HPET ?  should i enable it or disable it
[04:10:00 CEST] Last message repeated 1 time(s).
[05:11:00 CEST] Last message repeated 2 time(s).
[05:14:25 CEST] <another> enable it where?
[05:15:41 CEST] <kevev> Howdy!
[05:15:57 CEST] <kevev> Anyone know how to speed this up?   /root/bin/ffmpeg -re -i $WORK_DIR/$MP4_FILE -codec copy -map 0 -f segment -segment_list $WORK_DIR/$M3U8_FILE -segment_list_flags +live -segment_time 10 $WORK_DIR/out%03d.ts
[05:16:13 CEST] <kevev> It only uses one thread, which takes forever!
[05:16:15 CEST] <kevev> :)
[05:19:38 CEST] <hotquac> another on OS
[05:19:48 CEST] <kevev> huh?
[05:19:52 CEST] <hotquac> kevev  what CPU
[05:20:04 CEST] <another> kevev: should take realtime
[05:20:04 CEST] <kevev> oh hi
[05:20:14 CEST] <kevev> hotquac: DigitalOcean droplet
[05:20:31 CEST] <kevev> Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
[05:20:31 CEST] <hotquac> kevev that's not a CPU
[05:20:35 CEST] <kevev> sowwy
[05:20:43 CEST] <hotquac> oh
[05:20:46 CEST] <hotquac> xeon huh
[05:20:53 CEST] <hotquac> that has more than one thread
[05:20:55 CEST] <kevev> ya
[05:20:58 CEST] <kevev> true
[05:21:06 CEST] <another> the -re option reads the input in realtime
[05:21:21 CEST] <kevev> but from my research it seems that the -codec copy option is single threaded
[05:21:36 CEST] <hotquac> kevev what is "DigitalOcean droplet" ?
[05:21:47 CEST] <kevev> digitalocean.com
[05:21:50 CEST] <kevev> VPS provider
[05:21:55 CEST] <hotquac> oh ok
[05:22:09 CEST] <kevev> hotquac would removing -re speed this up?
[05:22:21 CEST] <hotquac> it should
[05:22:34 CEST] <another> kevev: do you have a requirement to *read* the file in realtime?
[05:22:50 CEST] <kevev> I don't think so.
[05:22:56 CEST] <another> then remove it
[05:23:02 CEST] <kevev> Just need to convert from mp4 to ts+m3u8
[05:23:04 CEST] <kevev> ok
[05:23:18 CEST] <hotquac> why do you want to convert to  ts ?
[05:24:16 CEST] <kevev> lol crap that was fast!!!
[05:24:43 CEST] <kevev> hotquac: We push rtmp feed to NGINX+rtmp plugin for transcoding live streams.
[05:24:51 CEST] <kevev> After the broadcast We want to archive.
[05:25:06 CEST] <hotquac> kevev who is "we" in this
[05:25:12 CEST] <kevev> So NGINX will record the live stream to flv file using ffmpeg.
[05:25:16 CEST] <kevev> Our company
[05:25:25 CEST] <hotquac> may i ask what company this is
[05:25:51 CEST] <kevev> I use ffmpeg to convert FLV to MP4, then segment to ts+m3u8 playlist. THis way our website will be able to play the archive. Is there a better way to do this?
[05:25:52 CEST] <hotquac> just converting to ts doesn't take long
[05:26:00 CEST] <kevev> Texas Sports Productdions.
[05:26:05 CEST] <kevev> Productions
[05:26:17 CEST] <kevev> Mostly stream high school sports.
[05:26:33 CEST] <hotquac> kevev i see; thanks for sharing that info
[05:26:59 CEST] <kevev> hotquac: Thank You for helping me. :)
[05:27:44 CEST] <hotquac> you just use youtube for archives
[05:27:58 CEST] <hotquac> your website just use youtube for archives
[05:29:12 CEST] <kevev> hotquac: Currently yes. I have an S3 Bucket setup for the new archiving. I am automating stating up stream servers+pullzones for our broadcast crews. Also automating the archiving+website linking.
[05:29:14 CEST] <another> you could use hls or dash for streaming
[05:29:40 CEST] <kevev> another: Yes we use hls, and live stream on our own site. Not using Youtube for live stream.
[05:30:34 CEST] <another> the segment muxer can also do some hls stuff
[05:30:45 CEST] <another> if that helps
[05:32:24 CEST] <kevev> another: Yes I can do multiple bitrate. THat will be next step.  :)
[05:32:59 CEST] <kevev> We do multi-bitrate for live stream, but not archive.
[05:33:34 CEST] <another> ay
[05:34:47 CEST] <furq> kevev: i'm not sure why you need the mp4 intermediate step
[05:35:20 CEST] <kevev> furq: orly? What's the shortcut?
[05:35:34 CEST] <furq> you should just be able to go straight from flv to hls
[05:35:41 CEST] <kevev> cool!
[05:35:49 CEST] <kevev> What would that command look like?
[05:36:09 CEST] <another> ffmpeg -i foo.flv -c copy ....
[05:36:15 CEST] <furq> the same as the command you have for mp4 to hls
[05:36:21 CEST] <kevev> sweet! I will try now.
[05:36:41 CEST] <hotquac> furq that might break the video though
[05:37:05 CEST] <another> how so?
[05:37:17 CEST] <hotquac> i had issues before
[05:38:11 CEST] <furq> pretty much any service that takes rtmp ingest and serves hls is doing this exact workflow
[05:38:15 CEST] <furq> so youtube, twitch, facebook etc
[05:40:43 CEST] <kevev> So....bad idea?
[05:44:58 CEST] <kevev> Test seemed to work.
[05:45:02 CEST] <kevev> Thanks guys!
[05:45:43 CEST] <hotquac> anybody here know about  HPET ?  should i enable it or disable it
[06:41:14 CEST] <genewitch> I made a timelapse at -r 0.1 and saved an mp4, i have another mp4 and i am trying to concat them, but the realtime video is running at 1/10th speed, so instead of 33 minutes long it's 4.5 hours long. what am i doin wrong?
[06:42:03 CEST] <genewitch> the command line to write the final file is ffmpeg -f concat -i finalfiles.txt -c copy storm_dashcam_final.MP4 # with finalfiles.txt just having the timelapse and the realtime video filenames
[06:43:54 CEST] <genewitch> to make the timelapse i used: ffmpeg -i storm_dashcam-timelapse_source.MP4 -r 0.1 -f image2 imgtmp/%06d.png && ffmpeg -i imgtmp/%06d.png storm_dashcam-timelapse_final.MP4
[06:59:45 CEST] <genewitch> the codec information in VLC shows the timelapse playing at ~3.8fps, and the realtime is 30fps, and when they're concatenated the whole thing plays at 3.8fps, is this because of the container?
[07:06:12 CEST] <furq> genewitch: not sure why vlc is saying 3.8fps, that command should produce 25fps output
[07:06:23 CEST] <furq> either way you'll probably need to reencode the dashcam video
[07:06:43 CEST] <furq> concatenating h264 won't work well unless the codec parameters match up
[07:07:02 CEST] <genewitch> should i export both to yuv420 (raw) or what
[07:07:21 CEST] <furq> you should be able to do it all in one command
[07:08:43 CEST] <genewitch> ffmpeg -i imgtmp/%06d.png -i storm_dashcam-realime.MP4 <-- like this?
[07:08:56 CEST] <genewitch> set -r 30 maybe
[07:49:04 CEST] <genewitch> so i re-encoded the timelapse so it shows up as 30FPS, and the realtime video is 30FPS, when i concat them, 3.8 FPS shows in VLC. Also the timelapse part in the concatenated file is showing as YUV4:4:4 and the realtime part is showing as YUV4:2:0
[13:44:46 CEST] <aiena> I  have files like this "pg-01.jpg" "pg-02.jpg" ... "pg-18.jpg" I wanted to make a video from these showing 1 image for 2 sconds each
[13:45:28 CEST] <aiena> I tried  `ffmpeg -framerate 1/2 -i "./pg-%2d.png" foo.mp4` but it errors out. I do not know howw to adapt the % thing to make it read a sequence for input.
[13:45:37 CEST] <aiena> WHat is the correct command
[13:45:54 CEST] <aiena> I am using bash. But don;t know if the % thing is an ffmpeg feature
[13:46:25 CEST] <aiena> bash on linux - ubuntu
[13:50:25 CEST] <aiena> another: Here https://pastebin.com/1UrtKfHC
[13:50:40 CEST] <aiena> I just included an "ls" statement to show u the file pattern
[13:55:09 CEST] <aiena> I do not understand why "-framerate 1/2" makes one image show for 2 seconds but I had seen it in a guide.
[13:55:48 CEST] <another> ffmpeg -framerate 1 -start_number 10 -i ./pg-%02d.png foo.mp4
[13:56:28 CEST] <another> also take a look at https://trac.ffmpeg.org/wiki/Slideshow
[15:38:58 CEST] <kepstin> if you make half a frame show every second, then that means a whole frame takes 2 seconds...
[16:39:12 CEST] <ocx32> hi all, i am transmuxing an rtmp to hls and would like to get the bandwdith/resoltuion  of the source (which is dynamic depending on the broadcasted source stream) to be written into the playlist, what flags should i use with ffmpeg
[16:39:45 CEST] <BtbN> I'm not sure if the HLS muxer supports that
[16:40:35 CEST] <ocx32> any workaround around that?
[16:40:43 CEST] <DHE> it can do resolution, and it looks like some limited bitrate options
[16:41:37 CEST] <ocx32> DHE: getting the source resolution would be enough,  what would be the command/flags?
[16:42:00 CEST] <BtbN> It can do multiple resolutions in parallel, but not one stream where it changes mid-stream, iirc
[16:42:10 CEST] <DHE> you need a master playlist. that's usually limited to scenarios where you're producing multiple variants, like 1080p and 480p. if you're "transmuxing", you're not.
[16:42:45 CEST] <ocx32> i am transmuxing into 1 profile
[16:43:55 CEST] <DHE> then you don't really need a master playlist. if you really really want one, you'll need a -master_pl_name parameter
[16:43:56 CEST] <ocx32> no transcoding
[16:44:26 CEST] <ocx32> DHE: exactly, what i want mainly is to wrtie a playlist that would have the resolution of the rtmp, that would be needed by the player
[16:44:49 CEST] <BtbN> I'm not 100% sure, but I really don't think HLS is up to that, at least not the implementation in FFmpeg
[16:44:57 CEST] <DHE> the player doesn't NEED it, especially for a single variant.
[16:45:12 CEST] <BtbN> Well, if the single variant changes res/bitrate/... at runtime, it kinda does
[16:45:20 CEST] <ocx32> yea
[16:45:27 CEST] <DHE> I disagree. I've never seen a player hit the master playlist more than once.
[16:45:35 CEST] <BtbN> Which is exactly the problem
[16:45:35 CEST] <ocx32> -c:v copy -c:a copy  <output file or playlist>.m3u8 ?
[16:45:56 CEST] <ocx32> some flags should be set in between to get the source resolution as a tag
[16:46:12 CEST] <BtbN> Not supported is what I'd say
[16:46:29 CEST] <DHE> try: -master_pl_name master.m3u8
[16:46:40 CEST] <DHE> though I make no promises about how it'll turn out
[16:46:44 CEST] <BtbN> I don't think you understand the problem, DHE
[16:46:58 CEST] <BtbN> It's not multiple variants of the same stream.
[16:47:08 CEST] <DHE> the RTMP source changes stream parameters
[16:47:19 CEST] <BtbN> Yes, at random points, in the same one single stream
[16:47:43 CEST] <DHE> but from a player standpoint, I've never seen an HLS player re-read the master .m3u8 except after a catstrophic failure anyway
[16:48:06 CEST] <BtbN> Well, exactly that's the problem.
[16:48:18 CEST] <ocx32> -c:v copy -c:a copy  -master_pl_name master.m3u8 ?
[16:48:21 CEST] <DHE> indeed. this isn't a problem HLS was really intended to deal with
[16:48:45 CEST] <BtbN> Only workaround here is to transcode to uniform parameters.
[16:49:09 CEST] <ocx32> but i want to serve the source
[16:49:18 CEST] <DHE> remember, HLS was created by apple as a mobile video player. their app certification process required video players to offer something crap like 300x200 or less sources as an HLS fallback just in case
[16:49:26 CEST] <BtbN> If it randomly changes parameters mid-stream, that won't work.
[16:49:30 CEST] <BtbN> At least as HLS
[16:51:32 CEST] <ocx32> hmm how about if i am able to get the resolution/source bandwidth using some third party tools, is there a way to statically that into parameters in the playlist using ffmpeg?
[16:59:21 CEST] <ocx32> ?
[17:06:39 CEST] <DHE> parse error: verb missing after "statically"
[17:26:38 CEST] <bleb> hey. i just did ffmpeg -i in.opus out.aac
[17:26:53 CEST] <lavaflow> I have a file that ffprobe claims is 29.97 fps, but which mpv claims is actually 20.95 fps (I believe the later is correct, judging by video quality)
[17:26:54 CEST] <bleb> the .opus file was 4 hours long and now the aac file's length is messed up
[17:27:16 CEST] <bleb> like if i open it in a browser it says it's 48 hours long
[17:27:26 CEST] <lavaflow> so my question is if I use minterpolate:fps=60 on this video, will it interpolate out from 20fps or from 30fps as the starting point
[17:27:49 CEST] <bleb> it can still play but it messes up if i go past the original file length... anything i might try to fix this?
[17:29:11 CEST] <Mavrik> lavaflow: none of that
[17:29:14 CEST] <BtbN> bleb, don't use raw .aac. Use mp4 or m4a or what it's called
[17:29:18 CEST] <Mavrik> lavaflow: it'll look at actual timestamps of frames
[17:29:26 CEST] <Mavrik> (Remember, videos don't need to have constant fps
[17:29:27 CEST] <Mavrik> )
[17:30:03 CEST] <lavaflow> okay, so it should generally do the 'correct' thing in this case
[17:30:47 CEST] <lavaflow> I'll give it a try.  Wish I had some hardware that could run minterpolate fast.
[17:34:12 CEST] <lavaflow> semi-related question: is there a filter that removes back to back duplicate frames?  (within some threshold of simularity)
[17:34:54 CEST] <lavaflow> in other words if had a 30fps slideshow video that showed one new slide per second, such a filter would output a 1fps video.
[17:35:51 CEST] <lavaflow> ah mpdecimate should do it
[18:06:39 CEST] <kepstin> yes, that's exactly what mpdecimate is designed to do.
[21:49:27 CEST] <shibboleth> does ffmpeg have any nifty features re stitching together videos from diff angles?
[21:49:41 CEST] <shibboleth> i'm not expecting a panorama that'll fool anyone
[21:51:03 CEST] <DHE> for same-resolution videos, there's the hstack and vstack filters for doing side-by-side and stacked videos
[21:51:11 CEST] <DHE> syncing the start times is on you though
[21:51:42 CEST] <shibboleth> oh, not "grid"
[21:52:24 CEST] <shibboleth> rather.. remember microsoft "photosynth"
[21:53:33 CEST] <shibboleth> say you have a building with security cameras on each four corners and you wanna mcgyver a "continuous" perimeter view
[22:10:49 CEST] <shibboleth> https://github.com/openMVG/openMVG
[22:10:51 CEST] <shibboleth> maybe
[00:00:00 CEST] --- Fri May 10 2019


More information about the Ffmpeg-devel-irc mailing list