[FFmpeg-user] Right way to extract and recombine audio/video streams?

Gilles codecomplete at free.fr
Tue Apr 30 15:36:15 CEST 2013


Hello

I need to edit the audio track of an FLV file and wanted to make sure
this is the right way to do this with ffmpeg:

Per www.howto-pages.org/ffmpeg/ :

1. Extract video stream
ffmpeg.exe -i input.flv -vcodec copy -an output.h264

2. Extract audio stream
ffmpeg.exe -i input.flv -vn -acodec copy output.aac

3. Edit audio track in eg. Audacity

4. Build new FLV file by combining original video stream + edited
audio stream:
ffmpeg.exe -i output.h264 -i output.aac new.flv

Is this correct?

FWIW, here's the original file:
==============
ffmpeg.exe -i input.flv
ffmpeg version N-52045-g694fa00 Copyright (c) 2000-2013 the FFmpeg
developers
  built on Apr 12 2013 16:54:51 with gcc 4.8.0 (GCC)
[...]
Input #0, flv, from 'La.vitesse.flv':
  Metadata:
    starttime       : 0
    totalduration   : 608
    totaldatarate   : 676
    bytelength      : 51367355
    canseekontime   : true
    sourcedata      : BD075FE65HH1367193223014001
    purl            :
    pmsg            :
  Duration: 00:10:07.84, start: 0.000000, bitrate: 676 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x360, 551 kb/s, 29.97
tbr, 1k tbn, 59.94 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 131 kb/s
=================

Thank you.



More information about the ffmpeg-user mailing list