ffmpeg

How to take metadata from .mp3 file and put it to a video as a text using FFmpeg?

百般思念 提交于 2021-01-29 11:23:01
问题 In my previously opened topic: How to make FFmpeg automatically inject mp3 audio tracks in the single cycled muted video I've got detailed explanation from @llogan how to broadcast looped short muted video on youtube automatically injecting audio tracks in it without interrupting a translation. I plan to enhance the flow and the next question I faced with is how to dynamically put an additional text to the broadcast. Prerequisites: youtube broadcast is up and running by ffmpeg short 3 min

Conversion from mjpeg to mp4 (libx264) with FFmpeg

那年仲夏 提交于 2021-01-29 10:56:57
问题 If you convert from mjpeg to mp4 (libx264) with FFmpeg, Playback can not be performed on Windows · Mac. Thumbnails are not displayed on the icon. However, with the HTML5 Video tag, playback is possible. Why? Please tell me if you understand. Thank you. ffmpeg -i source_file.mov -b 4000k -vcodec libx264 destination_file.mp4 回答1: The usual reason for this is the pixel format. The MJPEG may have 4:2:2 or 4:4:4 chroma sampling which most players don't support in H264. So try ffmpeg -i source_file

ffmpeg being inprecise when trimming mp3 files

▼魔方 西西 提交于 2021-01-29 10:32:04
问题 I want to use ffmpeg to trim some mp3s without re-encoding. The command I used was ffmpeg -i "inputfile.mp3" -t 00:00:12.414 -c copy out.mp3 However, out.mp3 has a length of 12.460s, and when I load the file in Audacity I can see that it was cut at the wrong spot, and not at 12.414s. Why is this? I googled a bit and tried some other commands like ffmpeg -i "inputfile.mp3" -ss 0 -to 00:00:12.414 -c copy out.mp3 (which interestingly results in a different length of 12.434s) but could never get

Dynamically Inject ID3 in FFMPEG Live Stream

荒凉一梦 提交于 2021-01-29 10:15:39
问题 I am trying to find out if there is a way with FFMPEG to dynamically inject ID3 tags during live streaming. Basically I use FFMPEG to stream a live HLS stream from a video device, while another piece of software is generating events that need to be synced up in the front-end player. I want to be able to have the event generating software encode the event in the live stream, so I know that the event is synced up with the video. 来源: https://stackoverflow.com/questions/54862783/dynamically

How to access builtin webcam from a docker container using ffmpeg?

守給你的承諾、 提交于 2021-01-29 09:30:47
问题 I have wrote my code that captures videos by my builtin webcam of my MAC using ffmpeg . On local machine, the code works fine. However, I built a docker container of my code, and tried to run it, but I got the following error: error: Command failed: ffmpeg -f avfoundation -framerate 30 -i "0" -target pal-vcd -vf scale=640x480 -flags +global_header -f segment -segment_time 10 -segment_list ../out.csv -segment_format_options movflags=+faststart -reset_timestamps 1 -strftime 1 %Y%m%d-%H%M%S.mp4

How to drawtext colon with localtime in ffmpeg -filter_complex?

回眸只為那壹抹淺笑 提交于 2021-01-29 09:26:54
问题 ffmpeg -i in.mp4 -filter_complex "drawtext='fontfile=font.ttf : text=%{localtime\:%Y/%m/%d %H%M%S} : fontsize=24 : fontcolor=white : x=10: y=10'" out.mp4 works. ffmpeg -i in.mp4 -filter_complex "drawtext='fontfile=font.ttf : text=%{localtime\:%Y/%m/%d %H\:%M\:%S} : fontsize=24 : fontcolor=white : x=10: y=10'" out.mp4 returns %{localtime} requires at most 1 arguments error. the only difference is \: 回答1: You can use: %{localtime\:%Y/%m/%d %H\\\\\:%M\\\\\:%S} It's ugly. See FFmpeg: Quoting &

ffmpeg amerge Error while filtering: Cannot allocate memory

泪湿孤枕 提交于 2021-01-29 09:23:54
问题 This seems to be a recurring problem, as seen here: ffmpeg Error while filtering: Cannot allocate memory . I ask this only because that question has no answer. I get a memory error every time I try to use amerge to combine music and a video (with audio). I am at a loss as to how to get around this, so if there are any other command line alternatives that do the same thing (combining audio with video, merging the new audio and the current audio on the video) any suggestions would be much

FFMPEG - How to resize an image overlay?

馋奶兔 提交于 2021-01-29 09:15:04
问题 I need to resize input 3 (logo.gif) to 360x360, but using scale=360:360 just made my video quality really bad. Here's my code: ffmpeg -y -hide_banner -safe 0 -f concat -i "concat.txt" -i "overlay.png" -i "audio.mp3" -ignore_loop 0 -i "logo.gif" -filter_complex "[0]scale=3840x2160,zoompan=z='if(lte(zoom,1.0),1.25,max(1.001,zoom-0.0012))':x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':fps=20:d=200:s=1920x1080[p];[p][1]overlay, scale=1920:1080, drawtext=fontfile=Heathergreen.otf:text=TITLE':fontcolor

Adding multiple audio tracks and subtitles to dash manifest (mpd) with ffmpeg

≯℡__Kan透↙ 提交于 2021-01-29 09:01:30
问题 I'm trying to create a website to stream some videos. For each video, I extract video, audio and subtitles in 3 different folders. It happens that a video has multiple audio tracks and multiple subtitles. I did a lot of research and I don't know how to add all of them in the manifest. Right now, I use this command: ffmpeg -f webm_dash_manifest \ -i video1.mp4 -f webm_dash_manifest \ -i video2.mp4 -f webm_dash_manifest \ -i audio1.webm -f webm_dash_manifest \ -i audio2.webm -f webm_dash

ffmpeg - what is the default format for .m4a output?

自古美人都是妖i 提交于 2021-01-29 08:44:13
问题 I have two commands, one in which I specify the output format as -f mp4 : ffmpeg -i input.wav -ac 1 -c:a libfdk_aac -profile:a aac_he -vbr 2 -f mp4 test_export_1.m4a And one which lets ffmpeg guess based on the extension: ffmpeg -i input.wav -ac 1 -c:a libfdk_aac -profile:a aac_he -vbr 2 test_export_2.m4a This gives me two different results. The first one: $ffprobe test_export_1.m4a Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_export_1.m4a': Metadata: major_brand : isom minor_version : 512