Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146307 - media-video/transcode-1.0.2-r2 export to dvraw messes up audio
Summary: media-video/transcode-1.0.2-r2 export to dvraw messes up audio
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-04 13:19 UTC by Craig Lawson
Modified: 2007-02-01 03:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
transcode 1.0.2 patch to fix dvraw audio export (transcode-1.0.2-dvraw.patch,700 bytes, patch)
2006-09-04 13:21 UTC, Craig Lawson
Details | Diff
transcode 1.0.2 patch to fix dvraw audio export (unified diff) (transcode-1.0.2-dvraw.patch,468 bytes, patch)
2006-10-04 22:31 UTC, Craig Lawson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Lawson 2006-09-04 13:19:51 UTC
I submitted this to transcode-devel. Didn't get a reply, and I don't want it to get lost.


When exporting to rawdv format, encoder->samples_this_frame was set to the number of audio bytes in the frame, not the number of samples. This causes audio samples to be either dropped or added, and when samples are added, they contain stack junk.

Example: the DV format encodes the number of audio samples as (nSamples - 1580) & 0x3F. At 48KHz NTSC, a typical frame contains 1602 samples, and is encoded as 22. Transcode was incorrectly specifying 1602 * 4 = 6408 samples, which is encoded as 28 -- adding 6 extra samples!
  The solution is to divide by 2 * size(int16_t) = 4 (because transcode always passes 2 channels to dv_encode_full_audio).

Example command:
  transcode -i movie.avi -y dvraw -uyvy -o movie.dv
Comment 1 Craig Lawson 2006-09-04 13:21:03 UTC
Created attachment 96005 [details, diff]
transcode 1.0.2 patch to fix dvraw audio export
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-02 00:40:39 UTC
Can you please submit this as an unified diff?
Comment 3 Craig Lawson 2006-10-04 22:31:15 UTC
Created attachment 98812 [details, diff]
transcode 1.0.2 patch to fix dvraw audio export (unified diff)

Patch resubmitted in unified diff format.
Comment 4 Steve Dibb (RETIRED) gentoo-dev 2007-02-01 03:38:44 UTC
Fixed in -r4 in CVS, thanks Craig