I'm trying to convert video clips from my camera (KonicaMinolta A200) to .vdr format, so that I can watch them using vdr, but so far I had no success. The format is MJPEG 640x480 30fps, with PCM audio (7875x16x1). I can convert it to MPEG4 with:
transcode -i "$in" -x mov,ffbin -y ffmpeg -F mpeg4 -N 0x55 --no_audio_adjust -E 11025,16,1 -o "$out"
but i cannot convert it to MPEG2. I found some hints that I could use mplayer to do the conversion, something like:
| $ mplayer pict0002.mov -ao mpegpes -vo mpegpes:001.vdr | MPlayer 2:1.0~rc1-0ubuntu9 (C) 2000-2006 MPlayer Team | CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ (Family: 15, Model: 75, Stepping: 2) | CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1 | Compiled with runtime CPU detection. | Can't open joystick device /dev/input/js0: No such file or directory | Can't init input joystick | mplayer: could not connect to socket | mplayer: No such file or directory | Failed to open LIRC support. You will not be able to use your remote control. | | Playing pict0002.mov. | Quicktime/MOV file format detected. | VIDEO: [jpeg] 640x480 24bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s) | Saving PES stream to 001.vdr | ========================================================================== | Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family | Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder) | ========================================================================== | ========================================================================== | Forced audio codec: mad | Opening audio decoder: [pcm] Uncompressed PCM audio decoder | AUDIO: 7875 Hz, 1 ch, s16be, 126.0 kbit/100.00% (ratio: 15750->15750) | Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) | ========================================================================== | Opening /dev/dvb/adapter0/audio0 | DVB AUDIO DEVICE: No such file or directory | Could not open/initialize audio device -> no sound. | Audio: no sound | Starting playback... | VDec: vo config request - 640 x 480 (preferred colorspace: Planar 422P) | Could not find matching colorspace - retrying with -vf scale... | Opening video filter: [scale] | Opening video filter: [lavc] | Could not find matching colorspace - retrying with -vf scale... | Opening video filter: [scale] | VDec: using Planar 422P as output csp (no 1) | Movie-Aspect is undefined - no prescaling applied. | SwScaler: reducing / aligning filtersize 1 -> 4 | SwScaler: reducing / aligning filtersize 1 -> 4 | SwScaler: reducing / aligning filtersize 1 -> 1 | SwScaler: reducing / aligning filtersize 9 -> 8 | | SwScaler: BICUBIC scaler, from yuv422p to yuv420p using MMX2 | SwScaler: using 4-tap MMX scaler for horizontal luminance scaling | SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling | SwScaler: using 1-tap MMX "scaler" for vertical scaling (YV12 like) | SwScaler: 640x480 -> 640x480 | [mpeg1video @ 0x8939638]removing common factors from framerate | VO: [mpegpes] 640x480 => 640x480 Mpeg PES | V: 47.3 1421/1421 8% 22% 0.0% 0 0 | | Exiting... (End of file)
However, when I play this with vdr (after generating the index.vdr file with genindex), this video is not the right size, it skips every few seconds and there is no sound.
What do I have to do to get a proper vdr recording?
I think a better idea is to just install a codec that plays whatever format your camera videos are in and use the mplayer plugin.
"VDR User" user.vdr@gmail.com wrote: | I think a better idea is to just install a codec that plays whatever | format your camera videos are in and use the mplayer plugin.
But I have a rather underpowered VDR machine with a full-featured DVB-S card, so I really need to use the hardware MPEG decoder.
Dick Streefland wrote:
"VDR User" user.vdr@gmail.com wrote: | I think a better idea is to just install a codec that plays whatever | format your camera videos are in and use the mplayer plugin.
But I have a rather underpowered VDR machine with a full-featured DVB-S card, so I really need to use the hardware MPEG decoder.
Mplayer can play MPEG files using the hardware MPEG decoder without re-encoding.
Anssi Hannula anssi.hannula@gmail.com wrote:
Dick Streefland wrote:
"VDR User" user.vdr@gmail.com wrote: | I think a better idea is to just install a codec that plays | whatever format your camera videos are in and use the mplayer | plugin.
But I have a rather underpowered VDR machine with a full-featured DVB-S card, so I really need to use the hardware MPEG decoder.
Mplayer can play MPEG files using the hardware MPEG decoder without re-encoding.
but it's NOT an mpeg file he wants to play! so we're back to where we started from. ;-)
c.
On 9/16/07, Clemens Kirchgatterer clemens@1541.org wrote:
Anssi Hannula anssi.hannula@gmail.com wrote:
Dick Streefland wrote:
"VDR User" user.vdr@gmail.com wrote: | I think a better idea is to just install a codec that plays | whatever format your camera videos are in and use the mplayer | plugin.
But I have a rather underpowered VDR machine with a full-featured DVB-S card, so I really need to use the hardware MPEG decoder.
Mplayer can play MPEG files using the hardware MPEG decoder without re-encoding.
but it's NOT an mpeg file he wants to play! so we're back to where we started from. ;-)
Right, it's M-JPEG format. No conversion should be necessary to play his files, just installing the proper codec and using the mplayer plugin should be fine. There is FFmpeg MJPEG decoder. Here are some packages to explore:
http://mjpeg.sourceforge.net/ avifile-mjpeg-plugin - MJPEG video plugin for libavifile cortado - streaming applet for Ogg formats luvcview - USB Video Class grabber motioneye - ppm/jpg snapshots or mjpeg compressed video on Vaio Laptops 3gpwiz - 3gp movie wizard libmjpegtools-dev - MJPEG video capture/editting/playback MPEG encoding libmjpegtools0 - MJPEG video capture/editting/playback MPEG encoding libmpeg4ip-0 - end-to-end system to explore streaming multimedia libmpeg4ip-dev - end-to-end system to explore streaming multimedia libmpeg4ip-doc - end-to-end system to explore streaming multimedia - documentation mjpegtools - MJPEG video capture/editting/playback MPEG encoding mpeg4ip-server - end-to-end system to explore streaming multimedia
VDR User schrieb:
On 9/16/07, Clemens Kirchgatterer clemens@1541.org wrote:
Anssi Hannula anssi.hannula@gmail.com wrote:
Dick Streefland wrote:
"VDR User" user.vdr@gmail.com wrote: | I think a better idea is to just install a codec that plays | whatever format your camera videos are in and use the mplayer | plugin.
But I have a rather underpowered VDR machine with a full-featured DVB-S card, so I really need to use the hardware MPEG decoder.
Mplayer can play MPEG files using the hardware MPEG decoder without re-encoding.
but it's NOT an mpeg file he wants to play! so we're back to where we started from. ;-)
Right, it's M-JPEG format. No conversion should be necessary to play his files, just installing the proper codec and using the mplayer plugin should be fine. There is FFmpeg MJPEG decoder. Here are some packages to explore:
SO conversion IS needed ! It needs to be transcoded on the fly to mpeg1 at least to be usable in his setup - which is impossible because the vdr is not big enough. But the solution got allready proposed. Any mpeg1/2 + genindex should be fine
When I convert video material from other sources to VDR, I use mencoder (Linux) or TMPGEnc (Windows) to create a DVD conform MPEG2. Then I use ProjectX to convert the MPEG2 into VDR format and genindex to generate the index.vdr. This works very well for me. Maybe the additional ProjectX step will do the trick for you also.
Best regards, Reiner.
-----Original Message----- From: vdr-bounces@linuxtv.org [mailto:vdr-bounces@linuxtv.org] On Behalf Of Dick Streefland Sent: Saturday, September 15, 2007 12:15 AM To: vdr@linuxtv.org Subject: [vdr] Convert video clip to .vdr format
I'm trying to convert video clips from my camera (KonicaMinolta A200) to .vdr format, so that I can watch them using vdr, but so far I had no success. The format is MJPEG 640x480 30fps, with PCM audio (7875x16x1). I can convert it to MPEG4 with:
transcode -i "$in" -x mov,ffbin -y ffmpeg -F mpeg4 -N 0x55 --no_audio_adjust -E 11025,16,1 -o "$out"
but i cannot convert it to MPEG2. I found some hints that I could use mplayer to do the conversion, something like:
| $ mplayer pict0002.mov -ao mpegpes -vo mpegpes:001.vdr | MPlayer 2:1.0~rc1-0ubuntu9 (C) 2000-2006 MPlayer Team | CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ (Family: 15, Model: 75, Stepping: 2) | CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1 | Compiled with runtime CPU detection. | Can't open joystick device /dev/input/js0: No such file or directory | Can't init input joystick | mplayer: could not connect to socket | mplayer: No such file or directory | Failed to open LIRC support. You will not be able to use your remote control. | | Playing pict0002.mov. | Quicktime/MOV file format detected. | VIDEO: [jpeg] 640x480 24bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s) | Saving PES stream to 001.vdr | ============================================================== ============ | Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family | Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder) | ============================================================== ============ | ============================================================== ============ | Forced audio codec: mad | Opening audio decoder: [pcm] Uncompressed PCM audio decoder | AUDIO: 7875 Hz, 1 ch, s16be, 126.0 kbit/100.00% (ratio: 15750->15750) | Selected audio codec: [pcm] afm: pcm (Uncompressed PCM) | ============================================================== ============ | Opening /dev/dvb/adapter0/audio0 | DVB AUDIO DEVICE: No such file or directory | Could not open/initialize audio device -> no sound. | Audio: no sound | Starting playback... | VDec: vo config request - 640 x 480 (preferred colorspace: Planar 422P) | Could not find matching colorspace - retrying with -vf scale... | Opening video filter: [scale] | Opening video filter: [lavc] | Could not find matching colorspace - retrying with -vf scale... | Opening video filter: [scale] | VDec: using Planar 422P as output csp (no 1) | Movie-Aspect is undefined - no prescaling applied. | SwScaler: reducing / aligning filtersize 1 -> 4 | SwScaler: reducing / aligning filtersize 1 -> 4 | SwScaler: reducing / aligning filtersize 1 -> 1 | SwScaler: reducing / aligning filtersize 9 -> 8 | | SwScaler: BICUBIC scaler, from yuv422p to yuv420p using MMX2 | SwScaler: using 4-tap MMX scaler for horizontal luminance scaling | SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling | SwScaler: using 1-tap MMX "scaler" for vertical scaling (YV12 like) | SwScaler: 640x480 -> 640x480 | [mpeg1video @ 0x8939638]removing common factors from framerate | VO: [mpegpes] 640x480 => 640x480 Mpeg PES | V: 47.3 1421/1421 8% 22% 0.0% 0 0 | | Exiting... (End of file)
However, when I play this with vdr (after generating the index.vdr file with genindex), this video is not the right size, it skips every few seconds and there is no sound.
What do I have to do to get a proper vdr recording?
-- Dick
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.487 / Virus Database: 269.13.19/1008 - Release Date: 14.09.2007 08:59
Hi Dick,
i wrote a small shellscript which does the job. It looks, if the original video is a mpg or different and do the right steps to get a vdr-video. You need mencoder and genindex for the script. Let me know, if this works for you, too.
regards, Friedhelm.
Dick Streefland wrote:
I'm trying to convert video clips from my camera (KonicaMinolta A200) to .vdr format, so that I can watch them using vdr, but so far I had no success. The format is MJPEG 640x480 30fps, with PCM audio (7875x16x1). I can convert it to MPEG4 with:
transcode -i "$in" -x mov,ffbin -y ffmpeg -F mpeg4 -N 0x55 --no_audio_adjust -E 11025,16,1 -o "$out"
but i cannot convert it to MPEG2. I found some hints that I could use mplayer to do the conversion, something like:
[..]
However, when I play this with vdr (after generating the index.vdr file with genindex), this video is not the right size, it skips every few seconds and there is no sound.
What do I have to do to get a proper vdr recording?
#!/bin/bash
set -x
VIDEODIR="/video0";
if [ $# -lt 1 ]; then echo >&2 "`basename $0`: import mpeg file in vdr" echo >&2 "Usage: `basename $0` filename.mpg" exit 1 fi
if [ ! -d $VIDEODIR ]; then echo >&2 "Target video directory does not exist" exit 1 fi
echo $1
BASENAME=`echo "$1" |perl -pe 's#^.*/(.*)..*?$#$1#' | perl -pe 's# #_#g'` SUFFIX=`echo "$1" | perl -pe 's#^.*.##'`
DATE=`date '+%F.%H:%M.50.50.rec'`; TARGETDIR="$VIDEODIR/$2/$BASENAME/$DATE";
mkdir -p "$TARGETDIR"
if [ "$SUFFIX" <> "mpg" ]; then nice mencoder -ofps 25 -oac lavc -ovc lavc -of mpeg \ -mpegopts format=dvd -vf scale=720:576,harddup \ -srate 48000 -af lavcresample=48000 -lavcopts \ vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=2:acodec=mp2:abitrate=192:aspect=4/3 \ -o $TARGETDIR/001.mpg "$1"
nice genindex -i $TARGETDIR/001.mpg -r -d "$TARGETDIR" -s 400 rm $TARGETDIR/001.mpg else nice genindex -i "$*" -r -d "$TARGETDIR" -s 400 fi touch $VIDEODIR/.update
Friedhelm Büscher vdr@4t.to wrote: | i wrote a small shellscript which does the job. It looks, if the original video is a mpg | or different and do the right steps to get a vdr-video. You need mencoder and genindex for | the script. Let me know, if this works for you, too.
Thanks! It works, I only get a few audio glitches in the first few seconds.
BTW: where did you get your genindex.c source from? My version does not have any options.
Dick Streefland wrote:
Friedhelm Büscher vdr@4t.to wrote: | i wrote a small shellscript which does the job. It looks, if the original video is a mpg | or different and do the right steps to get a vdr-video. You need mencoder and genindex for | the script. Let me know, if this works for you, too.
Thanks! It works, I only get a few audio glitches in the first few seconds.
BTW: where did you get your genindex.c source from? My version does not have any options.
Look here: http://www.muempf.de/down/genindex-0.1.3.tar.gz
regards, Friedhelm.