VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Hello

    Using ffmpeg.exe N-52045-g694fa00 "built on Apr 12 2013 16:54:51 with gcc 4.8.0 (GCC)", I followed tutorials (here and here) about how to use ffmpeg to replace the audio track in an FLV file, but I couldn't get this to work.

    Here's the original FLV...
    Code:
    Input #0, flv, from 'input.full.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
    ...and the audio track edited in Audacity:
    Code:
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.audio.edited.m4a':
      Metadata:
        major_brand     : M4A
        minor_version   : 512
        compatible_brands: isomiso2
        creation_time   : 1970-01-01 00:00:00
        encoder         : Lavf52.64.2
      Duration: 00:10:07.95, start: 0.000000, bitrate: 154 kb/s
        Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 152 kb/s
        Metadata:
          creation_time   : 1970-01-01 00:00:00
          handler_name    : SoundHandler
    First, I tried demuxing the video stream:
    Code:
    ffmpeg.exe -i input.flv -vcodec copy -an -f h264 output.h264
    While the original FLV file is 10:07, VLC says the extracted H264 video file is now 2:02:00 long, and doesn't play.

    Next, I tried simply replacing the audio track with the file edited in Audacity:
    Code:
    ffmpeg.exe -i input.flv -i input.audio.edited.m4a test.flv
    It seems like the data is re-encoded, and the audio hasn't changed anyway.

    What is the right command to use to simply replace the audio track with with no re-encoding (transcoding)?

    Thank you.
    Quote Quote  
  2. Member
    Join Date
    Sep 2007
    Location
    Europe
    Search PM
    You could try this...
    Code:
    ffmpeg.exe -i input.flv -i input.audio.edited.m4a -vcodec copy -acodec copy -map 0:0 -map 1:0 test.flv
    Don't know if you still get issues with the remuxed duration?
    Quote Quote  
  3. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    I found a work-around by extracting the video + audio streams using FLV Extract, but I still wonder why ffmpeg fails extracting the H264 stream, though.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!