LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to convert stereo flv video to mono? (https://www.linuxquestions.org/questions/linux-software-2/how-to-convert-stereo-flv-video-to-mono-869828/)

Mr. Alex 03-20-2011 02:36 PM

How to convert stereo flv video to mono?
 
So I've got an flv video with horrible stereo sound (sound is good, but the stereo is very bad), which I listen to with my headphones. I need to make it mono in GNU/Linux since I have no Windows. Or with any Web-service, I don't know... Please suggest any tool to do so.

DJ Shaji 03-20-2011 03:41 PM

Use ffmpeg:
Quote:

ffmpeg -i input.flv -vcodec copy -acodec aac -ab 64k -ac 1 output.avi
Or, you can just use MPlayer

Quote:

mplayer -af pan=1:0.7:0.7 input.flv

Mr. Alex 03-21-2011 04:21 AM

Thanks. And how do I do it with MP4 video file using ffmpeg?
Tried your command, the error is:
Code:

Seems stream 1 codec frame rate differs from container frame rate: 59.83 (29917/500) -> 29.92 (29917/1000)

H_TeXMeX_H 03-21-2011 06:33 AM

Can you run 'ffmpeg -i' on the video and post the output.

Mr. Alex 03-21-2011 10:47 AM

Code:

FFmpeg version git-2611e52, Copyright (c) 2000-2011 the FFmpeg developers
  built on Feb  6 2011 10:00:04 with gcc 4.5.2 20110127 (prerelease)
  configuration: --prefix=/usr --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-version3 --enable-nonfree --enable-runtime-cpudetect --disable-debug
  libavutil    50. 36. 0 / 50. 36. 0
  libavcore    0. 16. 1 /  0. 16. 1
  libavcodec  52.108. 0 / 52.108. 0
  libavformat  52. 94. 0 / 52. 94. 0
  libavdevice  52.  2. 3 / 52.  2. 3
  libavfilter  1. 74. 0 /  1. 74. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0

Seems stream 1 codec frame rate differs from container frame rate: 59.83 (29917/500) -> 29.92 (29917/1000)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'I-changed-the-filename.mp4':
  Metadata:
    major_brand    : mp42
    minor_version  : 0
    compatible_brands: isomavc1mp42
    creation_time  : 2010-06-24 17:27:32
  Duration: 00:08:04.23, start: 0.000000, bitrate: 522 kb/s
    Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 122 kb/s
    Metadata:
      creation_time  : 2010-06-24 17:27:32
    Stream #0.1(und): Video: h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 397 kb/s, 29.92 fps, 29.92 tbr, 29917 tbn, 59.83 tbc
    Metadata:
      creation_time  : 2010-06-24 17:27:32
At least one output file must be specified


DJ Shaji 03-21-2011 11:51 AM

What happens when you try to encode this file? The error message you gave shouldn't be fatal ...

H_TeXMeX_H 03-21-2011 01:17 PM

Yeah something like:

Code:

ffmpeg -i input.mp4 -vcodec copy -acodec aac -ab 122k -ac 1 output.mp4

Mr. Alex 03-21-2011 02:02 PM

Code:

$ ffmpeg -i 1.mp4 -vcodec copy -acodec aac -ab 122k -ac 1 output.mp4
FFmpeg version git-2611e52, Copyright (c) 2000-2011 the FFmpeg developers
  built on Feb  6 2011 10:00:04 with gcc 4.5.2 20110127 (prerelease)
  configuration: --prefix=/usr --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-libtheora --enable-postproc --enable-shared --enable-x11grab --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libschroedinger --enable-libopenjpeg --enable-version3 --enable-nonfree --enable-runtime-cpudetect --disable-debug
  libavutil    50. 36. 0 / 50. 36. 0
  libavcore    0. 16. 1 /  0. 16. 1
  libavcodec  52.108. 0 / 52.108. 0
  libavformat  52. 94. 0 / 52. 94. 0
  libavdevice  52.  2. 3 / 52.  2. 3
  libavfilter  1. 74. 0 /  1. 74. 0
  libswscale    0. 12. 0 /  0. 12. 0
  libpostproc  51.  2. 0 / 51.  2. 0

Seems stream 1 codec frame rate differs from container frame rate: 59.83 (29917/500) -> 29.92 (29917/1000)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
  Metadata:
    major_brand    : mp42
    minor_version  : 0
    compatible_brands: isomavc1mp42
    creation_time  : 2010-06-24 17:27:32
  Duration: 00:08:04.23, start: 0.000000, bitrate: 522 kb/s
    Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 122 kb/s
    Metadata:
      creation_time  : 2010-06-24 17:27:32
    Stream #0.1(und): Video: h264, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 397 kb/s, 29.92 fps, 29.92 tbr, 29917 tbn, 59.83 tbc
    Metadata:
      creation_time  : 2010-06-24 17:27:32
encoder 'aac' is experimental and might produce bad results.
Add '-strict experimental' if you want to use it.
Or use the non experimental encoder 'libfaac'.

That's all I got with my MP4 file... Nothing happens, no encoding.


All times are GMT -5. The time now is 11:55 AM.