Software :: Ffmpeg And Mencoder Slice Mp4 Video Audio Out Of Sync

Jan 7, 2010

I am trying to use ffmpeg and mencoder to slice a portion of my video out but the audio is always 2 seconds out of sync.

ffmpeg -i bird.avs.MP4 -acodec copy -vcodec copy -ss 00:08:40 -t 00:01:00 test.mp4
mencoder -ss 00:08:40 -endpos 00:01:00 -oac copy -ovc copy bird.avs.MP4 -o test.mp4
mencoder -ss 00:08:40 -endpos 00:01:00 -oac copy -ovc copy -noskip bird.avs.MP4 -o test.mp4

[Code]....

View 5 Replies


ADVERTISEMENT

Fedora :: Mencoder - FPS And Audio Sync

Nov 22, 2009

I have found that if I change the FPS of a video, the audio is out of sync.

Is there a way in mencoder to have it correct this, and maintain the correct sync?

I don't think it is just a matter of audio/video delay. I have tried many times to correct this via that method, and it doesn't come close. Although, if I encode the video to another format, but with the original fps, the audio is sync'd.

View 2 Replies View Related

Ubuntu Multimedia :: Loop A Video A Number Of Times In Ffmpeg Or Mencoder?

Jun 5, 2010

How do you loop a video a number of times in ffmpeg or mencoder? I made a ogv out of a gif. It loops 1 time, so it's less than a second.

View 4 Replies View Related

Ubuntu Multimedia :: How To Sync Audio On Already Badly Out Of Sync Video?

Jul 9, 2011

Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction.Searching the net makes one believe that this command is just some sort of magic.People just put it in the line and it just works. Isn't that nice?

It says nothing about how to change the TIME the audio starts syncing. Like do I want it to start 5 seconds delayed? Or what about 5 seconds sooner?What if the audio gets more out of sync as the video goes on? Can I slip it a little at a time? What? No magic?No one mentions a file that already has badly synced audio.So what -async 1 really does is simply start the audio at the beginning of the file. LIKE AS IF THAT ISN'T STANDARD PROCEDURE?So what is the exact solution to syncing a messed up video? And why can't it just do the proper "timestamp" sync in the first place?No docs, no info and you are left out in the cold.

View 4 Replies View Related

General :: Extract Audio From Video File Using Mencoder?

Feb 2, 2011

Code:
mencoder The.Negotiator.mkv -of rawaudio -oac mp3lame -ovc copy -o sound-mencoder.mp3
I got a 195.3MB mp3 file

[code]...

View 2 Replies View Related

Ubuntu Multimedia :: Create Video From JPEGs - Use Mencoder To Add The Audio?

Jan 18, 2010

My 1st and only grandson turned 1 year old and we have taken about 1 million pics of him. I wanted to make a video from pictures taken in the past year. The first one is an ultra sound picture. The last one was taken this last Saturday. I have 153 12 MPixel pictures in a folder. They are named C001.jpg - C153.jpg (I can rename them if needed).

I had noticed mencoder or ffmpeg can create movies from jpegs. But, I didn't think about the frames per second. Would I need to make like 20 copies of each picture and then make it like 10 FPS? or something like that? Optimally, I would like to have a video where each picture lasts for 8-10 seconds or so and I would be able to add a song as audio. (I think I know how to use mencoder to add the audio).

View 9 Replies View Related

Ubuntu Multimedia :: Convert Video To Audio Use Ffmpeg?

Jul 15, 2010

I want to convert all video file in folder a become audio file in folder b use ffmpeg, how to type it in terminal?

View 7 Replies View Related

Software :: FFMPEG Encoding WMV3 Audio And Video To FLV

Feb 19, 2010

I'm trying to encode a wmv file to flv with ffmpeg. The video codec is WMV3 and the audio codec is wmap (Windows Media Audio Professional). The command I use is:

Code:
/usr/bin/ffmpeg -i <input file>.wmv -s 640x350 -b 1024k -r 25 -ar 44100 -ac 2 -y <output file>.flv
Output:

Code:
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --enable-shared --disable-static .....

Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
[wmv3 @ 0xb32c00]Extra data: 8 bits left, value: 0
Unsupported codec (id=86056) for input stream #0.1

As you can probably see the audio codec is not supported. Is there a way to encode WMV3+wmap with ffmpeg or any other tool in Linux? Windows Media Encoder in Windows is able to encode such files to a supported codec. For example: WMV3+WMA2/WMV2+WMA2, I could then encode it in Linux. I'm trying to find a way to directly encode WMV3+wmap in Linux.

View 14 Replies View Related

Programming :: How To Sync Audio And Video

Sep 28, 2010

How to sync audio and video which is captured from a aeperate camera device and a microphone,how to relate timestamps to audio and video to syncing.I m capturinfg video at 30fps and audio 160 samples everytime so how these 2 should be related to sync and playback at a time

View 1 Replies View Related

Ubuntu Multimedia :: Ffmpeg To Resample Audio But Leave Video Unchanged?

Mar 1, 2010

I'm trying to write a bash script for gpodder to automatically convert video podcasts to play on my media player. I'm using ffmpeg for the conversions (compiled myself with all codecs enabled). I'd like to avoid resampling the video or audio whenever it's unnecessary but ffmpeg seems to want to resample my video even if I only give it audio parameters to change.For example I have a test video with the following parameters:

Code:
Stream #0.0(eng): Video: h264, yuv420p, 640x480, 1394 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 5994 tbc
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16, 159 kb/s

[code]...

View 2 Replies View Related

Fedora :: Video Is Choppy And The Audio Sync Is Off?

May 18, 2009

I've been trying to use cheese to record greeting from my kids to grand parents etc. But every time I record a video, the video is choppy and the audio sync is off. I've used the one in the (F11) repos and built it from source. It behaves the same using other distros as well. Is this par for the course with cheese, or is it my hardware?[URL]... Any other applications/methods to record audio & video while providing a video.

View 2 Replies View Related

Debian Multimedia :: Avconv Gives Audio And Video Out Of Sync

Sep 10, 2015

I have a problem with avconv. Most of the use cases work spledidly, but when I need to crop a segment and then splice multiple segments together, I get problems.

The process I use is this:

1. Raw recording of short segments in high-quality AVI, These are produced by avconv, some as screencast and some by combining a PNG file with flac audio from audacity.

2. Conversion segment by segment into mp4 and ogv
Options A: -acodec aac -strict experimental -ab 128k -ac 2 -vcodec libx264 -s 640x480 -pix_fmt yuv420p -movflags +faststart -crf 22
Options B: -acodec libvorbis -ab 128k -ac 2 -vcodec libtheora -s 640x480 -b 500k

3. Splicing of the segments using MP4Box or oggCat.
(I used to do this in ffmpeg, but I have not figured out how to do it in avconv.)
This works.

In some cases I need to crop the segments, using the copy codecs and the -ss and/or =t options.

If I crop the AVI segments (between 1 and 2) the sound is clipping (this also generates a spree of error messages `Non-monotonous DTS'). If I crop mp4/ogv segments, (between 2 and 3) the remaining video, after the cropped segment are out of sync. I get the same problems with both OGV and MP4 playing them in vlc. Playing the mp4 directly in iceweasel works as it should.

View 0 Replies View Related

Ubuntu Multimedia :: Flash Video And Audio Out Of Sync

Dec 2, 2010

I watch alot of news videos and within 1 - 2 minutes the video and audio become out of sync. The video is lagging the audio. I'm using 10.10 32 bit with Shock Flash 10.1 r102 on Firefox. Will the 10.2 beta flash fix this problem?

View 2 Replies View Related

Ubuntu Multimedia :: MKV Files Audio/video Out Of Sync?

Mar 29, 2011

I put all my dvds on my "media center" by converting them to .MP4 with handbrake.

Recently I saw that with a MKV file you could do soft subtitles. I tested a part of a movie, and the audio and video are very out of sync.

With MP4/burned in audio everything is ok...

Edit: Ow yes I'm using XBMC for playing it. MP4 + MKV files are both H.264, they have the exact same settings except for subtitles...

Weirdly Enough: I tried another video and at this one the audio is in sync....

View 1 Replies View Related

Ubuntu Multimedia :: After Upgrading To 11.04 Video And Audio Are Out Of Sync By About One Second

May 27, 2011

After upgrading to 11.04, video and audio are out of sync by about one second when playing movies in VLC, or opening a clip on the web. Reinstalling does nothing.

View 9 Replies View Related

Ubuntu Multimedia :: User Friendly Video Converter - Ffmpeg Cannot Convert A .avi To .3gp With Audio Working

May 15, 2011

i am using Ubuntu 11.04 on my computer system. I urgently need a good video converter for converting videos.I have already installed FFmpeg and men-coder,Winff etc. The problem is each has its own drawback.For instance ffmpeg cannot convert a .avi to .3gp with audio working. My preferences are the converter should be user friendly, should support all popular video formats.

View 2 Replies View Related

OpenSUSE :: Adjust / Sync Audio And Video In Gnome-mplayer On Fly?

Jul 4, 2010

How can one adjust/sync audio and video in gnome-mplayer while watching video

The following is my configuration :-
OS : Opensuse 11.2
Media Player : gnome-mplayer 0.9.9

View 9 Replies View Related

Ubuntu Multimedia :: Video Editing Software To Re-sync Audio Correctly?

Aug 9, 2010

I have a couple of .avi clips in which the sound plays 2 seconds before the video, so I need a software that can re-sync the sound correctly with the video with affecting the video/audio quality, what program can I use? What is the name of this feature in video editing programs? I am using Ubuntu 10.04. I noted that the Multimedia & video forum have only threads about problems in playing videos & cards drivers problems.

View 3 Replies View Related

Ubuntu Multimedia :: Losing Audio Sync When Editing Video In Openshot

Aug 31, 2010

my goal is to record video using a canon powershot camera, edit the avi file on my ubuntu 10.04 computer, then upload the rendered file to videos.

problem is that when i cut the video, the audio is no longer in sync with the video, it's off by about 1-2 seconds. this happens with both openshot and pitivi, so i suspect that it's caused by a bug with the codec. (files are avi with mjpeg codec). after searching launchpad, this is apparently a "known issue". that's great but for now i need a workaround.

i do have an old g4 powerbook with imovie hd v6 on it that i can use, but i'd prefer not to because:

1. the powerpc mac is much slower than my new dual core laptop
2. imovie compresses my videos too much so the rendered file is lower quality
3. i simply prefer openshot to imovie

i was thinking of preprocessing my avi files by converting them to another format with a non-buggy codec on linux. i downloaded ffmpeg, but not sure how to use it and what format to use. would mpeg2 be a safe one to use?

View 5 Replies View Related

Ubuntu :: Use Ffmpeg / Mencoder To Convert To Yuvj442p?

Aug 2, 2010

I have some video files (.avi and .swf) & I need to convert them to the following format:

Stream #0.0(eng): Video: mjpeg, yuvj422p, 320x240, 30 tbr, 30 tbn, 30 tbc
Stream #0.1(eng): Audio: pcm_u8, 8000 Hz, mono, s16, 64 kb/s

how to do this with mencoder or ffmpeg?

View 4 Replies View Related

Debian Multimedia :: Up-to-date Binaries Of Mplayer, Mencoder And Ffmpeg

Mar 18, 2010

I'm wondering if anyone distributes mplayer, mencoder, and ffmpeg, up-to-date builds of each and their associated dependencies (x264, faac, xvid, etc).I had to compile all that stuff myself and fought with it, and finally got it working.

If no one distributes latest builds, then I was thinking of going further with what I've done to help others: virtualbox lenny and automated compiles of all packages and putting up the builds, with latest revisions of mplayer and ffmpeg from their source code repos. Using LD_LIBRARY_PATH to isolate the build so any modern linux can run the produced binaries, with only glibc as a dependency.

View 3 Replies View Related

Ubuntu Multimedia :: Ffmpeg Audio Merge With Video Merge

Feb 22, 2011

I am using ffmpeg for merge wav files to a mov video. My doing is below

1. First extract audio (wav file) from video
2. Create wav file from mp3 track 1
3. Create wav file from mp3 track 2
4 Merge extract audio from video with track 1 and track2.
Now finally create a new video with original video's video stream and merged audio stream.

Process is working. However final video is 3-4 times greater than original one. I want that final video should be near about size of original video. As I understand, all three wav files (created from ) make video larger.

Example commands i using is as below:

View 6 Replies View Related

Ubuntu Multimedia :: Transcoding Audio With Mencoder?

Mar 7, 2010

I'm trying to convert a video in .ogm format to .avi format so I can stream it to my PS3 via uShare. I'm using Mencoder and the following command to do it (to transcode the audio from vorbis to mp3 and the video from mpeg4 to xvid):

Code: mencoder input.ogm -oac mp3lame -ovc xvid -xvidencopts pass=1 -o output.avi.The only problem is, the video contains 2 audio streams - one Japanese and one English. Needless to say, I need the English one. The above command only seems to transcode the Japanese audio though!Here's what ffmpeg has to say about the input file:

Code:
Input #0, ogg, from 'input.ogm':
Duration: 00:24:16.12, start: 0.000000, bitrate: 1280 kb/s[code]...

what I can do to specify the correct audio stream to encode? Also, how can I keep the bitrate the same as the output.avi seems to default to 96kbps?I'm not sure which audio stream is which but a little trial and error will sort that out in no time.

View 7 Replies View Related

Software :: Mencoder Not Using Correct Audio Stream

Jul 28, 2009

I whipped up a script to convert VOBs to AVIs for storage on ym NFS backend. I'm using mencoder on CentOS5 to do the conversion.For 9 out of 10 videos, this works great. There is the occasional 1 that will not have the correct audio stream however. I've tried -alang, -slang, aid, etc. to no avail. Here is my script (also in case anyone else finds it useful), but can anyone offer any suggestions on how to get the correct audio in my avi? When I open the vob in mplayer, I get English. When I run it through mencoder, I get Spanish.

View 2 Replies View Related

Software :: Mencoder - How To Keep Audio Bitrate Settings At 192 Kbps

Nov 25, 2010

Mencoder settings... I'm doing a simple transcoding of an avi file from FFmpeg MPEG4 codec to XVID MPEG-4 codec. The problem is that the audio bitrate is changing from 192 kbps to 32 kbps. The audio codec for both files is mp3 (MPEG-1 layer 3). (I'm transcoding the FFmpeg MPEG4 encoded avi because my blu-ray player doesn't see, let alone play it. Any XVID MPEG-4 encoded avi files the blu-ray player sees and plays fine). I ran mencoder trying the four settings below but the audio bitrate still comes out at 32 kbps:

Code:
mencoder camping_en.avi -ovc xvid -oac mp3lame -xvidencopts bitrate=192 -o camping_us.avi
mencoder camping_en.avi -ovc xvid -oac mp3lame -xvidencopts bitrate=687 -o camping_us.avi
mencoder camping_en.avi -ovc xvid -oac mp3lame -xvidencopts bitrate=9146 -o camping_us.avi
mencoder camping_en.avi -ovc xvid -oac mp3lame -xvidencopts bitrate=192000 -o camping_us.avi

How to keep the bitrate at 192 kbps?

View 2 Replies View Related

Software :: Mencoder Ignores Audio Bitrate Parameter

Dec 26, 2009

When I convert files with mencoder I get the output with incorrect audio bitrate. Seems that mencoder ignores the bitrate I pass to it. Here's my script:

Code:
#!/bin/bash
vbitrate=800
abitrate=128
#mkdir $2/../$2_rip
unlink frameno.avi 2> /dev/null
mencoder $1 -ovc frameno -oac mp3lame -lameopts abr:br=$abitrate -o frameno.avi
mencoder $1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$vbitrate:v4mv:mbd=2:trell:cmp=10:subcmp=3:vpass=1 -ffourcc DX50 -o /dev/null
mencoder $1 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$vbitrate:v4mv:mbd=2:trell:cmp=10:subcmp=3:vpass=2 -ffourcc DX50 -o $2
unlink frameno.avi 2> /dev/null
unlink divx2pass.log 2> /dev/null

Result file should have 128kbps audio bitrate, but here are the results:
Input file:
02_seminar.avi, 42Mb
video: 432x320 00:05:10 25fps DivX5 1Mbps
audio: 48KHz 00:05:10 Stereo 138Kbps mp3

Output file:
02.avi, 34Mb
video: 432x320 00:05:10 25fps FMP4 802Kbps
audio: 48KHz 00:05:10 Stereo 138Kbps mp3

Why audio bitrate remains unchanged?

View 4 Replies View Related

Software :: Converting DVD Video With Mencoder

May 22, 2010

I recorded a TV show on my pc using mythbuntu software (ubuntu version of mythtv). It cut out all the commercials and then transcoded it to a nice 40 min nuv file that I put onto a usb thumb drive. Now it's portable and vlc can play the file...on a pc. I want to burn it onto a DVD so I can put it in any NTSC DVD player. Also, the file was recorded at 480x480 and I want to change the size to widescreen (16:9). Additionally, the top of the screen recorded a thin horizontal line of junk that needs to be deleted.

Now, I've googled around and found this line in ffmpeg that should work:

ffmpeg -i V-RedSky.nuv -croptop 4 -y -target ntsc-dvd -sameq -aspect 16:9 RedSky.mpg

The new 16:9 video size is great, the annoying horizontal line got cropped, and I got a nice mpg file...but the audio is now out of sync. I tried ffmpeg with fewer options and the audio still got out of sync.

So, I'm thinking I should try different software. Maybe mencoder. How could I put the above ffmpeg options into mencoder?

View 4 Replies View Related

Ubuntu Multimedia :: Video Capture Using Mencoder?

Sep 29, 2010

I am working in a script I have, to capture video with sound from my capture board, wich is a clone of the pico2000. This script was working in Ubuntu 9.10 untill I reformated my machine and instaled the Ubuntu 10.10, 64 bits. The machine is an AMD Athlon II, 2.6GHz with 3 GBytes of Ram. The former script was:

Code:
#!/bin/bash
clear
SERVICE="mencoder"
MOVIE=$(date +"%H%M")

[Code].....

View 1 Replies View Related

Ubuntu Multimedia :: HD Video Playback - Video And Sound Frequently Get Out Of Sync

Oct 17, 2010

When I play large HD videos in mplayer, the video and sound frequently get out of sync, and the video plays a little strangely (occasionally speeding up and occasionally slowing down).

I think it's because mplayer is only running on a single core. As I've got a quad-core processor, it seems inefficient. I've seen that there is theoretically a way to get mplayer to work with multicore setups, but it requires compiling with different options. That'd take me a little while to work through.

Ideally there would be a pre-compiled version in the software centre, or a player which has support built in (again, ideally in the software centre). Is there such a thing available?

View 1 Replies View Related

Ubuntu Multimedia :: Record Audio Desktop With Ffmpeg?

Mar 22, 2010

I creating a mini soft for screencast (audio + video) with ffmpeg.For the video,it's ok.For the sound, the capture of sound of my webcam (/dev/dsp1) it's ok.

Code:
ffmpeg -f oss -ar 44100 -i /dev/dsp1 -acodec mp2 -ab 128k test.mp3
But for my audio desktop :

[code]...

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved