antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
ffmpeg and NTSC/PALOkay, I have two videos, both DVD - VIDEO_TS format. One's PAL, the other is NTSC. Both play fine on the computer, and I'm trying to burn them to the same disc (at their current size they will both fit). ffmpeg won't recognize the PAL files (I/O error) but it will work with the NTSC files, except I can only get the VOB's to convert and without the correct IFO I can't get the files into my burning software. So, anyone have any ideas? Can I burn the PAL dvd to an RW and use ffmpeg to rip from there to NTSC? That would be my preferred target for the final disc. Or is there a way to generate the correct IFO and BUP files for the PAL-converted VOB's? I've done a lot of googling and reading but haven't come up with anything, so I'm hoping someone here might have some insight. Thanks. |
|
pflogBueller? Bueller? MVM join:2001-09-01 El Dorado Hills, CA |
pflog
MVM
2008-Mar-9 7:28 pm
What errors do you get with the PAL source? You may just have to specify the framerate and/or conver to NTSC, though I'm not sure how successful you'll be in keeping the audio and video in sync. |
|
salahx join:2001-12-03 Saint Louis, MO |
to antiserious
If you are trying to read from the DVD and the PAL disc is giving I/O errors; it could be because your ffmpeg does not have libdvdcss support. If you can watch it mplayer fine, try using the -dumpstream and -dumpfile switches for easy DVD ripping; then re-encode with ffmpeg. |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
to pflog
said by pflog:What errors do you get with the PAL source? You may just have to specify the framerate and/or conver to NTSC, though I'm not sure how successful you'll be in keeping the audio and video in sync. ffmpeg just gave me 'I/O error - usually this means the file is truncated or corrupt' (pretty sure that was it), although the file(s) seem to be just fine. I specified the same framerate as the source, and used essentially the same command to convert the NTSC-to-PAL, which did work. I still don't see how I could have overcome the IFO issue unless I converted to MPG and re-authored the disc, which I would then have had to do with the other file as well to 'unite' the dvd. Wouldn't the -async switch have worked? |
|
pflogBueller? Bueller? MVM join:2001-09-01 El Dorado Hills, CA |
pflog
MVM
2008-Mar-9 8:37 pm
Paste the command you're running and the exact output you're getting, and I guess a directory listing of the files in question. |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
to salahx
said by salahx:If you are trying to read from the DVD and the PAL disc is giving I/O errors; it could be because your ffmpeg does not have libdvdcss support. If you can watch it mplayer fine, try using the -dumpstream and -dumpfile switches for easy DVD ripping; then re-encode with ffmpeg. All files are on my h/d at the moment - I'm not reading from disc at this point. Libdvdcss is installed. I didn't have to compile ffmpeg, it came straight from the Ubuntu repos, and has worked for me in the past, although not for this specific task. At the moment I'm trying a different approach. I'm using DeVeDe to combine all the VOB's into one DVD - it offers the option of NTSC conversion for the PAL VOB's during the creation process. The portions I'm able to preview seem to be coming out okay, and it's now into one of the PAL VOB's, which is showing as NTSC in properties. Slow process, not quite halfway complete, but I'll post results when it finishes. I like ffmpeg but I'm still very klutzy with its switches and formatting options, and the documentation I've been able to find isn't very noob-friendly, so I muddle along. Thank goodness for copy-paste. |
|
| antiserious |
to pflog
said by pflog:Paste the command you're running and the exact output you're getting, and I guess a directory listing of the files in question. I can't do that right now (see above) but will later. I'd like to become more facile with ffmpeg, so any help can be applied to future projects if not this one. I also have some video files that came from a webcast that seem to 'stutter' a bit, and I hope to be able to clean those up and combine them. I'm hoping ffmpeg can help with that. |
|
| antiserious |
Okay, I have partial success. DeVeDe produced 6 NTSC MPG's from the 6 VOB files, but failed to generate the 'DVD tree' - said "Maybe you ran out of room" (?). Then I used Avidemux to combine them into one (which always results in sync issues), so now I guess I'll use ffmpeg to fix that. I'm sure there's an easier. more direct way to do this - if only I knew it. Anyway, for pflog , the command that generated the error message on the PAL conversion was ffmpeg -i /media/xxx/XXX/VIDEO_TS/VTS_01_1.VOB -target ntsc-dvd -b 9000k -aspect 4:3 /media/xxx/YYY/VTS_01_1.VOB and the error message was, as I said, " I/O error occured Usually that means that input file is truncated and/or corrupted.", which does not appear to be, but may be it ffmpeg's eyes. I never tried to do the whole directory (if that's even possible), just that one VOB to start with. |
|
salahx join:2001-12-03 Saint Louis, MO |
salahx
Member
2008-Mar-10 12:08 am
well here's one thing you can try: dd if=/media/xxx/XXX/VIDEO_TS/VTS_01_1.VOB of=/dev/null bs=4k. If there's any kind of I/O error, it should appear in the dmesg after that command. Other thing that might cause this might be a full disk, or creating too large on file (some filesystem are limited to 2GB). |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
said by salahx:well here's one thing you can try: dd if=/media/xxx/XXX/VIDEO_TS/VTS_01_1.VOB of=/dev/null bs=4k. If there's any kind of I/O error, it should appear in the dmesg after that command. Other thing that might cause this might be a full disk, or creating too large on file (some filesystem are limited to 2GB). 262101+0 records in 262101+0 records out 1073565696 bytes (1.1 GB) copied, 39.7031 seconds, 27.0 MB/s I didn't see any error messages pop up. It's a ReiserFS partition with 20GB of free space. I've worked with a 7Gb file before on that partition. This should total under 4 Gb. The -async on the single big MPG file failed, but each of the 6 individual MPG's sync just fine. I need a better method of combining them than Avidemux affords me. |
|
salahx join:2001-12-03 Saint Louis, MO 1 edit |
salahx
Member
2008-Mar-10 1:38 am
Actually, on multiple occasions I've found myself needing to concatenate multiple video files in God knows what format to dvd. ffmpeg doesn't do concatenation; and wiht other utlities the result is usually out of sync. So I wrote a script to do it with ffmpeg. The cleanup routine is a bit sloppy; and it could use some more error-checking; but it works well. It uses some pretty hairy bashisms, though. Anyhow, to invoke it; use ./ffmpeg-concat.sh -i file1 -i file2... other ffmpeg options. Note that all -i have to come first. Also, all the files to be joined must have the same width, height, fps, audio channels, and audio rate; other wise the result is undefined. However, they can be of different bitrates and even different formats |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
Well, I re-ran Avidemux overnight, the 'auto' 'dvd' setting, which was 2-pass and ran much longer, but still got the sync issue, and a pass with ffmpeg -async could not correct that. Next will be running your script, which I really appreciate you sharing. A few questions:
1 - I have it saved for now on my desktop - does it matter where it sits?
2 - Should I add the -async switch to the string? If so, what value and where, exactly? I've always placed it before the ab switch and it's worked in the past.
3 - All the other parameters you mentioned match, except the bitrates. Does choosing a bitrate closer to the average yield any advantages? Is there any advantage to a higher or lower bitrate? I have room in the final sizing to expand the file if it might yield better results, but I realize there won't be a substantial improvement in quality, as long as there isn't any further degradation.
Thanks again for all your help, and time!
|
|
salahx join:2001-12-03 Saint Louis, MO 1 edit |
salahx
Member
2008-Mar-10 12:01 pm
said by antiserious:A few questions: 1 - I have it saved for now on my desktop - does it matter where it sits? 2 - Should I add the -async switch to the string? If so, what value and where, exactly? I've always placed it before the ab switch and it's worked in the past. 3 - All the other parameters you mentioned match, except the bitrates. Does choosing a bitrate closer to the average yield any advantages? Is there any advantage to a higher or lower bitrate? I have room in the final sizing to expand the file if it might yield better results, but I realize there won't be a substantial improvement in quality, as long as there isn't any further degradation. Thanks again for all your help, and time! 1. No, it does not. THe script creates a number of FIFO's which may clutter desktop while its running, however. 2. No, don't add -async. 3. As far as the bitrate goes - for same-type conversion, just choose a value that is at least as high at the one with the highest bitrate - -b 9000k is fine. If you worried it won't fit on the DVD , you'll have to do some math to figure what bitrate you need to make it fit ( desired file size in bytes * 8 / time of orginial seconds ) = ( video bitrate + audio bitrate ). You might need to fudge it slightly though. |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
Wow. That script crashed my terminal so fast I never even got a whiff of the error messages. I tried it several different ways, no joy.
What I did manage to do was enter the 6 MPG's into todisc, and that produced a somewhat servicable DVD, which I burned to an RW. It's not chaptered properly but at least I can play the videos. Perhaps I can extract from that to get a single MPG, and re-make the DVD from that. It's so much easier for me to chapter correctly in tovid when I'm working with a single MPG.
|
|
salahx join:2001-12-03 Saint Louis, MO |
salahx
Member
2008-Mar-10 6:17 pm
Gee, I'm surprised it failed so colossally. It does require mplayer to get the stats, so if you didn't have installed; or if mplayer did not return values for all 5 values in the script (like file was video-only or audio-only, then it would blow up. |
|
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
Yeah, it was a pretty impressive failure, but I do have MPlayer/Mencoder installed. I don't use it all that much, but it usually works fine when I do.
Is there any other way to append MPG's?
|
|
salahx join:2001-12-03 Saint Louis, MO |
salahx
Member
2008-Mar-10 8:13 pm
Well, if you could give me the output of the script, I might be able to figure out what happened and how to fix it (something like ./ffmpeg-concat args > ffmpeg-concat.txt 2>&1) |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
Sorry, it was much too fast to see, and I'm not anxious to repeat the experience. I'm giving DeVeDe another shot, using the files it output before as a starting point, with slightly different settings. We'll see what happens this time - there's no question I have more than enough disc space.
|
|
pflogBueller? Bueller? MVM join:2001-09-01 El Dorado Hills, CA |
pflog
MVM
2008-Mar-10 8:57 pm
huh? it's not like the script is going to blow up your computer. In the interest of at least helping salahx get the script catch more error conditions or handle a more robust set of inputs, can't you run it again? |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
said by antiserious:Wow. That script crashed my terminal so fast I never even got a whiff of the error messages. I tried it several different ways, no joy. If that wasn't clear enough, I'll elaborate, although I don't believe it will shed much light on the situation. Right-click on script 'ffmpeg-concat.sh', select 'open with gnome-terminal', no reaction at all - absolutely ZERO activity. Open terminal, type './ffmpeg-concat.sh -i file1 -i file2.' etc, - "bash: ./ffmpeg-concat.sh: No such file or directory" Open said script in text editor, copy-paste into terminal, WHOOSH - characters whiz by in a split-second, no possible way to read or copy them, terminal crashes. Back to text editor, append the '-i /media/xxx/yyy/01 02' etc to script. paste into terminal - Whoosh again, crash again, split-second again. If there's an error message generated by this, I have no clue what or where it might be. Therefore, I have no useful information to relay to salahx , unless these results in themselves represent such. Pardon the verbosity. I trust this clears up any misconceptions regarding my willingness to cooperate in troubleshooting. I cannot do what I am unable to do, by definition. fwiw |
|
pflogBueller? Bueller? MVM join:2001-09-01 El Dorado Hills, CA |
pflog
MVM
2008-Mar-10 10:41 pm
Ok, don't paste the contents of the file into a shell, that just plain won't work. What you need to do is find where you put ffmpeg-concat.sh. If you downloaded the link that salahx put up here, you'll need to unzip it first. Try this in a new terminal: bash code: |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
said by pflog:Ok, don't paste the contents of the file into a shell, that just plain won't work. As we've seen said by pflog:What you need to do is find where you put ffmpeg-concat.sh. If you downloaded the link that salahx put up here, you'll need to unzip it first. Done and done. I unzipped it first to my desktop, then moved it to its own folder in /home/name - however, it does not seem to want to run for me. said by pflog:Try this in a new terminal: Well now, lookie here - we have liftoff! AS I type this there's an mpg file being generated, and Lord Willing, it will have sync. That combination seems to be working, but don't ask me why or how. I'm just grateful. Thank You Very Much, pflog ! It's true what they say - it takes a village to raise an idiot.  |
|
pflogBueller? Bueller? MVM join:2001-09-01 El Dorado Hills, CA |
pflog
MVM
2008-Mar-10 11:05 pm
Cool, glad it's working! Not sure what happened before, it sounds like you were doing the right things. :/ |
|
salahx join:2001-12-03 Saint Louis, MO |
to antiserious
Glad it is finally make progress. Linux definitely makes you go out of your way to download random executables off the Internet. Of course, that's a feature  |
|
antiseriousThe Future ain't what it used to be Premium Member join:2001-12-12 Scranton, PA |
And I thought it was difficult getting that 'BritneyLohanUpskirt.exe' to run - this was even harder.  After all that, it was horribly out-of-sync. Well, at least I got DeVeDe to spit out a workable DVD version. I think I'll live with the erratic chaptering rather than futz with this anymore, at least for a while. I have to say, though, the ffmpeg documentation and man pages are written by and for people with much more advanced skills than I possess. There sure isn't a 'starter kit' that I've been able to find. Don't know what I would have done without both of you helping out. I really appreciate it, thanks again. |
|
| antiserious |
In case anyone's interested in the final outcome of this saga, here's the wrap-up. I ended up using DeVeDe to do the authoring. Once I worked through the options and chose 'create disk structure' instead of 'ISO or BIN/CUE image', I got a mixed-source DVD that looks and sounds very good. It can use MPG or VOB's as source (I used both) and it was the only program that converted PAL to NTSC without losing audio sync. The chaptering is a bit erratic but that's not a big deal to me. It has a lot of options for framerate, audio bitrate, sizing and appearance.
I'd still like to try using ffmpeg on some of these webcast video-to-DVD format files I have, to see if it can improve the quality and mitigate the 'stutter', but those are already all NTSC at least.
Thanks again for all the help!
|
|