Kacy
Kacy

Reputation: 3430

ffmpeg output files differ

The following code outputs differing files. Why?

I used both the diff command and cmp which says they start to differ at byte 15. I also tried changing the argument to toFormat() from 'ogg' to 'mp3'. Same results.

ffmpeg( './original/test.mp3' )
    .toFormat( 'ogg' )
    .on( 'error', function(error, stdout, stderr)
    {
        console.log( 'Cannot process file: \n' + error );
    })
    .output( './tmp_a/' + filename )
    .output( './tmp_b/' + filename )
    .run();

I can't tell if I'm doing something wrong or if this is expected behavior.

Upvotes: 0

Views: 348

Answers (1)

Gyan
Gyan

Reputation: 92928

The OGG format muxer writes a unique serial number or ID tag. Add -flags +bitexact to set it to zero.

Upvotes: 3

Related Questions