You are not logged in.
I'm working on a Python script (see http://bbs.archlinux.org/viewtopic.php?id=90785 for details) that downloads YouTube videos and makes a DVD with menu out of them.
However, none of the programs that I've tried have been able to transcode the files.
Output:
Running: transcode -H0 -i "1.mp4" -x mplayer="-mc 0",mplayer -f 29.970 -g 1280x720 -n 0x1 -e 44100,16,2 -y ffmpeg -F mpeg2 -Z 720x480 --export_asr 3 -D0 -N 0x2000 -E 48000,16,2 -b 384 -m "tmp_any2dvd/1.ac3" -o "tmp_any2dvd/1.m2v" -w 5000 ...
Error: Video encoding failed for "tmp_any2dvd/1.m2v", file not successfully encoded!It seems that the common factor with my two main options (tovid and any2dvd) is that they both use ffmpeg. Is this a problem with that program or the video files?
Unfortunately, this is preventing me from being able to finish and release my script.
mediainfo output:
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 24s 357ms
Bit rate mode : Variable
Bit rate : 2 001 Kbps
Maximum bit rate : 2 723 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.072
Stream size : 5.81 MiB (94%)
Title : (C) 2007 Google Inc. v08.13.2007.
Encoded date : UTC 2009-11-15 05:56:47
Tagged date : UTC 2009-11-15 05:56:48
Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 24s 334ms
Bit rate mode : Variable
Bit rate : 126 Kbps
Nominal bit rate : 123 Kbps
Maximum bit rate : 139 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 44.1 KHz
Resolution : 16 bits
Stream size : 373 KiB (6%)
Title : (C) 2007 Google Inc. v08.13.2007.
Encoded date : UTC 2009-11-15 05:56:47
Tagged date : UTC 2009-11-15 05:56:48Last edited by mrbug (2010-02-14 18:56:08)
dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)
Offline
I've tried a few different programs to transcode the files, but it seems like most are just frontends for ffmpeg. I could use something that's based on gstreamer, but it's apparently relatively slow. Since my script is supposed to transcode many files, I'd prefer to go with something that's faster -- especially if it can use vdpau.
dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)
Offline
It looks like you're trying to work with NTSC-DVD, so try something like this. I've always used mpg then created the vob files with dvdauthor:
ffmpeg -i <YOUR_INPUT> -vcodec mpeg2video -b 5000k -acodec ac3 -ar 48000 -ab 384k -ac 2 -g 12 -top 1 -target ntsc-dvd -aspect 4:3 <YOUR_OUTPUT>The -top command is interlacing the input. For mpeg2 DVD it could be either 0 (bottom field first) or 1 (top field first).
mediainfo is reporting that videos created this way are not interlaced. FFmpeg disagrees. I believe that mediainfo is wrong.
--EDIT--
Oh yeah, add -threads <SOME_NUMBER> towards the end to speed up operations. The number of cores (real or virtual) is pretty useful. x264 always picks -threads 6 for my quad-core machine when encoding, so I always pass -threads 6 to FFmpeg.
Offline
Thanks, I'll try that at some point.
However, I fixed the problem in a "stupid" way. I changed the extension from mp4 to avi and it "just worked."
My guess is that ffmpeg is trying to do some magic based on the file extension, but it doesn't work correctly with YouTube mp4 files.
dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)
Offline
Thanks, I'll try that at some point.
However, I fixed the problem in a "stupid" way. I changed the extension from mp4 to avi and it "just worked."
My guess is that ffmpeg is trying to do some magic based on the file extension, but it doesn't work correctly with YouTube mp4 files.
That's strange. FFmpeg doesn't normally care at all about containers when getting stream info. For that matter, neither does Mplayer, Xine, VLC, etc.
Anyway, I'm glad that you got things working.
Offline
You're right.. It's very strange. I'm sure that I'll find and fix the cause at some point, but for now, I'm just happy that it works in general -- even if I have to rely on a workaround.
dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)
Offline