Video Issues

OK, Linux people. Blender will let me make to edit and export a video as an AVI JPEG, but it refuses to export the synched audio to it. However, it will export the audio by itself as a .flac.

Does anyone know any separate tools that would allow me to synch that audio file with the video?

[Update a while later]

OK, VLC sort of works. Problem is that for some reason it really messes up the title when I add audio. If I were to post the MP4 and .flac files, could someone else try to synch them?

[Update late afternoon]

OK, I tried this:ffmpeg -i RoadToMars.wav -i 0001-9000.avi RoadToMarsAudio.avi

It added the audio, but it also pixelated it and made it look like crap. This was the warning I got before I did it.
____________________________________________________________________
ffmpeg version 2.4.9 Copyright (c) 2000-2015 the FFmpeg developers
built on Apr 28 2015 18:09:39 with gcc 4.9.2 (GCC) 20150212 (Red Hat 4.9.2-6)
configuration: –prefix=/usr –bindir=/usr/bin –datadir=/usr/share/ffmpeg –incdir=/usr/include/ffmpeg –libdir=/usr/lib64 –mandir=/usr/share/man –arch=x86_64 –optflags=’-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic’ –enable-bzlib –disable-crystalhd –enable-frei0r –enable-gnutls –enable-ladspa –enable-libass –enable-libcdio –enable-libdc1394 –disable-indev=jack –enable-libfreetype –enable-libgsm –enable-libmp3lame –enable-openal –enable-opencl –enable-libopencv –enable-libopenjpeg –enable-libopus –enable-libpulse –enable-libschroedinger –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libvorbis –enable-libv4l2 –enable-libvpx –enable-libx264 –enable-libx265 –enable-libxvid –enable-x11grab –enable-avfilter –enable-avresample –enable-postproc –enable-pthreads –disable-static –enable-shared –enable-gpl –disable-debug –disable-stripping –shlibdir=/usr/lib64 –enable-runtime-cpudetect
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.101 / 56. 4.101
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 1.100 / 5. 1.100
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from ‘RoadToMars.wav’:
Duration: 00:06:14.96, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
[avi @ 0x1a969c0] non-interleaved AVI
Input #1, avi, from ‘0001-9000.avi’:
Duration: 00:06:14.99, start: 0.000000, bitrate: 14558 kb/s
Stream #1:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg), 960×540, 14549 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
[swscaler @ 0x1a2e320] deprecated pixel format used, make sure you did set range correctly

Output #0, avi, to ‘RoadToMarsAudio.avi’:
Metadata:
ISFT : Lavf56.4.101
Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 960×540, q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc
Metadata:
encoder : Lavc56.1.100 mpeg4
Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16p
Metadata:
encoder : Lavc56.1.100 libmp3lame
Stream mapping:
Stream #1:0 -> #0:0 (mjpeg (native) -> mpeg4 (native))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
_________________________________________________

Anyone know what I should do differently?

[Update a few minutes later]

OK, I did this instead, which just copied the video, and didn’t try to re-encode: ffmpeg -i 0001-9000.avi -i RoadToMars.wav -map 0 -map 1 -codec copy -shortest RoadBlockToMarsWithAudio.avi

I think I’m almost there.

13 thoughts on “Video Issues”

  1. IIRC “mencoder -audiofile audio.flac video.avi -o both.avi -ovc copy -oac copy” is my usual trick for merging audio into an avi. “mkvmerge” works well if you prefer that container. Either way you might want “mencoder -ovc x264” etc on the input avi, though; JPG is an awful video format.

    1. It’s all that Blender will give me. For some reason, it won’t do MPEG. My only options for rendering movies are AVI JPEG, AVI Raw, and Frame Server.

  2. VLC?
    Not a Linux guy, but VLC is cross-platform, and it at least appears to have vaguely the same specs. On the Mac, it’s a pretty good Swiss Army Knife of forcing random-format-X into random-other-format-Y. Or merging tracks, etc.
    Some specific formats (MPEG2 aka normal DVD) needed specific “for pay” plugins last time I looked.

      1. OK, I’ve played with VLC, and it looks like in theory it will do the job. My only concern is that it munged the conversion to MPEG4 on one of the transitions.

        1. It will synchronize audio and video, and allow me to convert the blended files to an MP4. My only concern, as I said, was that it messed up one sequence on the conversion. I just added credits, and I’m re-rendering, so I’ll see how it goes.

          1. Join the video, audio and subtitles (if you need them) with a proper container format, such as MKV, like roystgnr said.

            Blender is supposed to support H.264 video encoding out. If you need to recompress the video or audio, to reduce the filesize or whatever, you can use a tool like RealAnime:
            http://www.videohelp.com/software/RealAnime

  3. Are you editing an existing video file? Or are you trying to add your own audio track to such a file?

    If simply editing a file, I’d use avidemux.

Comments are closed.