Re: [FFmpeg-user] Video and Audio is off-sync on Decklink SDI output
Just seeing this now. If filters is the wrong solution for setting points for Decklink SDI output, what would be the correct way to do so? ~Thomas On 2/22/17, 3:39 PM, "ffmpeg-user on behalf of Carl Eugen Hoyos" wrote: 2017-02-22 23:32 GMT+01:00 Tung Tran : > * ffmpeg -i rtmp://something -vf "setpts=PTS-STARTPTS" -af > "asetpts=PTS-STARTPTS" -f decklink -pix_fmt uyvy422 "DeckLink SDI" * Complete, uncut console output missing. Why are you using filters? > Video and audio of input rtmp is synced on VLC or other software. Does the following produce a file that plays in-sync? $ ffmpeg -i rtmp://something -qscale 2 out.avi Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Need help understanding framerate conversion!
This worked! Thank you very much. On 1/13/17, 8:15 AM, "ffmpeg-user on behalf of Carles Vila" wrote: The reason that the resulting video is longer is simple: it plays slower! which is what you want (pull-down) By default, ffmpeg does nothing to the audio, so you must stretch it. The most simple solution is to resample it. Try this command line below: the -r before the input tells ffmpeg to interpret the input as 29,97. Assuming that your source audio is at 48.000 Hz, the asetrate sets a "fake" sampling rate to 47952 (stretches the audio longer by the same ratio) and after that aresample resamples back to 48000 Hz. ffmpeg -r 3/1001 -i input_30fps.mov –i initial_audio.wav -af asetrate=47952,aresample=48000 -c:v rawvideo -c:a pcm_s16le –pix_fmt uyvy422 output_2997fps_withresampledaudio.mov HTH On 13 January 2017 at 03:54, Matthias, Thomas wrote: > Hi All, > > I need to mux and then framerate convert a rawvideo .mov file, and a PCM > 16bit 48Khz wav file. > > For example, a .mov file is exactly 10 seconds long, and a .wav file is > also exactly 10 seconds. The initial .mov file is a 30 frames-per-second, > but after muxing with the audio, I need to convert it to 29.97. The issue > I’m seeing is that for some reason, the resulting video file is slightly > longer than 10 seconds, and the resulting audio is just shy of 10 seconds. > This leads to the audio being out-of-sync with the video by the end of the > video. In reality, I’m performing this task with much longer clips, and so > the av-sync issue is much more noticeable, but even at 10 seconds the sync > offset is noticeable in a video editor. > > What am I doing wrong? I’ve tried separating the muxing and framerate > conversion into separate FFmpeg calls, but that doesn’t help. I’ve tried > numerous setting combinations, but nothing keeps the audio at the correct > length. I’ve tried using atempo to stretch the audio, but that doesn’t > even seem to work. Here is an example command I’ve tried: > > ffmpeg –y –i initial_video.mov –i initial_audio.wav –c:v rawvideo –c:a > pcm_s16le –pix_fmt uyvy422 –r 3/1001 output.mov > > I’m clearly missing something here, but I have no idea why the audio track > would end up shorter (in the 10s example, it’s about 9.98 seconds after), > and the video longer (about 10.06). Thanks! > > ~Thomas > ___ > ffmpeg-user mailing list > ffmpeg-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-user > > To unsubscribe, visit link above, or email > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Need help understanding framerate conversion!
Hi All, I need to mux and then framerate convert a rawvideo .mov file, and a PCM 16bit 48Khz wav file. For example, a .mov file is exactly 10 seconds long, and a .wav file is also exactly 10 seconds. The initial .mov file is a 30 frames-per-second, but after muxing with the audio, I need to convert it to 29.97. The issue I’m seeing is that for some reason, the resulting video file is slightly longer than 10 seconds, and the resulting audio is just shy of 10 seconds. This leads to the audio being out-of-sync with the video by the end of the video. In reality, I’m performing this task with much longer clips, and so the av-sync issue is much more noticeable, but even at 10 seconds the sync offset is noticeable in a video editor. What am I doing wrong? I’ve tried separating the muxing and framerate conversion into separate FFmpeg calls, but that doesn’t help. I’ve tried numerous setting combinations, but nothing keeps the audio at the correct length. I’ve tried using atempo to stretch the audio, but that doesn’t even seem to work. Here is an example command I’ve tried: ffmpeg –y –i initial_video.mov –i initial_audio.wav –c:v rawvideo –c:a pcm_s16le –pix_fmt uyvy422 –r 3/1001 output.mov I’m clearly missing something here, but I have no idea why the audio track would end up shorter (in the 10s example, it’s about 9.98 seconds after), and the video longer (about 10.06). Thanks! ~Thomas ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-user] Generate/Playback Interlaced (1080i) video with lavfi.
Thanks for the help Carl. Seeing the difference isn’t that important, really what I’m trying to accomplish is outputting 1080i video using the FFMPEG wrapper for the DeckLink SDK. I’ve tried numerous combinations of filter settings with either 1080i or 1080p source content, but I think there I just a limitation/bug in the DeckLink wrapper/device code that’s preventing me from outputting interlaced video. Any clues on how to fix this would be amazing! On 12/21/16, 12:31 AM, "ffmpeg-user on behalf of Carl Eugen Hoyos" wrote: 2016-12-20 21:11 GMT+01:00 Matthias, Thomas : > Hi, > > I’m trying to generate some smtpebars with a script, and it works fine for 1080p video. > However, I’ve tried numerous combinations for generating 1080i video using the > –vf tinterlace filter. How do you expect to see the difference between interlaced and progressive smtpebars? I believe the tinterlace filter works fine but without horizontal movement you will not be able to see a difference. Note that the following should simplify your command line: $ ffmpeg -f lavfi -i filter1,filter2, ..., filtern Carl Eugen ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Generate/Playback Interlaced (1080i) video with lavfi.
Hi, I’m trying to generate some smtpebars with a script, and it works fine for 1080p video. However, I’ve tried numerous combinations for generating 1080i video using the –vf tinterlace filter. For example, if I want to generate 1080i50 video, do I use 25000/1000 as the framerate, and then –vf tinterlace=6? This doesn’t seem to work. I’ve also tried setting the framerate to 5/1000 and then using –vf tinterlace=4, but that seems to be giving 1080p25 instead of true 1080i50? I’m probably way off here, any help would be really appreciated. Example command (not at all inclusive of everything I’ve tried): ffmpeg –y –f lavfi –i “smptebars=duration=1:size=1920x1080:rate=25000/1000” –pix_fmt uyvy422 –vcodec rawvideo –vf tinterlace=6 smpte_bar_test.mov More importantly, using the decklink output device, is there a way to playback an interlaced video? Even if I try to playback a video that I know is 1080i, it always plays out as progressive from the decklink output device. Thanks! ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] Generating Multichannel Sine Wave Audio
I see that there is a sine wave filter when using ‘-f lavfi –i “sine=frequency=1000:duration=60”, which is great! However, what is the easiest/best way to get this into a multichannel format, say 5.1 or even 16 channels? Ideally it would be nice to specify multiple frequencies for each channel, but if I want say 16 channels of the exact same sinewave in each, how would I do this? Is there a way to “copy” the first channel into the remaining 15? Do I need to specify an input for each channel and then use –map correctly? I’ve tried a few different things, but no success so far. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-user] DeckLink Output Controls
Hi There, I’m looking into using FFMPEG for its DeckLink device control. The capture part of the API seems fairly fully featured, however the output/playback controls seems to have some strange limitations. Specifically, on output, there is a hard-coded limit of only 8 channels of audio. What’s strange, is that the capture partition can handle up to 16, which makes sense considering most DeckLink cards have SDI input/output, and 16 channels is a standard workflow for SDI. Also, is there a reason why only 2 and 8 channels are supported, instead of just “n” channels (4 or 6 channels, for example)? Would it be possible to output 16 channels of audio? Is there a better way to do this (via the command line?)? Could a custom version of the decklink_enc files be built to handle 16 channels or is there some other limitation I’m not aware of? Thanks in advance, I really appreciate any advice/ideas here. Also, is there a specific reason that input/output are limited to only 48khz for audio? I’m guessing this is specific to DeckLink cards, but I haven’t found a specific reason yet. ~Thomas Matthias ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".