Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th July 2020, 10:26   #1  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 1,635
Demux with FFMPEG from mpls

It's 3 hours I am reading documentation and I can't sort it out.

Is there a way to blindly demux a BD video from a mpls to it's elementary streams with FFMPEG, respecting original format?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 11th July 2020, 16:56   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,206
What do you mean exactly?
ffmpeg will not automatically add the file extension filenames etc. when demuxing.
You have to specify the filename etc. for each stream:
Code:
ffmpeg -y -threads 8 -analyzeduration 200M -probesize 200M -i "bluray:<PATH TO BLU-RAY FOLDER WHICH CONTAINS THE BDMV-FOLDER >" -sn -vcodec copy "E:\Temp\2020-07-11@17_50_25_2710_17.vc1" -map 0:40 -y -acodec copy "E:\Output\iId_9_aid_6656_lang_en_2020-07-11@17_50_25_2710_15.dts" -map 0:7 -y -acodec copy "E:\Output\iId_8_aid_4358_lang_en_2020-07-11@17_50_25_2710_13.ac3" -map 0:6 -y -acodec copy "E:\Output\iId_7_aid_4357_lang_es_2020-07-11@17_50_25_2710_11.dts" -map 0:5 -y -acodec copy "E:\Output\iId_6_aid_4356_lang_de_2020-07-11@17_50_25_2710_09.dts" -map 0:4 -y -acodec copy "E:\Output\iId_5_aid_4355_lang_it_2020-07-11@17_50_25_2710_07.dts" -map 0:3 -y -acodec copy "E:\Output\iId_4_aid_4354_lang_fr_2020-07-11@17_50_25_2710_05.dts" -map 0:2 -y -acodec copy "E:\Output\iId_3_aid_4353_lang_en_2020-07-11@17_50_25_2710_03.dts" -map 0:1 -y -acodec copy "E:\Output\iId_2_aid_4352_lang_ja_2020-07-11@17_50_25_2710_01.dts"
Cu Selur
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 11th July 2020, 17:13   #3  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,660
@Selur

Do you use ffmpeg Bluray demuxing in Hybrid or know GUIs which do it?

In case you use it, how do you options info on the Bluray titles and streams?

Are there known issues?
stax76 is offline   Reply With Quote
Old 11th July 2020, 20:15   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,206
Yes, Hybrid use FFmpeg (or tsMuxeR; depending on the settings) to extract streams from Blu-Rays.

Quote:
In case you use it, how do you options info on the Bluray titles and streams?
What?
If you are asking how I collect data about the Blu-ray, I usually use:
Code:
"I:\Hybrid\64bit\ffmpeg.exe" -analyzeduration 200M -probesize 200M -i "bluray:PATH TO THE BLU-RAY-FOLDER"
which throws out a list of usable mpls files:
Code:
[bluray @ 00000262bf9f9100] 14 usable playlists:
[bluray @ 00000262bf9f9100] playlist 00000.mpls (1:28:21)
[bluray @ 00000262bf9f9100] playlist 00002.mpls (0:16:20)
[bluray @ 00000262bf9f9100] playlist 00003.mpls (0:03:11)
[bluray @ 00000262bf9f9100] playlist 00004.mpls (0:03:01)
[bluray @ 00000262bf9f9100] playlist 00005.mpls (0:15:20)
[bluray @ 00000262bf9f9100] playlist 00006.mpls (0:17:15)
[bluray @ 00000262bf9f9100] playlist 00007.mpls (0:15:31)
[bluray @ 00000262bf9f9100] playlist 00008.mpls (0:08:01)
[bluray @ 00000262bf9f9100] playlist 00009.mpls (0:09:13)
[bluray @ 00000262bf9f9100] playlist 00010.mpls (0:22:14)
[bluray @ 00000262bf9f9100] playlist 00011.mpls (0:21:10)
[bluray @ 00000262bf9f9100] playlist 00012.mpls (0:06:34)
[bluray @ 00000262bf9f9100] playlist 00021.mpls (0:07:34)
[bluray @ 00000262bf9f9100] playlist 00022.mpls (2:09:19)
[bluray @ 00000262bf9f9100] selected 00022.mpls
which usually is reliable. (some users reported problems with this when using some strange asian rips of Blu-rays which is why Hybrid also uses MediaInfo and tsMuxeR for the analysis)

I then usually do a quick analysis using:
Code:
"I:\Hybrid\64bit\ffmpeg.exe" -analyzeduration 200M -probesize 200M -analyzeduration 200M -probesize 200M -i "bluray:PATH TO THE BLU-RAY-FOLDER" -playlist PLAYLIST_NUMBER -angle 0
for all the usable playlists and let the user decide which playlist(s) he wants as input. After the user choose the playlists each playlist is analysed by FFmpeg, MediaInfo, tsMuxeR, mplayer to get as much details about the stream so it's later possible to use FFmpeg/tsMuxeR/MPlayer for the stream extraction.

Main downside with FFmpeg an Blu-rays is that it uses libbluray which, at least in the past frequently had broken builds, so updating libbluray was always a gamble (it has gotten better) and sometimes tsMuxeR is better suited for the stream extraction. By default Hybrid uses FFmpeg for the demuxing, but tsMuxeR is there as fallback in case the extraction with FFmpeg fails. Since I haven't detected a pattern which Blu-rays do not work with FFmpeg, but work with tsMuxeR this is a user choice.

Cu Selur
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 12th July 2020, 12:08   #5  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 323
Quote:
Originally Posted by Selur View Post
You have to specify the filename etc. for each stream:
Code:
ffmpeg -y -threads 8 -analyzeduration 200M -probesize 200M -i "bluray:<PATH TO BLU-RAY FOLDER WHICH CONTAINS THE BDMV-FOLDER >" -sn -vcodec copy "E:\Temp\2020-07-11@17_50_25_2710_17.vc1" -map 0:40 -y -acodec copy "E:\Output\iId_9_aid_6656_lang_en_2020-07-11@17_50_25_2710_15.dts" -map 0:7 -y -acodec copy "E:\Output\iId_8_aid_4358_lang_en_2020-07-11@17_50_25_2710_13.ac3" -map 0:6 -y -acodec copy "E:\Output\iId_7_aid_4357_lang_es_2020-07-11@17_50_25_2710_11.dts" -map 0:5 -y -acodec copy "E:\Output\iId_6_aid_4356_lang_de_2020-07-11@17_50_25_2710_09.dts" -map 0:4 -y -acodec copy "E:\Output\iId_5_aid_4355_lang_it_2020-07-11@17_50_25_2710_07.dts" -map 0:3 -y -acodec copy "E:\Output\iId_4_aid_4354_lang_fr_2020-07-11@17_50_25_2710_05.dts" -map 0:2 -y -acodec copy "E:\Output\iId_3_aid_4353_lang_en_2020-07-11@17_50_25_2710_03.dts" -map 0:1 -y -acodec copy "E:\Output\iId_2_aid_4352_lang_ja_2020-07-11@17_50_25_2710_01.dts"
This is a perfect example of why I appreciate ffmpeg's capabilities but prefer eac3to for certain tasks. If only there were a way to simplify the former's syntax...

Thanks for your posts on this topic, Selur! They are most informative. I've wanted to know how to do this with ffmpeg for quite a while.
Richard1485 is offline   Reply With Quote
Old 13th July 2020, 13:38   #6  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 323
Can ffmpeg handle seamless branching?
Richard1485 is offline   Reply With Quote
Old 13th July 2020, 16:13   #7  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,206
afaik there's no support for seamless branching in ffmpeg
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 13th July 2020, 16:33   #8  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 323
Thanks for the reply! When I try the procedure outlined above, I receive an error message:

Quote:
disc.c:323: failed opening UDF image mnt/directory/
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[bluray @ 0x5634cbe70680] bd_open() failed
bluray:mnt/directory/: Input/output error
I'm running Debian 10. (Initially, I ran into trouble because the static builds for Linux do not list "bluray" under "Supported file protocols", but I tried the version of ffmpeg in the repos, which does have the protocol, and ran into the above error.) I've googled the error but drawn a blank. Do you any ideas?
Richard1485 is offline   Reply With Quote
Old 13th July 2020, 19:27   #9  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,206
1. I assume you are not mounting an original blu-ray with copy protection (ffmpeg won't circumvent any copy protection)
2. make sure you ffmpeg version is build with libblury
3. you can try the version which comes with Hybrid (it's compile with the basic stuff usually used)

Cu Selur
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 13th July 2020, 20:20   #10  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 323
Quote:
Originally Posted by Selur View Post
1. I assume you are not mounting an original blu-ray with copy protection (ffmpeg won't circumvent any copy protection)
2. make sure you ffmpeg version is build with libblury
3. you can try the version which comes with Hybrid (it's compile with the basic stuff usually used)
1. The disc has already been decrypted and ripped to the drive. The reference to /mnt is simply because I have multiple drives. Moreover, I've tried multiple discs, including one of my own authoring that has never seen copy protection.
2. Yes. I checked that: --enable-libbluray is present, and I have libbluray installed.
3. I might try Hybrid at some point, but I don't understand why it's not working simply with ffmpeg. I've even tried the latest stable (static) Windows build under Wine, and the same message appears.
Richard1485 is offline   Reply With Quote
Old 14th July 2020, 18:50   #11  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 6,206
My point was not that you try Hybrid, but that you try with the ffmpeg build that comes with the version which comes with the base tools.
Might be a problem with libbluray.
What does you command line look like exactly?

Cu Selur
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 14th July 2020, 21:54   #12  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 323
Quote:
Originally Posted by Selur View Post
My point was not that you try Hybrid, but that you try with the ffmpeg build that comes with the version which comes with the base tools.
Yes, I understood that. But I'd still want to know why it won't work with the version in the repos. (I already know why it won't work with the static binaries for Linux.) And I've just tried the build in Hybrid, and the same message occurs.

Quote:
Originally Posted by Selur View Post
What does you command line look like exactly?
Code:
ffmpeg -y -analyzeduration 200M -probesize 200M -i bluray:mnt/xdev/my_directory/
Enclosing the filepath in inverted commas makes no difference.
Richard1485 is offline   Reply With Quote
Old 16th July 2020, 20:18   #13  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 323
Okay. I found the error. There should have been a backslash immediately after the colon. This works:

Code:
ffmpeg -analyzeduration 200M -probesize 200M -i bluray:/mnt/xdev/my_directory/
However, when I select a playlist, I receive an error message:

Quote:
Trailing options were found on the commandline.
Here's the command line:

Code:
ffmpeg -i bluray:/mnt/xdev/my_directory/  -playlist 00132.mpls
Obviously, something needs to be escaped. I've tried -playlist 00132 (without the extension) as well.

EDIT: I've figured it out. The example given earlier in the thread was wrong. The -playlist parameter has to go before the input. The .mpls extension is not needed. This works:

Code:
ffmpeg -playlist 00132 -i bluray:/mnt/xdev/my_directory/

Last edited by Richard1485; 17th July 2020 at 15:51.
Richard1485 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.