-   Linux - Software (
-   -   Transcoding mpeg2 video to dv (

ssfrstlstnm 07-06-2005 11:14 PM

Transcoding mpeg2 video to dv
I just bought a video camera that uses a dvd to record the video. Now I am trying to transcode the video (in vob format, aka mpeg2) to dv so that I can edit it with kino. I have tried transcode, ffmpeg, dvdrip and acidrip with little success. Now I am wishing that I would have bought a DV type recorder.

I figure transcode is my best bet as it has lots of features. I am a newbie to video, and have been reading up on it the last few days. I've been over the transcode manual pages more times than I can count. The program finishes with no errors, but the video looks very strange. Sound seems OK. There is one row at the top with two windows showing the video, under that are two rows of four windows showing the video and the bottom row has black/white inverted. All the way across the bottom is a green/black box. The color in all windows is kind of green tinted and looks mostly black and white.

Here is the command line that I am using for transcode:


transcode -i vts_01_4.vob -A -I 1 -M 2 -N 0x2000 -Q 5,5 -f 4 -w 2400,250,100 -x vob,ac3 -y dv -export_fps 24 -o test.dv
Here is the output from transcode (I stopped this one before it finished):


transcode v0.6.14 (C) 2001-2003 Thomas Oestreich, 2003-2004 T. Bitterberg
[transcode] (probe) suggested AV correction -D 0 (0 ms) | AV -20 ms | -20 ms
[transcode] auto-probing source vts_01_4.vob (ok)
[transcode] V: import format    | MPEG-2  (V=vob|A=ac3)
[transcode] V: AV demux/sync    | (2) initial MPEG sequence / enforce frame rate
[transcode] V: import frame    | 720x480  1.50:1  encoded @ 4:3
[transcode] V: de-interlace    | (mode=1) interpolate scanlines (fast)
[transcode] V: bits/pixel      | 1.736
[transcode] V: decoding fps,frc | 4.000,0
[transcode] V: Y'CbCr          | YV12/I420
[transcode] A: import format    | 0x2000  AC3          [48000,16,2]  192 kbps
[transcode] A: export format    | 0x2000  AC3          [48000,16,2]  192 kbps
[transcode] V: encoding fps,frc | 23.976,1
[transcode] A: bytes per frame  | 8008 (8008.000000)
[transcode] A: adjustment      | 0@1000
[transcode] V: IA32 accel mode  | sse (sse mmxext mmx asm C)
tc_memcpy: using mmxext for memcpy
[transcode] V: video buffer    | 10 @ 720x480
[] v0.3.2 (2002-02-15) (audio) AC3
[] v0.6.0 (2003-10-02) (video) MPEG-2 | (audio) MPEG/AC3/PCM | (subtitle)
[] v0.5 (2003-07-24) (video) Digital Video | (audio) MPEG/AC3/PCM
[] AC3->AC3
[] tcextract -a 0 -i "vts_01_4.vob" -x ac3 -d 0 | tcextract -t raw -x ac3 -d 0
[] tccat -i "vts_01_4.vob" -t vob -d 0 -S 0 | tcdemux -s 0x80 -x mpeg2 -S 0 -M 2 -f 4.000000 -P /tmp/fileviUTsP  -d 0 | tcextract -t vob -a 0 -x mpeg2 -d 0 | tcdecode -x mpeg2 -d 0 -y yv12
tc_memcpy: using mmxext for memcpy
tc_memcpy: using mmxext for memcpy
tc_memcpy: using mmxext for memcpy
(ac3scan.c) AC3 frame 768 (1001) bytes | bitrate 192 kBits/s | depsize 8008 | rbytes 1001.000000
encoding frames [000000-000046],  7.97 fps, EMT: 0:00:11, ( 0| 0| 0) 
[transcode] (sighandler) SIGINT received
encoding frames [000000-000047],  7.85 fps, EMT: 0:00:11, ( 0| 0| 0)
clean up | frame threads | unload modules | cancel signal | internal threads | done
[transcode] encoded 48 frames (30 dropped, 0 cloned), clip length  12.00 s

Here is the output when I run the transcoded video in mplayer:


Playing test.dv.
AVI file format detected.
VIDEO:  [DVSD]  720x480  24bpp  23.976 fps  23017.0 kbps (2809.7 kbyte/s)
Clip info:
 Software: transcode-0.6.14
Trying to force audio codec driver family libmad...
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 2.0 (stereo)  48000 Hz  192.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
Opening video decoder: [dshow] DirectShow video codecs
Decoder supports the following YUV formats: YUY2 UYVY
Decoder is capable of YUV output (flags 0x9)
VDec: vo config request - 720 x 480 (preferred csp: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4.
VDec: using BGR 24-bit as output csp (no 2)
VO: [x11] 720x480 => 800x600 BGR 24-bit  [zoom]
SwScaler: using unscaled BGR 24-bit -> BGRA special converter
Selected video codec: [qdv] vfm:dshow (Sony Digital Video (DV))
Checking audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
AF_pre: 48000Hz/2ch/s16le
alsa-init: 1 soundcard found, using: default
alsa: 48000 Hz/2 channels/4 bpf/32768 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch s16le (2 bps)
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
Starting playback...
alsa-space: xrun of at least 400.813 msecs. resetting stream?% 0 0 41%                             
alsa-space: xrun of at least 2.537 msecs. resetting stream14.1% 19 0 0%                           
A:  2.0 V:  2.0 A-V:  0.024 ct:  0.197  48/ 48 65% 170%  6.6% 19 0 0%                           
alsa-uninit: pcm closed

I am not sure why it says it is an avi format, but it uses the dv codec to decode it. Like I said I am still learning about video. Please help!

ssfrstlstnm 07-10-2005 04:57 PM

Anybody there???

I figured out a way to get it done. I'm using lives to edit the video and qdvdauthor to create the dvds. Lives will import the vob files automatically. It takes a long time probably because it is transcoding into some other format. But other than that, everything is OK. The finished video looks good.

ssfrstlstnm 07-11-2005 08:54 PM

Found some other usefull stuff to get the job done. Avidemux seems like it may be better than lives for splitting and/or merging video segments since it operates on the original video without any transformation until you save it. You can also save it without transformation. So it is possible to cut and paste without having to encode; however, when I tried this there was a small disruption at the cut points. Encoding into mpeg2-dvd got rid of the digital hiccup at the cut points.

When you load a video in lives it transforms every frame into a jpeg (or png). You then edit these and then encode the results in the desired format. That's two steps where loss can occur. I haven't played with it enough to know if the degradation is even noticable. Probably depends on the amount of motion in the video.

Cinelerra also looks cool if not very complicated. I don't think my pc has enough horsepower to run it though.

MasterC 07-11-2005 08:58 PM


Your original post..

If there is a way to get the video from your camera to your computer instead of using the DVD as the interface, I'm thinking via firewire, you can grab it as a dv file using dvgrab. THEN kino can edit that file directly... You can also skip the dvgrab part and use kino (which uses dvgrab) to grab the video from the camera.

This is just a thought, not sure if your camera has this feature or not.


ssfrstlstnm 07-12-2005 08:30 AM

That's how it works for DV based cameras. My camera records directly onto CD in mpeg2 fomat (not DV).

All times are GMT -5. The time now is 09:02 AM.